xvfb-run stable port information

Package: xvfb-run
Version: 1.4.2
Revision: 3
Source: http://patch-tracker.debian.org/patch/debianonly/dl/xorg-server/2:%v-10.lenny4/debian-dir%%20only%%20changes
SourceRename: xorg-server_%v-10.lenny4.debian-only-changes.diff
Source-MD5: 6e67c13a732a29318330f9e605c6e2a8
NoSourceDirectory: true
Depends: <<
getoptbin,
x11
<<
PatchFile: %n.patch
PatchFile-MD5: 91626975232b1f192939d45c6ba0037f
PatchScript: <<
patch -p1 < xorg-server_%v-10.lenny4.debian-only-changes.diff
%{default_script}
<<
CompileScript: #
InstallScript: <<
mkdir -p %i/bin
install -m0755 debian/local/xvfb-run %i/bin
mkdir -p %i/share/man/man1
install -m0644 debian/local/xvfb-run.1 %i/share/man/man1
<<
DocFiles: debian/copyright
DescPort: <<
darwin-specific patch from:
http://www.hexten.net/wiki/?title=Patch_xvfb-run_for_Mac_OS_X
<<
DescPackaging: <<
Script is apparently a debian add-on (various websites say
it's standard part of x.org?)

Needs GNU getopt; patch to avoid needing GNU fmt (coreutils)
<<
Description: Run x11 clients on headless machine
Homepage: http://packages.debian.org/xvfb
License: BSD
Maintainer: Daniel Macks

xvfb-run stable port .patch

diff -Nurd -x'*~' xorg-server-1.4.2.orig/debian/local/xvfb-run xorg-server-1.4.2/debian/local/xvfb-run
--- xorg-server-1.4.2.orig/debian/local/xvfb-run 2012-01-20 18:02:35.000000000 -0500
+++ xorg-server-1.4.2/debian/local/xvfb-run 2012-01-20 18:03:01.000000000 -0500
@@ -31,7 +31,7 @@

# Display a message, wrapping lines at the terminal width.
message () {
- echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS}
+ echo "$PROGNAME: $*" | fmt -w ${COLUMNS:-$DEFCOLUMNS}
}

# Display an error message.
@@ -69,10 +69,7 @@

# Find a free server number by looking at .X*-lock files in /tmp.
find_free_servernum() {
- # Sadly, the "local" keyword is not POSIX. Leave the next line commented in
- # the hope Debian Policy eventually changes to allow it in /bin/sh scripts
- # anyway.
- #local i
+ local i

i=$SERVERNUM
while [ -f /tmp/.X$i-lock ]; do
@@ -152,11 +149,12 @@
error "temporary directory $XVFB_RUN_TMPDIR already exists"
exit 4
fi
- AUTHFILE=$(tempfile -n "$XVFB_RUN_TMPDIR/Xauthority")
+ AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority"
+ touch "$AUTHFILE"
fi

# Start Xvfb.
-MCOOKIE=$(mcookie)
+MCOOKIE=$(dd if=/dev/urandom bs=1024 count=1 2> /dev/null | md5)
XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
add :$SERVERNUM $XAUTHPROTO $MCOOKIE
EOF

xvfb-run _unstable_ port .patch