xorg-server: Changes to 'ubuntu'
debian/changelog | 9 ++++++++-
debian/local/xvfb-run | 34 ++++++++++------------------------
2 files changed, 18 insertions(+), 25 deletions(-)
New commits:
commit e6693c767e1a3fe2f02ae93fa7a6f7886d3fdebd
Author: Bryce Harrington <bryce@bryceharrington.org>
Date: Mon Nov 23 15:39:30 2009 -0800
Looks like kees slipped in a patch without updating git. Merge it in.
diff --git a/debian/changelog b/debian/changelog
index 7f77953..1337597 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.6.4-2ubuntu5) karmic; urgency=low
+xorg-server (2:1.6.4-2ubuntu6) lucid; urgency=low
* 189_xserver_1.5.0_bg_none_root.patch: Moblin patch to allow X to
create a root window with no background by passing the -nr
@@ -15,6 +15,13 @@ xorg-server (2:1.6.4-2ubuntu5) karmic; urgency=low
-- Bryce Harrington <bryce@ubuntu.com> Mon, 23 Nov 2009 13:59:44 -0800
+xorg-server (2:1.6.4-2ubuntu5) lucid; urgency=low
+
+ * Rework xvfb-run patch to wait for server to come up before checking
+ status (LP: #481591, Debian bug 521075).
+
+ -- Kees Cook <kees@ubuntu.com> Fri, 13 Nov 2009 16:15:36 -0800
+
xorg-server (2:1.6.4-2ubuntu4) karmic; urgency=low
* Add 188_default_primary_to_first_busid.patch: X can abort if multiple
diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index b6156c5..a75163f 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -149,46 +149,32 @@ trap clean_up EXIT
# directory to house one.
if [ -z "$AUTHFILE" ]; then
XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)"
- AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority"
+ AUTHFILE=$(tempfile -n "$XVFB_RUN_TMPDIR/Xauthority")
fi
# Start Xvfb.
-tries=1000
-while test $tries -gt 0; do
- tries=$((tries-1))
- MCOOKIE=$(mcookie)
+MCOOKIE=$(mcookie)
+tries=10
+while [ $tries -gt 0 ]; do
+ tries=$(( $tries - 1 ))
XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
add :$SERVERNUM $XAUTHPROTO $MCOOKIE
EOF
XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1 &
XVFBPID=$!
- # Test PID of Xvfb and contents of the X server lock file
- # (use numerical comparison to avoid whitespace issues).
- # If the display was in use the Xvfb process will die on its own.
- LOCKPID=`cat /tmp/.X${SERVERNUM}-lock)` 2>/dev/null
- if [ -z $LOCKPID ]; then
+ sleep "$STARTWAIT"
+ if kill -0 $XVFBPID 2>/dev/null; then
break
- fi
- if [ "$XVFBPID" -eq $LOCKPID ]; then
- break
- fi
- # The display is in use so try another one (if '-a' was specified).
- if [ "$AUTONUM" ]; then
+ elif [ -n "$AUTONUM" ]; then
+ # The display is in use so try another one (if '-a' was specified).
SERVERNUM=$(find_free_servernum)
continue
fi
- error "display :$SERVERNUM already in use"
+ error "Xvfb failed to start" >&2
exit 1
-
done
-sleep "$STARTWAIT"
-if ! kill -0 $XVFBPID 2>/dev/null; then
- echo "Xvfb failed to start" >&2
- exit 1
-fi
-
# Start the command and save its exit status.
set +e
DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
Reply to: