FreeBSD web build failed on freefall.freebsd.org

Simon L. Nielsen simon at FreeBSD.org
Wed May 25 08:10:17 UTC 2005


On 2005.05.25 10:57:10 +0300, Alexey Zelkin wrote:

> Can somebody from nwww management group send me exact command line
> which is used to build www tree there ?  Simple attempt to build handbook
> with GEN_INDEX does not suffer from this problem, so deeper analyzis
> is required.
> 
> On Wed, May 25, 2005 at 06:39:04AM +0000, WWW pseudo-user wrote:
> [..]
> > /usr/local/bin/jade:/c/www/build/doc/ru_RU.KOI8-R/books/handbook/index.sgml:328:42:E: document type does not allow element "ULINK" here; missing one of "SEEIE", "SEEALSOIE", "SECONDARYIE" start-tag
> > *** Error code 1
> [..]

I could reproduce it when I tried the day the breakage started, but
when I tried yesterday I could not, but I did not have the time to
look into it.

Anyway, the main build scripts are attached here.

-- 
Simon L. Nielsen
-------------- next part --------------
#!/bin/sh
# Copyright (c) 2001 Wolfram Schneider <wosch at FreeBSD.org>
# Copyright (c) 2001 Dima Dorfman <dd at FreeBSD.org>
#
# Update the FreeBSD web site from the CVS repository.
#
#
# Major variables:
#
#	PATH		- The search path as interpreted by the shell.
#	CVSROOT		- Path to the FreeBSD CVS repository.
#	BUILDDIR	- Where the checked out copies of the files are stored.
#	DESTDIR		- Where the rendered copies should wind up.
#	LOGFILE		- Name of the log file to use (in $BUILDDIR).
#	BUILDARGS	- Arguments to pass to make(1) when {build,install}ing.
#	INSTARGS	- Arguments to pass to make(1) when installing.
#	WEBMAILTO	- Address to send mail to if the build fails.
#
#	subtrees	- List of directores in $BUILDDIR which are from CVS.
#
# Variables which are in uppercase are derived from the environment
# unless they don't exist, in which case a value suitable for
# www.FreeBSD.org is used.  Variables in lowercase can't be safely
# changed without editing other parts of the script; thus, their value
# in the environment is ignored.
#
# Exit codes:
#
#	0	- success
#	1	- unknown failure
#	2	- failure in CVS operations
#	3	- failure in make operations
#
# $FreeBSD: www/tools/webupdate,v 1.12 2004/08/21 10:39:28 hrs Exp $
#

#
# Default configuration.
#
DEFAULT_PATH=/bin:/usr/bin:/usr/local/bin;
DEFAULT_CVSROOT=/home/ncvs;
DEFAULT_BUILDDIR=/usr/local/www/build;
DEFAULT_LOGDIR=/usr/local/www/build/log;
DEFAULT_DESTDIR=/usr/local/www;
DEFAULT_LOGFILE=log.make.`date '+%d.%H'`;
DEFAULT_BUILDARGS='';
DEFAULT_INSTARGS='';
DEFAULT_WEBMAILTO=freebsd-doc;

#
# Variable setup.
#
PATH=${PATH:-${DEFAULT_PATH}}; export PATH;
CVSROOT=${CVSROOT:-${DEFAULT_CVSROOT}}; export CVSROOT;
BUILDDIR=${BUILDDIR:-${DEFAULT_BUILDDIR}};
LOGDIR=${LOGDIR:-${DEFAULT_LOGDIR}};
DESTDIR=${DESTDIR:-${DEFAULT_DESTDIR}};
LOGFILE=${LOGFILE:-${LOGDIR}/${DEFAULT_LOGFILE}};
BUILDARGS=${BUILDARGS:-${DEFAULT_BUILDARGS}};
INSTARGS="${BUILDARGS} ${INSTARGS:-${DEFAULT_INSTARGS}}";
WEBMAILTO=${WEBMAILTO:-${DEFAULT_WEBMAILTO}};

# Notes on the names of the release notes directories:
#
# - They weren't named the same way they will be on the web site
# (CURRENT, 4-STABLE) becuase that wouldn't make it obvious that they
# were release notes.
#
# - They weren't named after their path names in the repository
# (src/release/doc) because that doesn't play well with branches.
#
# - The '/doc' part is necessary because of the way doc.subdir.mk finds
# ${LANGCODE}.  It strips off the last component of ${.CURDIR} one by
# one and compares the last component to 'doc'.  When it finds it, it
# assumes that the directory right below that is the language code.
# This works fine if all the languages are in a directory called
# 'doc', and not at all if they aren't.
subtrees='www doc relnotes/doc relnotes/man4 relnotes5/doc relnotes5/man4 relnotes4/doc relnotes4/man4';

#
# Update the checked out copies.  Check out new copies every Sunday or
# if they don't exist.
#

# Only create $BUILDDIR if the directory right above it exists.
cd `dirname $BUILDDIR` || exit 1;
if [ ! -d $BUILDDIR ]; then
	mkdir $BUILDDIR;
fi
umask 002
cd $BUILDDIR || exit 1;

mkdir -p $LOGDIR
rm -f $LOGFILE 2>/dev/null;
touch $LOGFILE;

# XXX If one of the directories in $subtrees doesn't exist, *all* of
# them will be wiped and checked out again.  This should only happen
# if something went terribly wrong, or if there's a new entry in
# $subtrees, so I (dd) don't plan on fixing it; there's no sense in
# optimizing something that should only happen twice a year (if that).
cond="X`date '+%u'` = X7 `echo $subtrees | sed -E 's/([^ ]*)/-o ! -d \1/g'`";
if [ $cond ]; then
	# Remove the old copies.
	rm -Rf $subtrees 2>/dev/null;
	chflags -R noschg $subtrees 2>/dev/null;
	rm -Rf $subtrees 2>/dev/null;

	# Check out the new copies.  This creates all the $subtrees.
	cvs -qR checkout -P www >> $LOGFILE 2>&1 || exit 2;
	cvs -qR checkout -P doc >> $LOGFILE 2>&1 || exit 2;

	test -d relnotes || mkdir relnotes;
	cvs -qR checkout -Pd relnotes/doc src/release/doc >> \
		$LOGFILE 2>&1 || exit 2;
	cvs -qR checkout -Pd relnotes/man4 src/share/man/man4 >> \
		$LOGFILE 2>&1 || exit 2;

	test -d relnotes5 || mkdir relnotes5;
	cvs -qR checkout -Pd relnotes5/doc -rRELENG_5 src/release/doc >> \
		$LOGFILE 2>&1 || exit 2;
	cvs -qR checkout -Pd relnotes5/man4 -rRELENG_5 src/share/man/man4 >> \
		$LOGFILE 2>&1 || exit 2;

	test -d relnotes4 || mkdir relnotes4;
	cvs -qR checkout -Pd relnotes4/doc -rRELENG_4 src/release/doc >> \
		$LOGFILE 2>&1 || exit 2;
	cvs -qR checkout -Pd relnotes4/man4 -rRELENG_4 src/share/man/man4 >> \
		$LOGFILE 2>&1 || exit 2;
else
	cvs -qR update -dP $subtrees >> $LOGFILE 2>&1 || exit 2;
fi

#
# Build the web site.
#
cd $BUILDDIR/www/en || exit 1;

time make ${BUILDARGS} all >> $LOGFILE 2>&1 &&
    time make ${INSTARGS} DESTDIR=$DESTDIR install >> $LOGFILE 2>&1 ||
	(tail -50 $LOGFILE |
	 mail -s "FreeBSD web build failed on `hostname`" $WEBMAILTO;
	 exit 3) || exit 3;

gzip -f $LOGFILE
find $LOGDIR -mtime +60 -print0 | perl -n0e unlink

exit 0;
-------------- next part --------------
#!/bin/sh
#
# $Id: webupdate.wrapper,v 1.5 2005/01/05 12:34:03 simon Exp $

PATH=/bin:/usr/bin:/usr/local/bin
CVSROOT=/w/ncvs
DESTDIR=/usr/local/www/www.freebsd.org
WEBGRP=wwwadm
DOCGRP_OVERRIDE=wwwadm
PINDEX_OVERRIDE=/usr/local/www/ports/INDEX
GEN_INDEX=yes
export PATH CVSROOT DESTDIR WEBGRP DOCGRP_OVERRIDE PINDEX_OVERRIDE GEN_INDEX

WEBMAILTO=freebsd-doc at FreeBSD.org
BUILD_RELNOTES=YES
export WEBMAILTO BUILD_RELNOTES

logid=`date +%Y%m%d%H%M%S`
logdir=/usr/local/www/buildstat/data/${logid}
[ -d ${logdir} ] || mkdir -p ${logdir}
echo "ENGLISH_ONLY=${ENGLISH_ONLY}" >> ${logdir}/flags
echo "WITH_PORTS_GROWTH=${WITH_PORTS_GROWTH}" >> ${logdir}/flags
echo "WITH_PRSTATS=${WITH_PRSTATS}" >> ${logdir}/flags
echo "WEB_ONLY=${WEB_ONLY}" >> ${logdir}/flags
echo "BUILD_RELNOTES=${BUILD_RELNOTES}" >> ${logdir}/flags
echo "WEB_LANG=${WEB_LANG}" >> ${logdir}/flags

env supfile=wwwcvs-supfile /usr/local/www/bin/cvsup-mirror

/usr/bin/time -o ${logdir}/time /usr/local/www/bin/webupdate

echo "$?" > ${logdir}/retcode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20050525/e6d6ec83/attachment.sig>


More information about the freebsd-doc mailing list