[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'debian-unstable'



 debian/changelog        |   14 ++++++++++++++
 debian/local/xvfb-run   |   23 +++++++++++------------
 debian/local/xvfb-run.1 |    9 +--------
 3 files changed, 26 insertions(+), 20 deletions(-)

New commits:
commit a87b009fd44a391906bbb9242038e9f996f06b5d
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Apr 16 21:50:04 2012 +0200

    xvfb-run: fix xauth handling
    
    setting XAUTHORITY when starting an X server isn't actually useful, we
    need to use the -auth command-line parameter instead.  Somehow this
    seems to have been broken all these years and nobody noticed...

diff --git a/debian/changelog b/debian/changelog
index 6afd5d0..4f0991f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,10 @@ xorg-server (2:1.12.1-2) UNRELEASED; urgency=low
     to come up (and waiting 2.9 seconds too many in the general case), tell it
     to send us SIGUSR1 when it's ready to accept connections.  This reduces
     "xvfb-run -- xterm -e true" from ~3.2s to ~0.4s on a quick test.
+  * xvfb-run: fix xauth handling; setting XAUTHORITY when starting an X server
+    isn't actually useful, we need to use the -auth command-line parameter
+    instead.  Somehow this seems to have been broken all these years and
+    nobody noticed...
 
  -- Julien Cristau <jcristau@debian.org>  Mon, 19 Mar 2012 21:16:07 +0100
 
diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index 3bcdbeb..e7920e7 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -161,7 +161,7 @@ EOF
     # handle SIGUSR1 so Xvfb knows to send a signal when it's ready to accept
     # connections
     trap : USR1
-    (trap '' USR1; XAUTHORITY=$AUTHFILE exec Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1) &
+    (trap '' USR1; exec Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP -auth $AUTHFILE >>"$ERRORFILE" 2>&1) &
     XVFBPID=$!
 
     wait || :

commit ece7e5c4bad5742f7b08ff61a253e838f6826df4
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Apr 16 21:48:12 2012 +0200

    xvfb-run: send kill output to $ERRORFILE

diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index 445dd48..3bcdbeb 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -88,7 +88,7 @@ clean_up() {
         fi
     fi
     if [ -n "$XVFBPID" ]; then
-        kill "$XVFBPID"
+        kill "$XVFBPID" >>"$ERRORFILE" 2>&1
     fi
 }
 

commit e79270d7286a5d33d1279340c169c88798a917da
Author: Julien Cristau <jcristau@debian.org>
Date:   Wed Apr 4 23:11:56 2012 +0200

    xvfb-run: fix bashism
    
    dash's trap doesn't accept SIGUSR1.  Both dash and bash are happy with
    USR1, so use that.

diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index b708e63..445dd48 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -160,8 +160,8 @@ add :$SERVERNUM $XAUTHPROTO $MCOOKIE
 EOF
     # handle SIGUSR1 so Xvfb knows to send a signal when it's ready to accept
     # connections
-    trap : SIGUSR1
-    (trap '' SIGUSR1; XAUTHORITY=$AUTHFILE exec Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1) &
+    trap : USR1
+    (trap '' USR1; XAUTHORITY=$AUTHFILE exec Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1) &
     XVFBPID=$!
 
     wait || :

commit 07c6c8ac5f7366d496f61c2fa41bb4554de363b0
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Mar 20 20:56:29 2012 +0100

    Brown paper bag fix for the xvfb-run wait change
    
    wait returns non-zero if interrupted by a signal, and we're set -e.

diff --git a/debian/changelog b/debian/changelog
index 7e8ddf7..6afd5d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,7 @@ xorg-server (2:1.12.1-2) UNRELEASED; urgency=low
   * xvfb-run: instead of waiting 3 seconds and hoping that's enough for Xvfb
     to come up (and waiting 2.9 seconds too many in the general case), tell it
     to send us SIGUSR1 when it's ready to accept connections.  This reduces
-    "xvfb-run -- xterm -e true" from 3.17s to 0.28s on a quick test.
+    "xvfb-run -- xterm -e true" from ~3.2s to ~0.4s on a quick test.
 
  -- Julien Cristau <jcristau@debian.org>  Mon, 19 Mar 2012 21:16:07 +0100
 
diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index 8832718..b708e63 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -164,7 +164,7 @@ EOF
     (trap '' SIGUSR1; XAUTHORITY=$AUTHFILE exec Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1) &
     XVFBPID=$!
 
-    wait
+    wait || :
     if kill -0 $XVFBPID 2>/dev/null; then
         break
     elif [ -n "$AUTONUM" ]; then

commit 0206a0e07c5d29a4e686b0110b9661dd30b463cf
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Mar 19 21:51:43 2012 +0100

    xvfb-run: drop svn $Id$ keywords
    
    And update the comment about necessary build-depends.

diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index ba286a8..8832718 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -1,13 +1,11 @@
 #!/bin/sh
 
-# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
-
 # This script starts an instance of Xvfb, the "fake" X server, runs a command
 # with that server available, and kills the X server when done.  The return
 # value of the command becomes the return value of this script.
 #
 # If anyone is using this to build a Debian package, make sure the package
-# Build-Depends on xvfb, xbase-clients, and xfonts-base.
+# Build-Depends on xvfb and xauth.
 
 set -e
 
diff --git a/debian/local/xvfb-run.1 b/debian/local/xvfb-run.1
index 3973485..4b0353e 100644
--- a/debian/local/xvfb-run.1
+++ b/debian/local/xvfb-run.1
@@ -1,5 +1,3 @@
-.\" $Id: xvfb-run.1 2138 2005-01-17 23:40:27Z branden $
-.\"
 .\" Copyright 1998-2004 Branden Robinson <branden@debian.org>.
 .\"
 .\" This is free software; you may redistribute it and/or modify

commit 5b1844c4b83d5b36aabc11c6884579b4e980583f
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Mar 19 21:50:38 2012 +0100

    Speed up xvfb-run
    
    Instead of waiting 3 seconds and hoping that's enough for Xvfb to come
    up (and waiting 2.9 seconds too many in the general case), tell it to
    send us SIGUSR1 when it's ready to accept connections.  This reduces
    "xvfb-run -- xterm -e true" from 3.17s to 0.28s on a quick test.

diff --git a/debian/changelog b/debian/changelog
index ab46e76..7e8ddf7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
 xorg-server (2:1.12.1-2) UNRELEASED; urgency=low
 
   * xvfb-run: kill Xvfb when the script dies.
+  * xvfb-run: instead of waiting 3 seconds and hoping that's enough for Xvfb
+    to come up (and waiting 2.9 seconds too many in the general case), tell it
+    to send us SIGUSR1 when it's ready to accept connections.  This reduces
+    "xvfb-run -- xterm -e true" from 3.17s to 0.28s on a quick test.
 
  -- Julien Cristau <jcristau@debian.org>  Mon, 19 Mar 2012 21:16:07 +0100
 
diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index 6733d35..ba286a8 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -15,7 +15,6 @@ PROGNAME=xvfb-run
 SERVERNUM=99
 AUTHFILE=
 ERRORFILE=/dev/null
-STARTWAIT=3
 XVFBARGS="-screen 0 640x480x8"
 LISTENTCP="-nolisten tcp"
 XAUTHPROTO=.
@@ -62,8 +61,6 @@ Options:
 -s ARGS   --server-args=ARGS        arguments (other than server number and
                                     "-nolisten tcp") to pass to the Xvfb server
                                     (default: "$XVFBARGS")
--w DELAY  --wait=DELAY              delay in seconds to wait for Xvfb to start
-                                    before running COMMAND (default: $STARTWAIT)
 EOF
 }
 
@@ -120,7 +117,7 @@ while :; do
         -l|--listen-tcp) LISTENTCP="" ;;
         -p|--xauth-protocol) XAUTHPROTO="$2"; shift ;;
         -s|--server-args) XVFBARGS="$2"; shift ;;
-        -w|--wait) STARTWAIT="$2"; shift ;;
+        -w|--wait) shift ;;
         --) shift; break ;;
         *) error "internal error; getopt permitted \"$1\" unexpectedly"
            exit 6
@@ -163,10 +160,13 @@ while [ $tries -gt 0 ]; do
     XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
 add :$SERVERNUM $XAUTHPROTO $MCOOKIE
 EOF
-    XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1 &
+    # handle SIGUSR1 so Xvfb knows to send a signal when it's ready to accept
+    # connections
+    trap : SIGUSR1
+    (trap '' SIGUSR1; XAUTHORITY=$AUTHFILE exec Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1) &
     XVFBPID=$!
 
-    sleep "$STARTWAIT"
+    wait
     if kill -0 $XVFBPID 2>/dev/null; then
         break
     elif [ -n "$AUTONUM" ]; then
diff --git a/debian/local/xvfb-run.1 b/debian/local/xvfb-run.1
index 17a4292..3973485 100644
--- a/debian/local/xvfb-run.1
+++ b/debian/local/xvfb-run.1
@@ -157,12 +157,7 @@ to achieve the latter function.
 The default is \(oq\-screen 0 640x480x8\(cq.
 .TP
 .BI \-w\  delay \fR,\fB\ \-\-wait= delay
-Wait
-.I delay
-seconds after launching
-.B Xvfb
-before attempting to start the specified command.
-The default is 3.
+Ignored for compatibility with earlier versions.
 .SH ENVIRONMENT
 .TP
 .B COLUMNS

commit 8287d8205cc03a2c1c46e5e6cec301a2a3c6b39f
Author: Julien Cristau <julien.cristau@logilab.fr>
Date:   Mon Mar 19 21:17:50 2012 +0100

    xvfb-run: kill Xvfb when the script dies.
    
    We only killed the Xvfb process if the command exited, not if xvfb-run
    itself got killed

diff --git a/debian/changelog b/debian/changelog
index 8c2963a..ab46e76 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.12.1-2) UNRELEASED; urgency=low
+
+  * xvfb-run: kill Xvfb when the script dies.
+
+ -- Julien Cristau <jcristau@debian.org>  Mon, 19 Mar 2012 21:16:07 +0100
+
 xorg-server (2:1.12.1-2) unstable; urgency=low
 
   * Merge from server-1.12-branch up to 22a1953c4a to get:
diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run
index c48ab37..6733d35 100644
--- a/debian/local/xvfb-run
+++ b/debian/local/xvfb-run
@@ -92,6 +92,9 @@ clean_up() {
             exit 5
         fi
     fi
+    if [ -n "$XVFBPID" ]; then
+        kill "$XVFBPID"
+    fi
 }
 
 # Parse the command line.
@@ -173,6 +176,7 @@ EOF
         continue
     fi
     error "Xvfb failed to start" >&2
+    XVFBPID=
     exit 1
 done
 
@@ -182,9 +186,6 @@ DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
 RETVAL=$?
 set -e
 
-# Kill Xvfb now that the command has exited.
-kill $XVFBPID
-
 # Return the executed command's exit status.
 exit $RETVAL
 


Reply to: