Project

General

Profile

Adding LXR instances

Check the [Settings] / [Repository] settings to see what kind of repository it actually is.

Add the config stanza, with the script -- note that the LXR instance name should use
underscores not dashes, if there are dashes in the project name...

$ ssh cdcvs.fnal.gov 
$ cd /usr/local/admin
$ ./create_lxr_instance.sh 
usage: ./create_lxr_instance.sh instance_name user repository
  where instance for project fred is usually:
   fred
  where user for project fred is usually:
   p-fred 
  and repository for project fred is one of:
  * cvs:/cvs/projects/fred
  * git:/cvs/projects/fred
  * svn:http://cdcvs.fnal.gov/subversion/fred
$ ./create_lxr_instance.sh artdaq p-artdaq git:/cvs/projects/artdaq 
do: psql -c \i /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq -h fnalpgsprd -p 5436 cdcvs_redmine_prd mengel
do: mv /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/lxr.conf.new /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/lxr.conf
[root@ccdcvsvm admin]# psql -c \i /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq -h fnalpgsprd -p 5436 cdcvs_redmine_prd mengel
psql: FATAL:  Kerberos 5 authentication failed for user "cdcvs_redmine_prd" 
[root@ccdcvsvm admin]# psql -c '\i /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq' -h fnalpgsprd -p 5436 cdcvs_redmine_prd 
psql: FATAL:  Kerberos 5 authentication failed for user "root" 
[root@ccdcvsvm admin]# psql -c '\i /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq' -h fnalpgsprd -p 5436 cdcvs_redmine_prd mengel

These errors are from drop sequence and drop table commands, it is good that they're not there yet :-)

psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:1: ERROR:  sequence "artdaq_lxr_filenum" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:2: ERROR:  sequence "artdaq_lxr_symnum" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:3: ERROR:  sequence "artdaq_lxr_declnum" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:4: ERROR:  table "artdaq_lxr_files" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:5: ERROR:  table "artdaq_lxr_symbols" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:6: ERROR:  table "artdaq_lxr_indexes" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:7: ERROR:  table "artdaq_lxr_releases" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:8: ERROR:  table "artdaq_lxr_usage" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:9: ERROR:  table "artdaq_lxr_status" does not exist
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:10: ERROR:  table "artdaq_lxr_declarations" does not exist
CREATE SEQUENCE
CREATE SEQUENCE
CREATE SEQUENCE
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:22: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "artdaq_lxr_files_pkey" for table "artdaq_lxr_files" 
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:22: NOTICE:  CREATE TABLE / UNIQUE will create implicit index "artdaq_lxr_files_filename_revision_key" for table "artdaq_lxr_files" 
CREATE TABLE
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:29: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "artdaq_lxr_symbols_pkey" for table "artdaq_lxr_symbols" 
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:29: NOTICE:  CREATE TABLE / UNIQUE will create implicit index "artdaq_lxr_symbols_symname_key" for table "artdaq_lxr_symbols" 
CREATE TABLE
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:36: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "artdaq_lxr_declarations_pkey" for table "artdaq_lxr_declarations" 
CREATE TABLE
CREATE TABLE
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:52: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "artdaq_lxr_releases_pkey" for table "artdaq_lxr_releases" 
CREATE TABLE
CREATE TABLE
psql:/fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/initdb-postgres-artdaq:64: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "artdaq_lxr_status_pkey" for table "artdaq_lxr_status" 
CREATE TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
$  mv /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/lxr.conf.new /fnal/ups/db/../prd/lxr/v0_9_8/Linux-2/lxr/lxr.conf

Then check http://cdcvs.fnal.gov/lxr/artdaq and see ifyou can browse source

Then index the instance:

$ . /fnal/ups/etc/setups.sh
$ setup lxr
$ cd $LXR_DIR/lxr

$ ./genxref --url=http://cdcvs.fnal.gov/lxr/artdaq --version=head --reindexall
*** / head
*** /artdaq/ head
*** /artdaq/Application/ head
*** /artdaq/Application/MPI2/ head
*** /artdaq/Application/MPI2/BoardReaderApp.cc head
--- /artdaq/Application/MPI2/BoardReaderApp.cc head 3643814795f07381f4dc9b82870261d0b16dfe3e
--- /artdaq/Application/MPI2/BoardReaderApp.cc 1
...

Now check the webpage again, browse to a source file, follow a symbol link...

Then add it to /var/www/html/lxr/index.html