Archive for September 4th, 2007

Installing the Validator from CVS on Ubuntu

September 4th, 2007

Here are some notes on installing the validator, so you can test and work with the CVS version on Ubuntu Linux.

On my machine I use Eclipse which stores files in ~/workspace/ – all of my paths are based off of this, and I add an alias to apache so that all my eclipse projects are available at http://localhost/workspace/{project}

For my setup, I have checked out the validator source code in ~/workspace/validator/ which shows up at http://localhost/workspace/validator/. Modify the paths if your CVS checkout is in a different location.

To get a snapshot of the latest files for the validator you can use:
cvs -d :pserver:anonymous:anonymous@dev.w3.org:/sources/public checkout validator, which will create a validator directory with the latest files.

Make sure your apache configuration has includes enabled, and will process the cgi script — modify the /etc/apache2/apache2.conf file — sudo nano /etc/apache2/apache2.conf, and add the following:

# This is the directory where you have the validator's "check"
# script as well as its and *.html, *.css etc files.

<Directory /home/bbieber/workspace/validator/htdocs>
Options ExecCGI IncludesNOEXEC Indexes MultiViews FollowSymlinks
AllowOverride None
AddHandler server-parsed .html
AddCharset utf-8 .html
</Directory>

# Tell httpd that "check" is a CGI script.

<Location "/workspace/validator/htdocs/check">
SetHandler cgi-script
</Location>

Then, in the CVS files you have checked out, symbolically link the ‘check’ file within the htdocs directory:

cd htdocs
ln -s ../httpd/cgi-bin/check check

So that the file check -> ../httpd/cgi-bin/check


cd ../httpd
chmod +x check

Install the modules and dependencies:

sudo apt-get install opensp xmlto
sudo cpan install Config::General Encode::HanExtra Encode::JIS2K HTML::Encoding HTML::Template Test::Exception Class::Accessor Test::Builder Sub::Uplevel Test::Builder::Tester
wget http://superb-west.dl.sourceforge.net/sourceforge/openjade/OpenSP-1.5.2.tar.gz
gunzip OpenSP-1.5.2.tar.gz
tar -xvf OpenSP-1.5.2.tar
cd OpenSP-1.5.2
./configure
make
sudo make install
sudo cpan install SGML::Parser::OpenSP XML::LibXML Net::IP