installing lxr and configuring for gnome lxr using Ubuntu breezy

the lxr package uses glimpse for search. glimpse is not free, so we use the lxr-cvs package. This uses swish-e and a PG/MySql/Oracle/AnythingDBI backend.

install the lxr and the swish-e packages – I’m not sure why the lxr-cvs package is there, or why it exists. Looks like it is moving to a database backend which may be faster?

checkout the source cvs you want to use. I grabbed gnome in an evil way like this

for module in `cvs -z5 co -s | cut -d ' ' -f 1 ` ; do cvs -z5 co $module ; done

configure lxr.conf with proper directories and versions and stuff. The version part is stupid because it assumes you have a dir with subdirs of versions. If you just want to index 1 dir, use its parent as sourceroot and the dirname as version.

  • create postgresql db and user
  • configure the database for password auth
  • initialize the database for use with

createdb lxr ; createuser -A -D -P lxr # then type the password when prompted
echo local lxr all md5 >> /etc/postgresql/7.4/pg_hba.conf
invoke-rc.d postgresql-7.4 restart
psql -U lxr -f /var/lib/lxr-cvs/initdb-postgres lxr

then run lxrgen

cd /var/lib/lxr-cvs ; ./genxref --url=http://localhost/lxr