OpenGrok 0.2.1 released!

This release fixes bugs reported in the initial release. Many thanks to Wez Furlong of PHP for finding a cross-site scripting issue; Despite hours spent on making it secure, I added a one debugging statement and forgot to remove it - that caused the issue :-( Wez also reported issues with CVS library which have been fixed. Andy Tucker suggested many improvements and reported bugs. Some of these were traced to bugs in exuberant ctags, and are noted in known issues.
OpenGrok 0.2.1 on Windows
Changes in 0.2.1
Bug fixes:
  1. Fixes a XSS security issue (reported by Wez Furlong)
  2. Fixes bug where some CVS revisions could not be retrieved
  3. Fixes bug in handling CVS long histories (reported by Wez Furlong)
  4. Handles extra characters in CVS symbol names (reported by Wez Furlong)
  5. More robust EFTAR file handling (reported by Andy Tucker)
  6. Throws more helpful error messages
  7. Tomcat 4.x compatibility fixes
  8. Minor fixes to hypertexting code that handles strings
  9. Fixed bug that ignored symlinked SRC_ROOT (reported by Michael Allen)
New Features:
  1. Now runs on Microsoft Windows
  2. A new CSS theme.
  3. Interim support for PHP and OpenSolaris Assembler code.
  4. Single distributable file to keep things simple
Compatibility Note: The DATA_ROOT files generated by 0.2 are compatible with this release. Changing the source.war parameters and redeploying should work. However to get full advantage, it is advisable to generate the data from scratch (i.e remove the old DATA_ROOT and run the run.sh again).

Known issues:
  1. Due to Exuberant ctags bug 1324663, OpenGrok might keep waiting for ctags. Workaround is to ignore the problem causing SQL files with -i option to OpenGrok.
  2. Due to Exuberant ctags bug 1187505 ctags fails to recognize certain definitions. So OpenGrok will not be able search these
  3. If the indexing using opengrok.jar (or run.sh) is interrupted in the middle, a lucene lock file is left over; next time you run the opengrok.jar, it would give an error message saying "Lock obtain timed out ...". It is OK to remove the lock file mentioned in the error message and run the indexer again, if no other processing is trying to update the Lucene index
Comments:

There is a bug in opengrok - the webapp url prefix is hardcoded to "/source/" in a bunch of places, for instance org/opensolaris/opengrok/analysis/c/CXref.java, analysis/plain/PlainXref.java... Can we have a configuration variable? Please? Other than that, it looks fantastic! Thank you!

Posted by Florin on December 07, 2005 at 02:11 AM PST #

It is in the list of TODOs. I have isolated hardcoding of the webapp context to only a few places(the Xref files you mentioned) and is much better than it used to be.

Posted by Chandan on December 07, 2005 at 05:39 AM PST #

Thanks for the windows fixes, Browsing and pathes works now. Is the history somehow broken? I get a 404 Error.

Posted by Fabian R. on December 12, 2005 at 09:35 PM PST #

I've gotten it running on a pretty large source tree and am very happy. The main issue I have has already been raised, the hardcoding of /source. I tried my own workaround but am unable to build the sources. I tried building the unmodified sources and run into many errors: Buildfile: build.xml
compile:
[javac] Compiling 66 source files to /sleepy1_eng/dwein/opengrok-0.2.1/build /classes
[javac] /sleepy1_eng/dwein/opengrok-0.2.1/src/org/opensolaris/opengrok/web/E ftarFile.java:56: error: Identifier expected.
[javac] public java.util.TreeMap<Long, Node> children;
[javac]
[javac] /sleepy1_eng/dwein/opengrok-0.2.1/src/org/opensolaris/opengrok/web/E ftarFile.java:56: error: Class or interface declaration expected.
[javac] public java.util.TreeMap<Long, Node> children;
[javac]
\^ [javac] /sleepy1_eng/dwein/opengrok-0.2.1/src/org/opensolaris/opengrok/web/E ftarFile.java:56: error: syntax error.

This is likely a basic environment problem, but since I am not a java programmer I am a bit lost in troubleshooting it.
[dwein@sleepy1 opengrok-0.2.1]$ javac -version
javac 1.5.0_06
Any tips are appreciated.

Posted by David on December 14, 2005 at 11:40 AM PST #

ant seems to be picking up Java 1.4. Please try setting your JAVA_HOME to directory where you have put Java 1.5 and verify that ant actually uses the Java 1.5 (<tt>truss -f -t exec ant</tt> on Solaris)
OpenGrok makes extensive use of new features in Java 1.5 like collections. I got the same errors as above when I used Java 1.4 to compile the sources.

Posted by Chandan on December 14, 2005 at 01:00 PM PST #

[bsergean@lisa1 opengrok-0.2.1]$ ctags --version Exuberant Ctags 5.5.4, Copyright (C) 1996-2003 Darren Hiebert Compiled: May 12 2004, 14:32:50 Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex [bsergean@lisa1 opengrok-0.2.1]$ [bsergean@lisa1 opengrok-0.2.1]$ [bsergean@lisa1 opengrok-0.2.1]$ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) [bsergean@lisa1 opengrok-0.2.1]$ java -jar opengrok.jar -s /share/common/src/wget-1.9/ /var/tmp/opengrok Error: executing ctags! null I tried to create the /var/tmp/opengrok directory but it doesn't change anything This error seems related to the following piece of code : try { BufferedReader cin = new BufferedReader(new InputStreamReader(ctagsProcess.getInputStream())); String ctagOut; if((ctagOut = cin.readLine()) != null && ctagOut.startsWith("Exuberant Ctags")) { System.setProperty("ctags", ctags); } else { System.err.println("Error: No Exuberant Ctags found in PATH!\\n" + "Please use option -c to specify path to a good Exuberant Ctags program"); System.exit(1); } } catch (Exception e) { System.err.println("Error: executing ctags! " + e.getLocalizedMessage()); System.exit(1); } If I give the -c /usr/bin/ctags if works like a charm ... If I run opengrok on /usr/include it ends after a while with PlainAnalyzerException in thread "main" java.lang.OutOfMemoryError: Java heap space I will google it to find how to tell the system to allow java to use more heap space. Thanks for this program that I hope will be of great help for me ...

Posted by Benjamin on December 18, 2005 at 06:10 AM PST #

It requires exuberant ctags; if you dont specify ctags with -c option, it picks the ctags in the path. On Solaris it happens to be the old /usr/bin/ctags which does not understand all the languages Exuberant ctags does. So using -c to override default ctags should work.

To increase java heap size use -XmsSIZE (eg -Xms128m) option. Run java -X for details. Indexing is a memory intensive job.

Posted by Chandan on December 18, 2005 at 08:21 AM PST #

Thanks for your feedback. What's weird is that my ctags was the one from /usr/bin which is in the PATH and should have been found, I am on a Linux box. I used another machine with more RAM to get rid of the memory problem, installed Tomcat and got a working opengrok on my machine. One small issue I had, which seems to be related to apache, which is strange since as Tomcat is started on another port it looks like it doesn't depend on a web server : I had to put my source files (SRC_DIR) under ~/public_html to be able to open them from a query result page displayed by an opengrok search. Otherwise I got an error message cannot open "foobar.c" I have only a poor knowledge of .htaccess stuff but it sounded related. I am missing something ? ps: sorry but my mozilla doesn't want to display nicely the messages I post.

Posted by benjamin on December 19, 2005 at 07:09 AM PST #

Tomcat runs independently of Apache or any other web-server. You can configure tomcat to run on port 80 (if you dont have a webserver already running) OpenGrok is totally independent of any webserver (like Apache) so .htaccess doesn't affect anything; it serves its own files. Files can be only be browsed from http://host:port/source/xref/... If you dont see it please check if the SRC_ROOT in web.xml is a complete absolute path readable by tomcat process.

If you already have an Apache running and want Apache to serve the requests, then there is mod_proxy in Apache. and that can make it look like http://host/source/... but you still need to run tomcat (or any other servlet container like jetty or GlassFish).

Posted by Chandan on December 19, 2005 at 07:25 AM PST #

Post a Comment:
Comments are closed for this entry.
About


sayings of an hearer

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today