I've found the problem that was stopping builds on i386. It was because xvfb-run sets XAUTHORITY to ./Xauthority, which is fine as long as you don't change working directory - which we do in dmake!
I've modified xvfb-run to incorporate a fix and also remove the hardcoded
display :99. If we have no further problems I'll submit a patch to the
maintainer. For now I've made it into a script to be included in
debian/local/scripts.
So, now the build completes (it took about 8 hours on my 700Mhz PIII) and
the setup program is run. Unfortunately setup exits with return code 1 and
no explaination. I've looked though the Issuezilla and can't find anything
related to the problem. I tried using strace, but the only line which looks
vaguely suspicious is this one:
open("/tmp/sv003.tmp/setup_writerdb.rdb", O_RDWR) = -1 ENOENT (No such file or
directory)
I haven't found the place in the source that does this yet.
The other issue that I am aware of is that the build will hang during
configure if the JDK home directory is not found, because it asks the user
for input. I think we could prevent the hang by redirecting stdin from
/dev/null for the configure step, but I haven't tried it out. That would
stop the hang, but the warning messages that are subsequently generated do
not cause the build to stop. Really, we should stop if one of these
warnings is generated. Are there any takers for this job? The code that I
think needs to be looked at is in
openoffice-0.641c/build-tree/oo_641c_src/config_office/set_soenv:
if ( $Warning ne "" )
{ print "$Warning*";
print "$newline";
}
Well, have fun everyone making your machines get busy :) Don't forget, Jan
& I are often around the #debian-oo IRC channel on openprojects.
Thanks,
Chris
(Attached - patches against current build tree)
--
Chris Halls | Frankfurt, Germany
Yahoo:hagga12000 ICQ:36940860 MSN:[EMAIL PROTECTED]
--- /dev/null Thu Jan 1 01:00:00 1970
+++ openoffice-0.641c/debian/local/scripts/oo-xvfb-run Fri Mar 15 10:16:39 2002
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+# xvfb-run - run the specified command in a virtual X server
+
+# 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.
+
+set -e
+
+DISPLAYNUM=99
+AUTHFILE=$(pwd)/Xauthority
+STARTWAIT=3
+LISTENTCP="-nolisten tcp"
+unset AUTODISPLAYNUM
+
+usage()
+{
+ echo "Usage: $0 [OPTION]... [command]"
+ echo
+ echo "run specified X client or command in a virtual X server environment"
+ echo
+ echo " -a --auto-displaynum Try to get a free display number, starting
at --display-num"
+ echo " -f --auth-file=FILE File to store auth cookie
(default:./Xauthority)"
+ echo " -n --display-num=NUM Display number to use
(default:$DISPLAYNUM)"
+ echo " -l --listen-tcp Enable TCP port listening in the X server"
+ echo " -w --wait=DELAY Delay in seconds to wait for Xvfb to start
(default:$STARTWAIT)"
+ echo " -h --help Display this help and exit"
+}
+
+# Find free display number by looking at .X-lock files in /tmp
+find-free-display()
+{
+ i=$DISPLAYNUM
+ while [ -f /tmp/.X$i-lock ]; do
+ i=$(($i+1))
+ done
+ echo $i
+}
+
+# Parse command line
+ARGS=`getopt --options +af:n:lw:h \
+ --long
auto-displaynum,authority-file:,display-num:,listen-tcp,wait:,help \
+ --name "$0" -- "$@"`
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+
+eval set -- "$ARGS"
+while true ; do
+ case "$1" in
+ '-a'|'--auto-displaynum')
+ AUTODISPLAYNUM=y
+ ;;
+ '-f'|'--auth-file')
+ AUTHFILE="$2"
+ shift
+ ;;
+ '-n'|'--display-num')
+ DISPLAYNUM="$2"
+ shift
+ ;;
+ '-l'|'--listen-tcp')
+ LISTENTCP=
+ ;;
+ '-w'|'--wait')
+ STARTWAIT="$2"
+ shift
+ ;;
+ '-h'|'--help')
+ usage
+ exit 1
+ ;;
+ '--')
+ # end of options
+ shift
+ break
+ ;;
+ *)
+ echo "Internal error!"; exit 1;;
+ esac
+
+ shift
+done
+
+[ -n "$AUTODISPLAYNUM" ] && DISPLAYNUM=`find-free-display`
+
+# start Xvfb
+rm -f "$AUTHFILE"
+MCOOKIE=$(mcookie)
+XAUTHORITY="$AUTHFILE" xauth add :$DISPLAYNUM . $MCOOKIE > /dev/null
+XAUTHORITY="$AUTHFILE" Xvfb :$DISPLAYNUM -screen 0 640x480x8 $LISTENTCP \
+ > /dev/null &
+XVFBPID=$!
+sleep $STARTWAIT
+
+set +e
+
+# Check that server has not exited
+if ! kill -0 $XVFBPID; then
+ echo "Xvfb server has died" >&2
+ exit 1
+fi
+
+# start the command and save its exit status
+echo $@
+DISPLAY=:$DISPLAYNUM XAUTHORITY="$AUTHFILE" $@ 2>&1
+RETVAL=$?
+set -e
+
+# kill Xvfb and clean up
+kill $XVFBPID
+XAUTHORITY="$AUTHFILE" xauth remove :$DISPLAYNUM > /dev/null
+rm "$AUTHFILE"
+
+# return the executed command's exit status
+exit $RETVAL
--- openoffice-0.641c/debian/rules.orig Thu Mar 14 15:42:22 2002
+++ openoffice-0.641c/debian/rules Thu Mar 14 15:32:56 2002
@@ -42,6 +42,10 @@
#export DISPLAY=$(XDISPLAY)
export XAUTHORITY=
+# hacked xvfb-run automatically finds a display
+# and checks that Xvfb didn't die
+XVFB=$(CURDIR)/debian/local/scripts/oo-xvfb-run -a -w 5
+
# debhelper
export DH_COMPAT=2
export DH_OPTIONS
@@ -177,9 +181,9 @@
$(STAMP_DIR)/build.dmake: $(STAMP_DIR)/build.bootstrap
dh_testdir
- # Start Xvfb, run dmake and kill Xfvb
+ # Start Xvfb and run dmake
cd $(SOURCE_TREE) && \
- csh -c 'setenv HOME $(SOURCE_TREE); source $(ENVFILE); xvfb-run
dmake'
+ csh -c 'setenv HOME $(SOURCE_TREE); source $(ENVFILE); $(XVFB)
dmake'
touch $@
@@ -200,7 +204,7 @@
# run dmake with xfvb-run
cd $(SOURCE_TREE) && \
- csh -c 'setenv HOME $(SOURCE_TREE); source $(ENVFILE); cd $(PRJ) &&
xvfb-run $(SOLVER)'\
+ csh -c 'setenv HOME $(SOURCE_TREE); source $(ENVFILE); cd $(PRJ) &&
$(XVFB) $(SOLVER)'\
-echo Project $(PRJ) build successful
@@ -229,7 +233,7 @@
mkdir -p $(PKGOPENOFFICEDIR)
sed -e "s#DESTDIR#$(PKGOPENOFFICEDIR)#" debian/local/rsfile.global.txt
> debian/local/rsfile.txt
- LD_PRELOAD= xvfb-run
$(SOURCE_TREE)/instsetoo/$(ARCHBUILDDIR)/01/normal/setup
-R:$(CURDIR)/debian/local/rsfile.txt
+ LD_PRELOAD= $(XVFB)
$(SOURCE_TREE)/instsetoo/$(ARCHBUILDDIR)/01/normal/setup
-R:$(CURDIR)/debian/local/rsfile.txt
rm -f debian/local/rsfile.txt
touch $@
--- openoffice-0.641c/debian/setperms.orig Thu Mar 14 16:02:03 2002 +++ openoffice-0.641c/debian/setperms Thu Mar 14 16:03:05 2002 @@ -17,7 +17,7 @@ chmod 755 debian/scripts/$FILE done -for FILE in find-free-display; do +for FILE in oo-xvfb-run; do chmod 755 debian/local/scripts/$FILE done
pgpkKP04plKa8.pgp
Description: PGP signature

