[152804] trunk/dports/x11/xorg-server-devel

jeremyhu at macports.org jeremyhu at macports.org
Sun Sep 18 16:09:13 PDT 2016


Revision: 152804
          https://trac.macports.org/changeset/152804
Author:   jeremyhu at macports.org
Date:     2016-09-18 16:09:12 -0700 (Sun, 18 Sep 2016)
Log Message:
-----------
xorg-server-devel: Update to current master

Modified Paths:
--------------
    trunk/dports/x11/xorg-server-devel/Portfile
    trunk/dports/x11/xorg-server-devel/files/0001-randr-Initialize-RandR-even-if-there-are-currently-n.patch
    trunk/dports/x11/xorg-server-devel/files/0002-glx-Initialize-glx-even-if-there-are-currently-no-sc.patch

Added Paths:
-----------
    trunk/dports/x11/xorg-server-devel/files/0003-os-connection-Improve-abstraction-for-launchd-secure.patch
    trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Call-ClientReady-based-on-a-level-trig.patch
    trunk/dports/x11/xorg-server-devel/files/0005-os-connection-Remove-NewOutputPending.patch

Removed Paths:
-------------
    trunk/dports/x11/xorg-server-devel/files/0003-dix-dispatch-Fix-SmartScheduleClient-interval-adjust.patch
    trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Improve-abstraction-for-launchd-secure.patch

Modified: trunk/dports/x11/xorg-server-devel/Portfile
===================================================================
--- trunk/dports/x11/xorg-server-devel/Portfile	2016-09-18 21:38:16 UTC (rev 152803)
+++ trunk/dports/x11/xorg-server-devel/Portfile	2016-09-18 23:09:12 UTC (rev 152804)
@@ -5,8 +5,8 @@
 name		xorg-server-devel
 conflicts       xorg-server
 set my_name	xorg-server
-version		1.18.99.1
-revision        3
+version		1.18.99.2
+revision        0
 categories	x11 devel
 license         X11
 maintainers	jeremyhu openmaintainer
@@ -17,8 +17,8 @@
 
 fetch.type      git
 git.url         git://anongit.freedesktop.org/xorg/xserver
-git.branch      c4799f186b31e579721f5874c897f3f46db6ad0a
-#git.branch      xorg-server-${version}
+#git.branch      c4799f186b31e579721f5874c897f3f46db6ad0a
+git.branch      xorg-server-${version}
 
 use_parallel_build yes
 
@@ -85,8 +85,9 @@
 patchfiles \
 	0001-randr-Initialize-RandR-even-if-there-are-currently-n.patch \
 	0002-glx-Initialize-glx-even-if-there-are-currently-no-sc.patch \
-	0003-dix-dispatch-Fix-SmartScheduleClient-interval-adjust.patch \
-	0004-os-connection-Improve-abstraction-for-launchd-secure.patch \
+	0003-os-connection-Improve-abstraction-for-launchd-secure.patch \
+	0004-os-connection-Call-ClientReady-based-on-a-level-trig.patch \
+	0005-os-connection-Remove-NewOutputPending.patch \
 	5000-sdksyms.sh-Use-CPPFLAGS-not-CFLAGS.patch \
 	5001-Revert-dix-Restore-PaintWindow-screen-hook.patch \
 	5002-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch \

Modified: trunk/dports/x11/xorg-server-devel/files/0001-randr-Initialize-RandR-even-if-there-are-currently-n.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0001-randr-Initialize-RandR-even-if-there-are-currently-n.patch	2016-09-18 21:38:16 UTC (rev 152803)
+++ trunk/dports/x11/xorg-server-devel/files/0001-randr-Initialize-RandR-even-if-there-are-currently-n.patch	2016-09-18 23:09:12 UTC (rev 152804)
@@ -1,7 +1,7 @@
-From 908f3e9d9a9324657e9054e767e5a3f9aaca6051 Mon Sep 17 00:00:00 2001
+From b0fc675e7a40818774864004f09becc1e672f5b6 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Sun, 11 Sep 2016 02:19:19 -0700
-Subject: [PATCH 1/4] randr: Initialize RandR even if there are currently no
+Subject: [PATCH 1/5] randr: Initialize RandR even if there are currently no
  screens attached
 
 Failure to do so causes an overvlow in RRClientCallback().
@@ -44,5 +44,5 @@
                                 sizeof(RRClientRec) +
                                 screenInfo.numScreens * sizeof(RRTimesRec)))
 -- 
-2.10.0 (Apple Git-99)
+2.10.0 (Apple Git-77)
 

Modified: trunk/dports/x11/xorg-server-devel/files/0002-glx-Initialize-glx-even-if-there-are-currently-no-sc.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0002-glx-Initialize-glx-even-if-there-are-currently-no-sc.patch	2016-09-18 21:38:16 UTC (rev 152803)
+++ trunk/dports/x11/xorg-server-devel/files/0002-glx-Initialize-glx-even-if-there-are-currently-no-sc.patch	2016-09-18 23:09:12 UTC (rev 152804)
@@ -1,7 +1,7 @@
-From c174b1064cce139f0b54fb02814fa1d0278a773f Mon Sep 17 00:00:00 2001
+From 8c7976c74fa28a8f45a0d5ca272da3b0bc3cf658 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Sun, 11 Sep 2016 02:47:00 -0700
-Subject: [PATCH 2/4] glx: Initialize glx even if there are currently no
+Subject: [PATCH 2/5] glx: Initialize glx even if there are currently no
  screens attached
 
 Failure to do so causes an overvlow in glxClientCallback
@@ -72,5 +72,5 @@
                                              "GLXContext");
      __glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone,
 -- 
-2.10.0 (Apple Git-99)
+2.10.0 (Apple Git-77)
 

Deleted: trunk/dports/x11/xorg-server-devel/files/0003-dix-dispatch-Fix-SmartScheduleClient-interval-adjust.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0003-dix-dispatch-Fix-SmartScheduleClient-interval-adjust.patch	2016-09-18 21:38:16 UTC (rev 152803)
+++ trunk/dports/x11/xorg-server-devel/files/0003-dix-dispatch-Fix-SmartScheduleClient-interval-adjust.patch	2016-09-18 23:09:12 UTC (rev 152804)
@@ -1,45 +0,0 @@
-From 7c6972ae971bfac55c941b420013ff101517d82c Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
-Date: Sun, 11 Sep 2016 03:02:49 -0700
-Subject: [PATCH 3/4] dix/dispatch: Fix SmartScheduleClient interval adjustment
- to use best rather than pClient
-
-pClient does not contain a live value after the transition to lists
-
-https://bugs.freedesktop.org/show_bug.cgi?id=97765
-
-Application Specific Information:
-X.Org X Server 1.18.99.1 Build Date: 20160910
-=================================================================
-==16921==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000108ce3834 at pc 0x000108880766 bp 0x7000045f76c0 sp 0x7000045f76b8
-READ of size 4 at 0x000108ce3834 thread T6
-    #0 0x108880765 in SmartScheduleClient dispatch.c:365
-    #1 0x10887ecc5 in Dispatch dispatch.c:422
-    #2 0x1088c05f1 in dix_main main.c:301
-    #3 0x1082aabba in server_thread quartzStartup.c:66
-    #4 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa)
-    #5 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6)
-    #6 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc)
-
-Regressed-in: 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e
-Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
----
- dix/dispatch.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dix/dispatch.c b/dix/dispatch.c
-index 0edcfee..26a461b 100644
---- a/dix/dispatch.c
-+++ b/dix/dispatch.c
-@@ -362,7 +362,7 @@ SmartScheduleClient(void)
-          * has run, bump the slice up to get maximal
-          * performance from a single client
-          */
--        if ((now - pClient->smart_start_tick) > 1000 &&
-+        if ((now - best->smart_start_tick) > 1000 &&
-             SmartScheduleSlice < SmartScheduleMaxSlice) {
-             SmartScheduleSlice += SmartScheduleInterval;
-         }
--- 
-2.10.0 (Apple Git-99)
-

Added: trunk/dports/x11/xorg-server-devel/files/0003-os-connection-Improve-abstraction-for-launchd-secure.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0003-os-connection-Improve-abstraction-for-launchd-secure.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server-devel/files/0003-os-connection-Improve-abstraction-for-launchd-secure.patch	2016-09-18 23:09:12 UTC (rev 152804)
@@ -0,0 +1,74 @@
+From 040ebffc92de28e0f70b386a0fb36d6966f8ffe4 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Sat, 10 Sep 2016 22:32:56 -0700
+Subject: [PATCH 3/5] os/connection: Improve abstraction for launchd secure
+ sockets
+
+This changes away from hard-coding the /tmp/launch-* path to now
+supporting a generic <absolute path to unix socket>[.<screen>]
+format for $DISPLAY.
+
+cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+CC: Adam Jackson <ajax at kemper.freedesktop.org>
+---
+ os/connection.c | 31 ++++++++++++++++++++++++++-----
+ 1 file changed, 26 insertions(+), 5 deletions(-)
+
+diff --git a/os/connection.c b/os/connection.c
+index a901ebf..0d42184 100644
+--- a/os/connection.c
++++ b/os/connection.c
+@@ -79,6 +79,8 @@ SOFTWARE.
+ #include <stdio.h>
+ #include <stdlib.h>
+ 
++#include <sys/stat.h>
++
+ #ifndef WIN32
+ #include <sys/socket.h>
+ 
+@@ -1112,15 +1114,34 @@ MakeClientGrabPervious(ClientPtr client)
+ void
+ ListenOnOpenFD(int fd, int noxauth)
+ {
+-    char port[256];
++    char port[PATH_MAX];
+     XtransConnInfo ciptr;
+     const char *display_env = getenv("DISPLAY");
+ 
+-    if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
+-        /* Make the path the launchd socket if our DISPLAY is set right */
+-        strcpy(port, display_env);
++    /* First check if display_env matches a <absolute path to unix socket>[.<screen number>] scheme (eg: launchd) */
++    if (display_env && display_env[0] == '/') {
++        struct stat sbuf;
++
++        strlcpy(port, display_env, sizeof(port));
++
++        /* If the path exists, we don't have do do anything else.
++         * If it doesn't, we need to check for a .<screen number> to strip off and recheck.
++         */
++        if (0 != stat(port, &sbuf)) {
++            char *dot = strrchr(port, '.');
++            if (dot) {
++                *dot = '\0';
++
++                if (0 != stat(port, &sbuf)) {
++                    display_env = NULL;
++                }
++            } else {
++                display_env = NULL;
++            }
++        }
+     }
+-    else {
++
++    if (!display_env) {
+         /* Just some default so things don't break and die. */
+         snprintf(port, sizeof(port), ":%d", atoi(display));
+     }
+-- 
+2.10.0 (Apple Git-77)
+

Added: trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Call-ClientReady-based-on-a-level-trig.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Call-ClientReady-based-on-a-level-trig.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Call-ClientReady-based-on-a-level-trig.patch	2016-09-18 23:09:12 UTC (rev 152804)
@@ -0,0 +1,38 @@
+From fabbe2965c579883c21e52c76be2dc9dc2a3ce05 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Sat, 17 Sep 2016 01:35:29 -0700
+Subject: [PATCH 4/5] os/connection: Call ClientReady() based on a level
+ trigger rather than an edge trigger
+
+On encountering an EAGAIN, FlushClient() re-adds the client to the pending list
+and returns, but FlushClient() doesn't get called again.  We would expect it to
+be called via FlushAllOutput() via WaitForSomething(), but that only happens
+when NewOutputPending is set.  FlushAllOutput() also early-exits if
+NewOutputPending is not set.
+
+The only place that is setting NewOutputPending is ClientReady().  The problem
+there is that ClientReady() is called based on an edge trigger and not a level
+trigger.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+CC: Keith Packard <keithp at keithp.com>
+---
+ os/connection.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os/connection.c b/os/connection.c
+index 0d42184..4630438 100644
+--- a/os/connection.c
++++ b/os/connection.c
+@@ -749,7 +749,7 @@ AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time)
+     SetConnectionTranslation(fd, client->index);
+ #endif
+     ospoll_add(server_poll, fd,
+-               ospoll_trigger_edge,
++               ospoll_trigger_level,
+                ClientReady,
+                client);
+     set_poll_client(client);
+-- 
+2.10.0 (Apple Git-77)
+

Deleted: trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Improve-abstraction-for-launchd-secure.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Improve-abstraction-for-launchd-secure.patch	2016-09-18 21:38:16 UTC (rev 152803)
+++ trunk/dports/x11/xorg-server-devel/files/0004-os-connection-Improve-abstraction-for-launchd-secure.patch	2016-09-18 23:09:12 UTC (rev 152804)
@@ -1,74 +0,0 @@
-From 2cb26de70fcc9e0aa5f1b152b8a6ad6d8c57962d Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
-Date: Sat, 10 Sep 2016 22:32:56 -0700
-Subject: [PATCH 4/4] os/connection: Improve abstraction for launchd secure
- sockets
-
-This changes away from hard-coding the /tmp/launch-* path to now
-supporting a generic <absolute path to unix socket>[.<screen>]
-format for $DISPLAY.
-
-cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8
-
-Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
-CC: Adam Jackson <ajax at kemper.freedesktop.org>
----
- os/connection.c | 31 ++++++++++++++++++++++++++-----
- 1 file changed, 26 insertions(+), 5 deletions(-)
-
-diff --git a/os/connection.c b/os/connection.c
-index a901ebf..0d42184 100644
---- a/os/connection.c
-+++ b/os/connection.c
-@@ -79,6 +79,8 @@ SOFTWARE.
- #include <stdio.h>
- #include <stdlib.h>
- 
-+#include <sys/stat.h>
-+
- #ifndef WIN32
- #include <sys/socket.h>
- 
-@@ -1112,15 +1114,34 @@ MakeClientGrabPervious(ClientPtr client)
- void
- ListenOnOpenFD(int fd, int noxauth)
- {
--    char port[256];
-+    char port[PATH_MAX];
-     XtransConnInfo ciptr;
-     const char *display_env = getenv("DISPLAY");
- 
--    if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
--        /* Make the path the launchd socket if our DISPLAY is set right */
--        strcpy(port, display_env);
-+    /* First check if display_env matches a <absolute path to unix socket>[.<screen number>] scheme (eg: launchd) */
-+    if (display_env && display_env[0] == '/') {
-+        struct stat sbuf;
-+
-+        strlcpy(port, display_env, sizeof(port));
-+
-+        /* If the path exists, we don't have do do anything else.
-+         * If it doesn't, we need to check for a .<screen number> to strip off and recheck.
-+         */
-+        if (0 != stat(port, &sbuf)) {
-+            char *dot = strrchr(port, '.');
-+            if (dot) {
-+                *dot = '\0';
-+
-+                if (0 != stat(port, &sbuf)) {
-+                    display_env = NULL;
-+                }
-+            } else {
-+                display_env = NULL;
-+            }
-+        }
-     }
--    else {
-+
-+    if (!display_env) {
-         /* Just some default so things don't break and die. */
-         snprintf(port, sizeof(port), ":%d", atoi(display));
-     }
--- 
-2.10.0 (Apple Git-99)
-

Added: trunk/dports/x11/xorg-server-devel/files/0005-os-connection-Remove-NewOutputPending.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0005-os-connection-Remove-NewOutputPending.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server-devel/files/0005-os-connection-Remove-NewOutputPending.patch	2016-09-18 23:09:12 UTC (rev 152804)
@@ -0,0 +1,100 @@
+From 23267872221436f52d7a1eb57259bece0986d8e6 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Sat, 17 Sep 2016 01:41:10 -0700
+Subject: [PATCH 5/5] os/connection: Remove NewOutputPending
+
+Use any_output_pending() instead.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+CC: Keith Packard <keithp at keithp.com>
+---
+ os/WaitFor.c    | 2 +-
+ os/connection.c | 2 --
+ os/io.c         | 5 +----
+ os/osdep.h      | 2 --
+ 4 files changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/os/WaitFor.c b/os/WaitFor.c
+index 024df35..cde2c8c 100644
+--- a/os/WaitFor.c
++++ b/os/WaitFor.c
+@@ -213,7 +213,7 @@ WaitForSomething(Bool are_ready)
+             timeout = check_timers();
+ 
+         BlockHandler(&timeout);
+-        if (NewOutputPending)
++        if (any_output_pending())
+             FlushAllOutput();
+         /* keep this check close to select() call to minimize race */
+         if (dispatchException)
+diff --git a/os/connection.c b/os/connection.c
+index 4630438..dd0a25a 100644
+--- a/os/connection.c
++++ b/os/connection.c
+@@ -123,7 +123,6 @@ SOFTWARE.
+ struct ospoll   *server_poll;
+ 
+ int MaxClients = 0;
+-Bool NewOutputPending;          /* not yet attempted to write some new output */
+ Bool NoListenAll;               /* Don't establish any listening sockets */
+ 
+ static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
+@@ -714,7 +713,6 @@ ClientReady(int fd, int xevents, void *data)
+         mark_client_ready(client);
+     if (xevents & X_NOTIFY_WRITE) {
+         ospoll_mute(server_poll, fd, X_NOTIFY_WRITE);
+-        NewOutputPending = TRUE;
+     }
+ }
+ 
+diff --git a/os/io.c b/os/io.c
+index ff0ec3d..0ebff08 100644
+--- a/os/io.c
++++ b/os/io.c
+@@ -596,7 +596,7 @@ FlushAllOutput(void)
+ {
+     OsCommPtr oc;
+     register ClientPtr client, tmp;
+-    Bool newoutput = NewOutputPending;
++    Bool newoutput = any_output_pending();
+ 
+     if (!newoutput)
+         return;
+@@ -607,7 +607,6 @@ FlushAllOutput(void)
+      * simply wait for the select to tell us when he's ready to receive.
+      */
+     CriticalOutputPending = FALSE;
+-    NewOutputPending = FALSE;
+ 
+     xorg_list_for_each_entry_safe(client, tmp, &output_pending_clients, output_pending) {
+         if (client->clientGone)
+@@ -761,13 +760,11 @@ WriteToClient(ClientPtr who, int count, const void *__buf)
+         output_pending_clear(who);
+         if (!any_output_pending()) {
+             CriticalOutputPending = FALSE;
+-            NewOutputPending = FALSE;
+         }
+ 
+         return FlushClient(who, oc, buf, count);
+     }
+ 
+-    NewOutputPending = TRUE;
+     output_pending_mark(who);
+     memmove((char *) oco->buf + oco->count, buf, count);
+     oco->count += count;
+diff --git a/os/osdep.h b/os/osdep.h
+index 90a247f..9c8bd48 100644
+--- a/os/osdep.h
++++ b/os/osdep.h
+@@ -165,8 +165,6 @@ extern void SetConnectionTranslation(int conn, int client);
+ extern void ClearConnectionTranslation(void);
+ #endif
+ 
+-extern Bool NewOutputPending;
+-
+ extern WorkQueuePtr workQueue;
+ 
+ /* in WaitFor.c */
+-- 
+2.10.0 (Apple Git-77)
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160918/011a91f3/attachment-0001.html>


More information about the macports-changes mailing list