--- lxr-cvs-0.9.5+cvs20071020.orig/initdb-mysql +++ lxr-cvs-0.9.5+cvs20071020/initdb-mysql @@ -35,7 +35,7 @@ create table lxr_releases (fileid int not null references lxr_files, `release` char(255) binary not null, - primary key (fileid,release) + primary key (fileid,`release`) ); create table lxr_useage --- lxr-cvs-0.9.5+cvs20071020.orig/ident +++ lxr-cvs-0.9.5+cvs20071020/ident @@ -30,7 +30,7 @@ use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; # if LXR modules are in ./lib use LXR::Common qw(:html); -use Local; +use LXR::Local; my $reference_hits; my $declare_hits; @@ -146,8 +146,8 @@ $templ, ( variables => \&varinputs, - identifier => sub { return $identifier }, - identifier_escaped => sub { $_ = $identifier; s/\"/"/g; return $_; }, + identifier => sub { $_ = $identifier; s//>/g; return $_; }, + identifier_escaped => sub { $_ = $identifier; s/\"/"/g; s//>/g; return $_; }, refs => sub { refexpand(@_) }, ) ) --- lxr-cvs-0.9.5+cvs20071020.orig/source +++ lxr-cvs-0.9.5+cvs20071020/source @@ -31,7 +31,7 @@ use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; # if LXR modules are in ./lib use LXR::Common qw(:html); -use Local; +use LXR::Local; sub diricon { my ($templ, $node, $dir) = @_; @@ -176,7 +176,7 @@ 'bgcolor' => sub { bgcolor(@_, $line++) }, 'css' => sub { rowclass(@_, $line++) }, 'description' => - sub { descexpand(@_, $node, $dir, $release) } + sub { Local::descexpand(@_, $node, $dir, $release) } ) ); } else { @@ -198,7 +198,7 @@ ? "In Attic " : "" ) - . descexpand(@_, $node, $dir, $release); + . Local::descexpand(@_, $node, $dir, $release); } ) ); @@ -224,7 +224,7 @@ } # print the description of the current directory - print dirdesc($dir, $release); + print Local::dirdesc($dir, $release); # print the listing itself print(expandtemplate($templ, ('files' => sub { direxpand(@_, $dir) }))); --- lxr-cvs-0.9.5+cvs20071020.orig/Makefile +++ lxr-cvs-0.9.5+cvs20071020/Makefile @@ -0,0 +1,38 @@ +# Makefile written by cate@debian.org for Debian + +DESTDIR = + +BASE = $(DESTDIR)/var/lib/lxr-cvs +CGIDIR = $(DESTDIR)/usr/lib/cgi-bin/lxr/ +PERLDIR = $(DESTDIR)/usr/share/perl5 +BINDIR = $(DESTDIR)/usr/bin +ETCDIR = $(DESTDIR)/etc/lxr-cvs +EXDIR = $(DESTDIR)/usr/share/doc/lxr-cvs/examples + +DIRS = lib +CGIFILES = diff find ident search source +CONF = templates/html-dir.html templates/html-find.html \ + templates/html-head.html templates/html-ident-refs.html \ + templates/html-ident.html templates/html-search-glimpse.html \ + templates/html-search-swish.html templates/html-tail.html \ + templates/lxr.conf templates/lxr.css +BINFILES = genxref +EXFILES = initdb-mysql initdb-oracle.sql initdb-postgres \ + swish-e.conf notes + +build clean: + @echo Nothing to do. + +install: + install -d $(DESTDIR) $(DESTDIR)/usr/share/perl5 + install -d $(ETCDIR) $(CGIDIR) $(EXDIR) $(BINDIR) + install -d $(BASE) $(BASE)/index + cp -r lib/LXR/ $(DESTDIR)/usr/share/perl5 + cp Local.pm $(DESTDIR)/usr/share/perl5/LXR + cp $(CONF) $(ETCDIR) + install $(CGIFILES) $(CGIDIR) + install $(BINFILES) $(BINDIR) + cp $(EXFILES) $(EXDIR) + cp .htaccess $(EXDIR)/htaccess + cp .htaccess_cgi $(EXDIR)/htaccess_cgi + --- lxr-cvs-0.9.5+cvs20071020.orig/search +++ lxr-cvs-0.9.5+cvs20071020/search @@ -112,7 +112,7 @@ foreach my $glimpseline (@glimpselines) { last if ($i > $maxhits); - $glimpseline =~ s/$sourceroot//; + $glimpseline =~ s/\Q$sourceroot//; my ($file, $line, $text) = $glimpseline =~ /(.*?):\s*(\d+)\s*:(.*)/; next if $filetext and !filename_matches($filetext, $advanced, $casesensitive, $file); @@ -292,8 +292,8 @@ $templ, ( variables => sub { varinputs(@_) }, - searchtext => sub { return $searchtext }, - searchtext_escaped => sub { $_ = $searchtext; s/\"/"/g; return $_; }, + searchtext => sub { $_ = $searchtext; s//>/g; return $_; }, + searchtext_escaped => sub { $_ = $searchtext; s/\"/"/g; s//>/g; return $_; }, filetext_escaped => sub { $_ = $filetext; s/\"/"/g; return $_; }, advancedchecked => sub { return $advanced ? "checked" : "" }, casesensitivechecked => sub { return $casesensitive ? "checked" : "" }, --- lxr-cvs-0.9.5+cvs20071020.orig/genxref.1 +++ lxr-cvs-0.9.5+cvs20071020/genxref.1 @@ -0,0 +1,44 @@ +.TH "genxref" "1" "2007-11-20" "LXR" "LXR User Manual" + +.SH "NAME" +genxref \- generates LXR database cross-reference tokens + +.SH "SYNOPSIS" + +.B genxref +.RI [ option ... ] + +.SH "DESCRIPTION" + +The genxref program automatically generates LXR database cross-reference +tokens for a set of URL configuration blocks and source code versions. These +are both defined in the lxr.conf configuration file. Each "URL" is a separate +source tree; LXR separates and identifies these by their URL. Each "version" is +a different version of the source tree being indexed. See lxr.conf or +lxr.conf.template for configuring URLs and versions. + +.SH "OPTIONS" +Valid options are: +.br +.P +.HP +\-\-help Print a summary of the options. +.P +.HP +\-\-url=URL Generate tokens for the given URL configuration block. +.P +.HP +\-\-allurls Generate tokens for all URL configuration blocks. +.P +.HP +\-\-version=VERSION Generate tokens for the given version of the code. +.P +.HP +\-\-allversions Generate tokens for all versions of the code (default). +.P +.HP +\-\-reindexall Purges existing index data + +.SH "BUGS" +Report bugs at http://sourceforge.net/projects/lxr/. + --- lxr-cvs-0.9.5+cvs20071020.orig/.htaccess +++ lxr-cvs-0.9.5+cvs20071020/.htaccess @@ -2,17 +2,12 @@ order deny,allow - -deny from all - - - -deny from all - - SetHandler perl-script -PerlHandler Apache::Registry +# Apache 2 +PerlHandler ModPerl::Registry +# Apache 1.3: uncomment next line and comment the previous line +#PerlHandler Apache::Registry PerlSetEnv PERL5LIB lib ForceType text/html PerlSendHeader On --- lxr-cvs-0.9.5+cvs20071020.orig/diff +++ lxr-cvs-0.9.5+cvs20071020/diff @@ -30,7 +30,7 @@ use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; # if LXR modules are in ./lib use LXR::Common qw(:html); -use Local; +use LXR::Local; use FileHandle; sub htmlsub { --- lxr-cvs-0.9.5+cvs20071020.orig/debian/compat +++ lxr-cvs-0.9.5+cvs20071020/debian/compat @@ -0,0 +1 @@ +5 --- lxr-cvs-0.9.5+cvs20071020.orig/debian/lxr-cvs.links +++ lxr-cvs-0.9.5+cvs20071020/debian/lxr-cvs.links @@ -0,0 +1 @@ +etc/lxr-cvs/lxr.css usr/lib/cgi-bin/lxr/lxr.css --- lxr-cvs-0.9.5+cvs20071020.orig/debian/lxr-cvs.docs +++ lxr-cvs-0.9.5+cvs20071020/debian/lxr-cvs.docs @@ -0,0 +1,4 @@ +INSTALL +CREDITS.txt +BUGS +HACKING --- lxr-cvs-0.9.5+cvs20071020.orig/debian/lxr-cvs.install +++ lxr-cvs-0.9.5+cvs20071020/debian/lxr-cvs.install @@ -0,0 +1,7 @@ +debian/tmp/etc/lxr-cvs/* etc/lxr-cvs/ +debian/tmp/usr/bin/genxref usr/bin/ +debian/tmp/usr/lib/cgi-bin/lxr/* usr/lib/cgi-bin/lxr/ +debian/tmp/usr/share/doc/lxr-cvs/examples/* usr/share/doc/lxr-cvs/examples/ +debian/tmp/usr/share/perl5/LXR/* usr/share/perl5/LXR/ +debian/tmp/var/lib/lxr-cvs/index var/lib/lxr-cvs/ +debian/lxr-cvs.apache2 etc/apache2/conf.d/ --- lxr-cvs-0.9.5+cvs20071020.orig/debian/copyright +++ lxr-cvs-0.9.5+cvs20071020/debian/copyright @@ -0,0 +1,16 @@ +This package was debianized by Giacomo Catenazzi on +Thu, 3 Apr 2002 16:07:19 +0100. + +It was downloaded from http://sf.net/projects/lxr + +Upstream Authors: + Arne Georg Gleditsch + Per Kristian Gjermshus + Malcolm Box + Peder O. Klingenberg + Dawn Endico + +You are free to distribute this software under the terms of +the GNU General Public License. +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common-licenses/GPL-2 file. --- lxr-cvs-0.9.5+cvs20071020.orig/debian/lxr-cvs.dirs +++ lxr-cvs-0.9.5+cvs20071020/debian/lxr-cvs.dirs @@ -0,0 +1,7 @@ +etc/lxr-cvs +usr/bin +usr/lib/cgi-bin/lxr +usr/share/doc/lxr-cvs/examples +usr/share/perl5 +var/lib/lxr-cvs +var/lib/lxr-cvs/index --- lxr-cvs-0.9.5+cvs20071020.orig/debian/lxr-cvs.manpages +++ lxr-cvs-0.9.5+cvs20071020/debian/lxr-cvs.manpages @@ -0,0 +1 @@ +genxref.1 --- lxr-cvs-0.9.5+cvs20071020.orig/debian/README.Debian +++ lxr-cvs-0.9.5+cvs20071020/debian/README.Debian @@ -0,0 +1,128 @@ +lxr: Linux Cross-Reference Project for Debian +--------------------------------------------- + + +Upgrade from 0.9.2 or previous versions +--------------------------------------- + +There are a lot of changes in paths: +- Now the configuration and templates are in /etc/lxr-cvs +- genxref is in /usr/bin and you can run it from anywhere + +Upgrade from 0.9.4-1 +-------------------- + +In mysql5 "release" is a reserved word. In the 0.9.4-1 +release the field "release" in lxr database was renamed +"xrelease". So if you don't want to reinstall the database, +rename the field from "xrelease" to "release", as the upstream +solution. Upgrade from previous or later version doesn't +need name changes. + + +Dependencies +------------ + +The dependencies of this packages are complex, so I write a +small summary, with some recommendation for quick install. + +This packages need: +- a web server with CGI support or an apache server with mod_perl. + We recommend: apache2 with mod_perl. +- one of this databases: mysql, postgre or oracle. + We recommends a local mysql database +- a perl dbd interface to the choosed database, + i.e. libdbd-mysql-perl (mysql) or libdbd-pg-perl (postgre) + + +Setup +----- + +To have a running lxr, you need some more setup. + +NOTE: +This document tell you how to build a cross-reference to +the Linux kernels, with normal (non CVS) sources. +For other use and options, please check the original full +documentation in /usr/share/doc/lxr-cvs/INSTALL.gz + +The main configuration file is in /etc/lxr-cvs/lxr.conf + + +1) Set up the database. + + For MySQL: + Run 'mysql -u root' (if you have a mysql root password add -p' + and then read in the 'initdb-mysql' file using the command: + '\. /usr/share/doc/lxr-cvs/examples/initdb-mysql' + 'quit;'. + This will create the database and a user called lxr with access + rights to the database. + + For Postgresql: + Create a user for lxr and give the user permission to create databases: + createuser lxr + Create a database for lxr: + createdb -U lxr lxr + Initialize the database: + psql -U lxr lxr + \i /usr/share/doc/lxr-cvs/examples/initdb-postgres + Just ignore the errors about unimplemented functions. + + +2) Setup a directory with the kernel sources: + I.e. untar the various kernel sources in + /usr/src/linux-2.4.32 + /usr/src/linux-2.6.15 + ... + and create a file 'versions' in /usr/src/ + with the names: + linux-2.4.32 + linux-2.6.15 + ... + Note: You can use other directories, but in this case you should change + 'sourceroot' in /etc/lxr-cvs/lxr.conf + + +3) Edit the lxr configuration file. (/etc/lxr-cvs/lxr.conf) + + You should change the hostname (and aliases) so that it point + to your domain/IP address: + 'baseurl' => 'http://your.domain-name.tdl/lxr', + and eventually + 'baseurl_aliases' => [ 'http://mydebian/lxr', 'http://mydomain/lxr' ], + + You should also change 'dbname' if you use Postgres or Oracle databases. + The details are written just above the default setting. + + The other item should already be correct for simpler uses, + eventually you can change: + The directory of sources: + 'sourceroot' => '/usr/src', + The display name: + 'sourcerootname' => 'LXR Example', + The user and password of database user: + 'dbpass' => 'foo', + 'dbuser' => 'lxr', + + +4) Setup the http server. + + For apache2, check the file /etc/apache2/conf.d/lxr-cvs.apache2 + The default should be a working configuration. + If you use apache perl modules, change the file handler to + improve performance. + + +5) Build the cross-reference: + + do: + genxref --url=http://localhost/lxr --allversions + Replace the url to you URL, as in step 3). + Instead of --allversions you can use --version=linux-2.X.Y + + +On normal setup the lxr will be in: http://localhost/lxr/source + + + -- Giacomo Catenazzi , Wed, 16 Apr 2008 08:53:58 +0200 --- lxr-cvs-0.9.5+cvs20071020.orig/debian/lxr-cvs.lintian-overrides +++ lxr-cvs-0.9.5+cvs20071020/debian/lxr-cvs.lintian-overrides @@ -0,0 +1,3 @@ +# INSTALL.gz is mainly used to configure the web-application +# +lxr-cvs: package-contains-upstream-install-documentation --- lxr-cvs-0.9.5+cvs20071020.orig/debian/lxr-cvs.apache2 +++ lxr-cvs-0.9.5+cvs20071020/debian/lxr-cvs.apache2 @@ -0,0 +1,20 @@ +Alias /lxr /usr/lib/cgi-bin/lxr +#ScriptAlias /lxr /usr/lib/cgi-bin/lxr + + + Options All + AllowOverride All + + + + Options +ExecCGI FollowSymlinks + + + SetHandler cgi-script +# #PerlHandler Apache::Registry +# #PerlSetEnv PERL5LIB lib + + + + + --- lxr-cvs-0.9.5+cvs20071020.orig/debian/watch +++ lxr-cvs-0.9.5+cvs20071020/debian/watch @@ -0,0 +1,3 @@ +# See uscan(1) for format +version=3 +http://sf.net/lxr/lxr-(.+)\.tgz --- lxr-cvs-0.9.5+cvs20071020.orig/debian/rules +++ lxr-cvs-0.9.5+cvs20071020/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/tmp + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk + +DEB_DESTDIR = $(CURDIR)/debian/tmp/ --- lxr-cvs-0.9.5+cvs20071020.orig/debian/control +++ lxr-cvs-0.9.5+cvs20071020/debian/control @@ -0,0 +1,37 @@ +Source: lxr-cvs +Section: misc +Priority: extra +Maintainer: Giacomo Catenazzi +Build-Depends: debhelper (>= 5), cdbs +Standards-Version: 3.7.3 + +Package: lxr-cvs +Architecture: all +Depends: apache2|apache-ssl|apache-perl|apache|httpd-cgi, exuberant-ctags, + perl5, libfile-mmagic-perl, ${perl:Depends} +Recommends: mysql-server | postgresql, libdbd-mysql-perl | libdbd-pg-perl, +Suggests: swish-e (>= 2.1), libapache2-mod-perl2|libapache-mod-perl +Description: A general hypertext cross-referencing tool + The Linux Cross-Reference project is the testbed application of a general + hypertext cross-referencing tool. (Or the other way around.) + . + The main goal of the project is to create a versatile cross-referencing + tool for relatively large code repositories. The project is based on + stock web technology, so the codeview client may be chosen from the full + range of available web browsers. On the server side, the prototype + range of available web browsers. On the server side, the Apache webserver + with mod-perl is required. The prototype implementation is running on a dual + Pentium Pro Linux box.) + . + The main feature of the indexer is of course the ability to jump easily + to the declaration of any global identifier. Indeed, even all references + to global identifiers are indexed. Quick access to function declarations, + data (type) definitions and preprocessor macros makes code browsing just + that tad more convenient. At-a-glance overview of e.g. which code areas + that will be affected by changing a function or type definition should + also come in useful during development and debugging. + . + Other bits of hypertextual sugar, such as e-mail and include file links, + are provided as well, but is on the whole, well, sugar. Some minimal + visual markup is also done (using also Style sheets). + --- lxr-cvs-0.9.5+cvs20071020.orig/debian/changelog +++ lxr-cvs-0.9.5+cvs20071020/debian/changelog @@ -0,0 +1,125 @@ +lxr-cvs (0.9.5+cvs20071020-1.1) unstable; urgency=high + + * Non-maintainer upload by the Security Team. + * Backported upstream security fixes from current release (Closes: #584671). + * This update addresses the following security issues: + - CVE-2010-1448: reflected XSS via title tag on search page (Closes: #588036). + - CVE-2010-1625: reflected XSS in search results page (Closes: #588137). + - CVE-2009-4497: XSS via the i parameter of the ident script (Closes: #575745). + + -- Nico Golde Sat, 31 Jul 2010 15:57:41 +0200 + +lxr-cvs (0.9.5+cvs20071020-1) unstable; urgency=low + + * Update package version (last cvs was already based on 0.9.5) + * add debian/watch + * add /etc/apache2/conf.d/lxr, thanks Bill Gatliff (Closes: #467520) + * Quote regexp meta-characters, thanks Jean Parpaillon (Closes: #472992) + + -- Giacomo Catenazzi Wed, 16 Apr 2008 09:06:04 +0200 + +lxr-cvs (0.9.4.0.20071020-1) unstable; urgency=low + + * New upstream CVS release: support git repositories (closes: #449091) + * From Max Lapan: quote other new reserver word "release". + Thanks Max (closes: #430523, #411060) + * correct the symlink (closes: #420055) + + -- Giacomo Catenazzi Tue, 20 Nov 2007 23:09:28 +0100 + +lxr-cvs (0.9.4.0.20061001-2) unstable; urgency=low + + * Moved cgi scripts in /usr/lib/cgi-bin/lxr/ as policy 11.5 + * Restored the old database structure, and paths should + be stables, so now it can go in testing (closes: #355517) + + -- Giacomo Catenazzi Tue, 3 Oct 2006 22:34:32 +0200 + +lxr-cvs (0.9.4.0.20061001-1) experimental; urgency=low + + * New CVS upstream release. It correct the mysql5 support in + an alternate way, so the previous debian patch is removed. + + -- Giacomo Catenazzi Tue, 3 Oct 2006 09:18:22 +0200 + +lxr-cvs (0.9.4-1) unstable; urgency=low + + * WARNING: see /usr/share/doc/lxr-cvs/README.Debian if you upgrade + from an old verion (0.9.2 and previous), because of some changes + in configuration and structure + * New upstream release (Closes: #310729) + * Moved configuration files in /etc/lxr and binary files in /usr/bin + (Closes: #326467). + * Some small updates (policy, debhelper, ...) + * Support for mysql 5.0 + + -- Giacomo Catenazzi Fri, 24 Feb 2006 07:52:13 +0100 + +lxr-cvs (0.9.2-6) unstable; urgency=low + + * Correct a serious bug in the syntax of 'Recommends' line (Closes: #353106) + + -- Giacomo Catenazzi Fri, 17 Feb 2006 07:31:20 +0100 + +lxr-cvs (0.9.2-5) unstable; urgency=low + + * oops, I have introduced a typo in the dependences: + libapache2-mod-perl2 is spelled with a final '2'. + Thanks to Hal Finkel for the very fast report. + + -- Giacomo Catenazzi Tue, 27 Jan 2004 20:34:44 +0100 + +lxr-cvs (0.9.2-4) unstable; urgency=low + + * debian/control: Allow libapache2-mod-perl2 as an alternative to + libapache-mod-perl. Thanks to Hal Finkel! (Closes: #227615). + + -- Giacomo Catenazzi Mon, 26 Jan 2004 20:32:17 +0100 + +lxr-cvs (0.9.2-3) unstable; urgency=low + + * debian/control: Update the description: we support only Apache web server, + patch provided by Marek Habersack. Thanks! (closes: #219316) + * debian/control: Addes apache2 as supported web server + + -- Giacomo Catenazzi Mon, 17 Nov 2003 22:13:03 +0100 + +lxr-cvs (0.9.2-2) unstable; urgency=low + + * Updated to the newer Debian Policy and debhelper + * Copy also the .htaccess (closes: #176689) + * Updated/corrected the dependencies + + -- Giacomo Catenazzi Tue, 1 Apr 2003 21:29:16 +0200 + +lxr-cvs (0.9.2-1) unstable; urgency=low + + * New upstream release + * Added full support to swish-e (indexing) + + -- Giacomo Catenazzi Wed, 4 Sep 2002 13:53:30 +0200 + +lxr-cvs (0.9.1-1) unstable; urgency=low + + * New packages, new version: We maintain the old package + because it is still the only officially "stable", and + it requires less resources (no mysql!), but only this + branch is capable to handle projects and languages + outside the Linux kernel. + + + -- Giacomo Catenazzi Wed, 3 Apr 2002 15:32:01 +0200 + +lxr (0.3-2) unstable; urgency=low + + * Better documentation (closes: #79871) + * control: removed kernel-source dependence (closes: #79489) + + -- Giacomo Catenazzi Thu, 13 Sep 2001 15:56:37 +0200 + +lxr (0.3-1) unstable; urgency=low + + * Initial Release. + + -- Giacomo Catenazzi Thu, 2 Nov 2000 16:07:19 +0100 + --- lxr-cvs-0.9.5+cvs20071020.orig/lib/LXR/Config.pm +++ lxr-cvs-0.9.5+cvs20071020/lib/LXR/Config.pm @@ -27,8 +27,10 @@ require Exporter; use vars qw($AUTOLOAD $confname); +use vars qw($AUTOLOAD $confpath); $confname = 'lxr.conf'; +$confpath = '/etc/lxr-cvs/lxr.conf'; sub new { my ($class, @parms) = @_; @@ -54,7 +56,7 @@ } sub _initialize { - my ($self, $url, $confpath) = @_; + my ($self, $url) = @_; my ($dir, $arg); unless ($url) { --- lxr-cvs-0.9.5+cvs20071020.orig/lib/LXR/Common.pm +++ lxr-cvs-0.9.5+cvs20071020/lib/LXR/Common.pm @@ -42,7 +42,7 @@ %EXPORT_TAGS = ('html' => [@EXPORT_OK]); -require Local; +require LXR::Local; require LXR::SimpleParse; require LXR::Config; require LXR::Files; @@ -525,9 +525,13 @@ } sub clean_identifier { + # Cleans up the identifier parameter + # Result should be HTML-safe and a valid identifier in + # any supported language... + # Well, not Lisp symbols since they can contain anything my $id = shift; - $id =~ s/(^[\w`:.,]+).*/$1/ if defined $id; + $id =~ s/[^\w`:.,\-_ ]//g if defined $id; return $id; } @@ -625,6 +629,8 @@ return $config->sourcerootname . ' identifier search' . ($i ? ": $i" : ''); } elsif ($who eq 'search') { my $s = $HTTP->{'param'}->{'string'}; + $s =~ s//>/g; return $config->sourcerootname . ' general search' . ($s ? ": $s" : ''); } } --- lxr-cvs-0.9.5+cvs20071020.orig/lib/LXR/Index/Mysql.pm +++ lxr-cvs-0.9.5+cvs20071020/lib/LXR/Index/Mysql.pm @@ -71,16 +71,16 @@ . "where s.symid = i.symid and i.fileid = f.fileid " . "and f.fileid = r.fileid " . "and i.langid = d.langid and i.type = d.declid " - . "and s.symname = ? and r.release = ?"); + . "and s.symname = ? and r.`release` = ?"); $self->{indexes_insert} = $self->{dbh}->prepare( "insert into ${prefix}indexes (symid, fileid, line, langid, type, relsym) values (?, ?, ?, ?, ?, ?)" ); $self->{releases_select} = - $self->{dbh}->prepare("select * from ${prefix}releases where fileid = ? and release = ?"); + $self->{dbh}->prepare("select * from ${prefix}releases where fileid = ? and `release` = ?"); $self->{releases_insert} = - $self->{dbh}->prepare("insert into ${prefix}releases (fileid, release) values (?, ?)"); + $self->{dbh}->prepare("insert into ${prefix}releases (fileid, `release`) values (?, ?)"); $self->{status_get} = $self->{dbh}->prepare("select status from ${prefix}status where fileid = ?"); @@ -102,7 +102,7 @@ . "where s.symid = u.symid " . "and f.fileid = u.fileid " . "and u.fileid = r.fileid " - . "and s.symname = ? and r.release = ? " + . "and s.symname = ? and r.`release` = ? " . "order by f.filename"); $self->{decl_select} = $self->{dbh}->prepare( @@ -115,24 +115,24 @@ $self->{dbh}->prepare("delete from ${prefix}indexes " . "using ${prefix}indexes i, ${prefix}releases r " . "where i.fileid = r.fileid " - . "and r.release = ?"); + . "and r.`release` = ?"); $self->{delete_useage} = $self->{dbh}->prepare("delete from ${prefix}useage " . "using ${prefix}useage u, ${prefix}releases r " . "where u.fileid = r.fileid " - . "and r.release = ?"); + . "and r.`release` = ?"); $self->{delete_status} = $self->{dbh}->prepare("delete from ${prefix}status " . "using ${prefix}status s, ${prefix}releases r " . "where s.fileid = r.fileid " - . "and r.release = ?"); + . "and r.`release` = ?"); $self->{delete_releases} = - $self->{dbh}->prepare("delete from ${prefix}releases " . "where release = ?"); + $self->{dbh}->prepare("delete from ${prefix}releases " . "where `release` = ?"); $self->{delete_files} = $self->{dbh}->prepare("delete from ${prefix}files " . "using ${prefix}files f, ${prefix}releases r " . "where f.fileid = r.fileid " - . "and r.release = ?"); + . "and r.`release` = ?"); return $self; } --- lxr-cvs-0.9.5+cvs20071020.orig/templates/lxr.conf +++ lxr-cvs-0.9.5+cvs20071020/templates/lxr.conf @@ -7,23 +7,23 @@ # Path to glimpse executables. # Define this OR the swish-e variable depending which search engine you want to use. - 'glimpsebin' => '/info/lxr/bin/glimpse', - 'glimpseindex' => '/info/lxr/bin/glimpseindex', + #'glimpsebin' => '/info/lxr/bin/glimpse', + #'glimpseindex' => '/info/lxr/bin/glimpseindex', # Location of SWISH-E binary - 'swishbin' => '/usr/local/bin/swish-e', + 'swishbin' => '/usr/bin/swish-e', # Path to Exuberant Ctags executable - 'ectagsbin' => '/usr/bin/ctags', + 'ectagsbin' => '/usr/bin/ctags-exuberant', # Place where lxr can write temporary files 'tmpdir' => '/tmp', # Location of the Generic.pm config file - 'genericconf' => '/path/to/lib/LXR/Lang/generic.conf', + 'genericconf' => '/usr/share/perl5/LXR/Lang/generic.conf', # Location of the ectags.conf file - 'ectagsconf' => '/path/to/lib/LXR/Lang/ectags.conf', + 'ectagsconf' => '/usr/share/perl5/LXR/Lang/ectags.conf', # Paths for CVS module 'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin', @@ -31,13 +31,13 @@ { - # Configuration for http://192.168.1.3/lxr. + # Configuration for http://1ocalhost/lxr. # baseurl is used to select configuration block. - 'baseurl' => 'http://192.168.1.3/lxr', # Put your URL here + 'baseurl' => 'http://localhost/lxr', # Put your URL here # baseurl_aliases allows other URLs to be used to reach the site # comment this out if you do not want any aliases - 'baseurl_aliases' => [ 'http://localhost/lxr', 'http://mydomain/lxr' ], + #'baseurl_aliases' => [ 'http://mydebian/lxr', 'http://mydomain/lxr' ], 'virtroot' => '/lxr', # The bit after the / above 'variables' => { @@ -49,7 +49,7 @@ # This can come from a file, a function or be explicitly # ennumerated. # From a file: - 'range' => [ readfile('src/versions') ], + 'range' => [ readfile('/usr/src/versions') ], # Explicitly: # 'range' => [qw(v1 v2 v3.1 v4 experimental)], @@ -101,7 +101,7 @@ # }, # The default version to display - 'default' => '1.0.6' + 'default' => '2.6.18' }, # Define typed variable "a". First value is default. @@ -118,16 +118,16 @@ }, # Templates used for headers and footers - 'htmlhead' => 'html-head.html', - 'htmltail' => 'html-tail.html', - 'htmldir' => 'html-dir.html', - 'htmlident' => 'html-ident.html', - 'htmlident_refs' => 'html-ident-refs.html', - 'htmlfind' => 'html-find.html', - 'htmlsearch' => 'html-search-swish.html', + 'htmlhead' => '/etc/lxr-cvs/html-head.html', + 'htmltail' => '/etc/lxr-cvs/html-tail.html', + 'htmldir' => '/etc/lxr-cvs/html-dir.html', + 'htmlident' => '/etc/lxr-cvs/html-ident.html', + 'htmlident_refs' => '/etc/lxr-cvs/html-ident-refs.html', + 'htmlfind' => '/etc/lxr-cvs/html-find.html', + 'htmlsearch' => '/etc/lxr-cvs/html-search-swish.html', - 'sourcehead' => 'html-head.html', - 'sourcedirhead' => 'html-head.html', + 'sourcehead' => '/etc/lxr-cvs/html-head.html', + 'sourcedirhead' => '/etc/lxr-cvs/html-head.html', 'stylesheet' => 'lxr.css', # sourceroot - where to get the source files from @@ -138,7 +138,7 @@ # indexed-src/version2/... # The names of the version directories must match the values for the Version # variable above. - 'sourceroot' => '/home/malcolm/indexed-src', + 'sourceroot' => '/usr/src', # Alternatively, this can specify a CVS repository by setting the value to "cvs:" # followed by the path to the repository. Note this must be file accessible - remote @@ -160,7 +160,7 @@ # directories. # The name to display for this source tree - 'sourcerootname' => 'Example', + 'sourcerootname' => 'LXR Example', # # Any parameters to the source access method should be specified below. @@ -195,10 +195,10 @@ # 'dbprefix' => 'lxr_', # For using glimpse, the directory to store the .glimpse files in is required - 'glimpsedir' => '/path/to/glimpse/databases', + #'glimpsedir' => '/path/to/glimpse/databases', # Location of swish-e index database files if using swish-e - 'swishdir' => '/a/directory/here/', + 'swishdir' => '/var/lib/lxr-cvs/index/', # where to look for include files inside the sourcetree. This is used to hyperlink # to included files.