[93301] trunk/dports/x11/xinit

jeremyhu at macports.org jeremyhu at macports.org
Sat May 19 04:40:05 PDT 2012


Revision: 93301
          https://trac.macports.org/changeset/93301
Author:   jeremyhu at macports.org
Date:     2012-05-19 04:40:01 -0700 (Sat, 19 May 2012)
Log Message:
-----------
xinit: Silence some syslog spam from startx

Modified Paths:
--------------
    trunk/dports/x11/xinit/Portfile
    trunk/dports/x11/xinit/files/0001-launchd-privileged_startx-Improved-error-resolution.patch
    trunk/dports/x11/xinit/files/0002-launchd-Don-t-provide-the-LaunchAgent-on-Tiger.patch
    trunk/dports/x11/xinit/files/0003-launchd-Provide-more-verbose-error-reporting-for-lau.patch
    trunk/dports/x11/xinit/files/0004-launchd-Load-privileged_startx-properly-on-Tiger.patch
    trunk/dports/x11/xinit/files/0005-launchd-Fix-the-destination-of-moved-aside-directori.patch

Added Paths:
-----------
    trunk/dports/x11/xinit/files/0006-darwin-Silence-a-syslog-message-from-defaults.patch
    trunk/dports/x11/xinit/files/0007-laucnhd-Silence-some-syslog-spam.patch
    trunk/dports/x11/xinit/files/0008-Annotate-Fatal-and-Fatalx-as-_X_NORETURN.patch

Modified: trunk/dports/x11/xinit/Portfile
===================================================================
--- trunk/dports/x11/xinit/Portfile	2012-05-19 11:13:08 UTC (rev 93300)
+++ trunk/dports/x11/xinit/Portfile	2012-05-19 11:40:01 UTC (rev 93301)
@@ -4,7 +4,7 @@
 
 name                xinit
 version             1.3.2
-revision            3
+revision            4
 categories          x11
 platforms           darwin
 maintainers         jeremyhu openmaintainer
@@ -39,7 +39,10 @@
 	0002-launchd-Don-t-provide-the-LaunchAgent-on-Tiger.patch \
 	0003-launchd-Provide-more-verbose-error-reporting-for-lau.patch \
 	0004-launchd-Load-privileged_startx-properly-on-Tiger.patch \
-	0005-launchd-Fix-the-destination-of-moved-aside-directori.patch
+	0005-launchd-Fix-the-destination-of-moved-aside-directori.patch \
+        0006-darwin-Silence-a-syslog-message-from-defaults.patch \
+        0007-laucnhd-Silence-some-syslog-spam.patch \
+        0008-Annotate-Fatal-and-Fatalx-as-_X_NORETURN.patch
 
 patch.pre_args -p1
 

Modified: trunk/dports/x11/xinit/files/0001-launchd-privileged_startx-Improved-error-resolution.patch
===================================================================
--- trunk/dports/x11/xinit/files/0001-launchd-privileged_startx-Improved-error-resolution.patch	2012-05-19 11:13:08 UTC (rev 93300)
+++ trunk/dports/x11/xinit/files/0001-launchd-privileged_startx-Improved-error-resolution.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -1,7 +1,7 @@
 From 49cfa8b7253096d24b2ef6a8d0ba32c4bae9ac23 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston <jeremyhu at apple.com>
 Date: Fri, 17 Feb 2012 17:35:26 -0800
-Subject: [PATCH 1/5] launchd/privileged_startx: Improved error resolution
+Subject: [PATCH 1/8] launchd/privileged_startx: Improved error resolution
 
 Rather than just failing to do anything when directories aren't what we
 want them to be, we now try our best to fix the situation.

Modified: trunk/dports/x11/xinit/files/0002-launchd-Don-t-provide-the-LaunchAgent-on-Tiger.patch
===================================================================
--- trunk/dports/x11/xinit/files/0002-launchd-Don-t-provide-the-LaunchAgent-on-Tiger.patch	2012-05-19 11:13:08 UTC (rev 93300)
+++ trunk/dports/x11/xinit/files/0002-launchd-Don-t-provide-the-LaunchAgent-on-Tiger.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -1,7 +1,7 @@
 From 2d9bdc819adbe45ec3ffdc72429fd92b7f613601 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston <jeremyhu at apple.com>
 Date: Wed, 18 Apr 2012 09:20:37 -0700
-Subject: [PATCH 2/5] launchd: Don't provide the LaunchAgent on Tiger
+Subject: [PATCH 2/8] launchd: Don't provide the LaunchAgent on Tiger
 
 Tiger's launchd doesn't support all the features we need from it.
 

Modified: trunk/dports/x11/xinit/files/0003-launchd-Provide-more-verbose-error-reporting-for-lau.patch
===================================================================
--- trunk/dports/x11/xinit/files/0003-launchd-Provide-more-verbose-error-reporting-for-lau.patch	2012-05-19 11:13:08 UTC (rev 93300)
+++ trunk/dports/x11/xinit/files/0003-launchd-Provide-more-verbose-error-reporting-for-lau.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -1,7 +1,7 @@
 From 4cd122efcfa47afbe8c2ebeee6d8fd48914839a7 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston <jeremyhu at apple.com>
 Date: Wed, 18 Apr 2012 09:47:33 -0700
-Subject: [PATCH 3/5] launchd: Provide more verbose error reporting for
+Subject: [PATCH 3/8] launchd: Provide more verbose error reporting for
  launchd checkin failures
 
 Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

Modified: trunk/dports/x11/xinit/files/0004-launchd-Load-privileged_startx-properly-on-Tiger.patch
===================================================================
--- trunk/dports/x11/xinit/files/0004-launchd-Load-privileged_startx-properly-on-Tiger.patch	2012-05-19 11:13:08 UTC (rev 93300)
+++ trunk/dports/x11/xinit/files/0004-launchd-Load-privileged_startx-properly-on-Tiger.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -1,7 +1,7 @@
 From c781653f956043e0ee476d4e95e0ae93b27aff96 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston <jeremyhu at apple.com>
 Date: Wed, 18 Apr 2012 09:52:18 -0700
-Subject: [PATCH 4/5] launchd: Load privileged_startx properly on Tiger
+Subject: [PATCH 4/8] launchd: Load privileged_startx properly on Tiger
 
 Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
 ---

Modified: trunk/dports/x11/xinit/files/0005-launchd-Fix-the-destination-of-moved-aside-directori.patch
===================================================================
--- trunk/dports/x11/xinit/files/0005-launchd-Fix-the-destination-of-moved-aside-directori.patch	2012-05-19 11:13:08 UTC (rev 93300)
+++ trunk/dports/x11/xinit/files/0005-launchd-Fix-the-destination-of-moved-aside-directori.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -1,7 +1,7 @@
 From eda973a32552c916e7e7cce8877674106cbda0cb Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston <jeremyhu at apple.com>
 Date: Wed, 18 Apr 2012 10:02:07 -0700
-Subject: [PATCH 5/5] launchd: Fix the destination of moved-aside directories
+Subject: [PATCH 5/8] launchd: Fix the destination of moved-aside directories
  in privileged_startx
 
 Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

Added: trunk/dports/x11/xinit/files/0006-darwin-Silence-a-syslog-message-from-defaults.patch
===================================================================
--- trunk/dports/x11/xinit/files/0006-darwin-Silence-a-syslog-message-from-defaults.patch	                        (rev 0)
+++ trunk/dports/x11/xinit/files/0006-darwin-Silence-a-syslog-message-from-defaults.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -0,0 +1,33 @@
+From 335937217a51e5e159a14463e0b1e3aedf35c6be Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Sat, 19 May 2012 04:22:14 -0700
+Subject: [PATCH 6/8] darwin: Silence a syslog message from defaults
+
+Unfortunately defaults has no way to check if a preference exists, and it
+prints a message to syslog if we read one that doesn't exist.  dpi is one
+that commonly doesn't exist and results in user confusion when they read
+syslog.
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ startx.cpp |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git xinit-1.3.2/startx.cpp xinit-1.3.2/startx.cpp
+index c92c51c..cd795c7 100644
+--- xinit-1.3.2/startx.cpp
++++ xinit-1.3.2/startx.cpp
+@@ -126,7 +126,9 @@ if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then
+     defaultserverargs="$defaultserverargs -nolisten tcp"
+ fi
+ 
+-if defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then
++XCOMM The second check is the real one.  The first is to hopefully avoid
++XCOMM needless syslog spamming.
++if defaults read $X11_PREFS_DOMAIN 2> /dev/null | grep -q '"dpi"' && defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then
+     defaultserverargs="$defaultserverargs -dpi `defaults read $X11_PREFS_DOMAIN dpi`"
+ fi
+ 
+-- 
+1.7.10
+

Added: trunk/dports/x11/xinit/files/0007-laucnhd-Silence-some-syslog-spam.patch
===================================================================
--- trunk/dports/x11/xinit/files/0007-laucnhd-Silence-some-syslog-spam.patch	                        (rev 0)
+++ trunk/dports/x11/xinit/files/0007-laucnhd-Silence-some-syslog-spam.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -0,0 +1,35 @@
+From 641588afe92c803a1231ecf6281115f55b20e62a Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Sat, 19 May 2012 04:30:49 -0700
+Subject: [PATCH 7/8] laucnhd: Silence some syslog spam
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ launchd/privileged_startx/10-tmpdirs.cpp |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git xinit-1.3.2/launchd/privileged_startx/10-tmpdirs.cpp xinit-1.3.2/launchd/privileged_startx/10-tmpdirs.cpp
+index 7786426..6ba045f 100755
+--- xinit-1.3.2/launchd/privileged_startx/10-tmpdirs.cpp
++++ xinit-1.3.2/launchd/privileged_startx/10-tmpdirs.cpp
+@@ -41,14 +41,14 @@ STAT=/usr/bin/stat
+ for dir in /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix ; do
+ 	success=0
+ 	for attempt in 1 2 3 4 5 ; do
+-		check=`${STAT} -f '%#p %u %g' ${dir}`
++		check=`${STAT} -f '%#p %u %g' ${dir} 2> /dev/null`
+ 		if [ "${check}" = "041777 0 0" ] ; then
+ 			success=1
+ 			break
+-		else
++		elif [ -n "${check}" ] ; then
+ 			saved=$(${MKTEMP} -d ${dir}-XXXXXXXX)
+ 			mv ${dir} ${saved}
+-			echo "${dir} exists but is insecure.  It has been moved into ${saved}"
++			echo "${dir} exists but is insecure.  It has been moved into ${saved}" >&2
+ 		fi
+ 
+ 		# Use mktemp rather than mkdir to avoid possible security issue
+-- 
+1.7.10
+

Added: trunk/dports/x11/xinit/files/0008-Annotate-Fatal-and-Fatalx-as-_X_NORETURN.patch
===================================================================
--- trunk/dports/x11/xinit/files/0008-Annotate-Fatal-and-Fatalx-as-_X_NORETURN.patch	                        (rev 0)
+++ trunk/dports/x11/xinit/files/0008-Annotate-Fatal-and-Fatalx-as-_X_NORETURN.patch	2012-05-19 11:40:01 UTC (rev 93301)
@@ -0,0 +1,47 @@
+From 8156aad786754499f4636104aa5bd8a27a281448 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Sat, 19 May 2012 04:34:32 -0700
+Subject: [PATCH 8/8] Annotate Fatal and Fatalx as _X_NORETURN
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ configure.ac |    2 +-
+ xinit.c      |    2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git xinit-1.3.2/configure.ac xinit-1.3.2/configure.ac
+index d18c4b0..db65b4c 100644
+--- xinit-1.3.2/configure.ac
++++ xinit-1.3.2/configure.ac
+@@ -141,7 +141,7 @@ AM_CONDITIONAL(TIGER_LAUNCHD, [test "x$TIGER_LAUNCHD" = "xyes"])
+ AM_CONDITIONAL(LAUNCHAGENT_XSERVER, [test "x$launchagentxserver" != "xno"])
+ 
+ # Checks for pkg-config packages
+-PKG_CHECK_MODULES(XINIT, x11)
++PKG_CHECK_MODULES(XINIT, x11 xproto >= 7.0.17)
+ 
+ case $host_os in
+     *bsd*)
+diff --git xinit-1.3.2/xinit.c xinit-1.3.2/xinit.c
+index 2ab817f..46f717a 100644
+--- xinit-1.3.2/xinit.c
++++ xinit-1.3.2/xinit.c
+@@ -653,6 +653,7 @@ verrorx(const char *fmt, va_list ap)
+ }
+ 
+ static void
++_X_NORETURN
+ Fatal(const char *fmt, ...)
+ {
+     va_list ap;
+@@ -663,6 +664,7 @@ Fatal(const char *fmt, ...)
+ }
+ 
+ static void
++_X_NORETURN
+ Fatalx(const char *fmt, ...)
+ {
+     va_list ap;
+-- 
+1.7.10
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120519/15733833/attachment.html>


More information about the macports-changes mailing list