LXR-0.11.1 + glimpse-4.18.6 on Fedora 15… reading linux kernel 0.12

Recently I’m reading linux kernel 0.12. I setup lxr+glimpse on my Fedora 15 node.
Following is the steps:

1. Prepare…

with following packages installed:

2. Install glimpse…
http://webglimpse.net/trial/glimpse-4.18.6.tar.gz

download/congfigure/make/make install
If any package lost, use yum/cpan to install.
You can inst as default(/usr/local)…
I use prefix=/usr/suse/lxr/glimpse

3. Install lxr…
http://sourceforge.net/projects/lxr/
I download lxr-0.11.1.tgz, no necessary to compile
extra/untar the package and

4. Configuration…
I configure a single tree here.

.htaccess file will be generated into lxrroot, no need to modify…
config file will be generated into lxrconf.d/

5. handle the configuration files…
modify apache-lxrserver.conf,   erase following caret:  “alias ^/lxr” –> “alias /lxr”

mysql import lxrconf.d/initdb-mysql-custom.sql with correct user/passwd/dbname.
6. copy lxrconf.d/lxr.conf to ${LXRROOT} and configure…
I paste a copy of my lxr.conf here
lxr.conf

 

7. prepare some templates html file, ensure httpserver can access the files…

 

8. all ready..

ln or cp folder of kernel0.12 here, name as “0.12”

9. go to folder ${LXRROOT}, generate Index…

we can see records into db…

10. re/start httpd server.
access http://localhost/lxr/source

all should be ok now…

[debug]
1. Cannot show ident correctly, httpd server errorlog shows
[Thu Jul  5 18:24:33 2012] warning: LXR::Template, line 105: Template file ‘htmlident’ => ‘/usr/suse/lxr/lxr/http/html-ident.html’ does not exist
[Thu Jul  5 18:24:33 2012] fatal: ModPerl::ROOT::ModPerl::RegistryPrefork::usr_suse_lxr_lxr_ident, line 188: ‘htmlident’ template not configured at /usr/suse/lxr/lxr/ident line 188, <FILETYPE> line 4.

just ensure lxr.conf matches step#7. and give folder html enough privilege.

2. No need to copy ${LXRROOT}/lib files to other perl @INC path.
/etc/httpd/conf.d/apache-lxrserver.conf will call following file to include…
/usr/suse/lxr/lxr/lxrconf.d/apache2-require.pl

—————————-

Well , glimpse here can be replaced with swish-e, I have another post to provide swish-e RPMs for fedora15/16.
Any problems on similar configuration, plz feel free to drop me a message.

-s

 

[update] Aug.17th

About the “src” folder:
In the configure file, writes:

 

I didnt comment out “range ” values  for new versions of linux kernel contains such code.

 

About the Step8. first time I use  “>” and when new version trees come, I use “>>” instead.. like following

So, if other users who dont handle version intro with this file, please just  configure above code, and hard-code modify “range” array.

above I mentioned “ln or cp”  trees here, just as Andre suggested it’s not a good idea to put source code inside the app folder.
well I’m now not installing lxr in a standard prefix(like: /usr/local/ or /usr/), so I would like the data integrated

I place source code trees  in other place and use soft link to keep update.

I think the soft link is alternatively a good choice to avoid data loosing when app update/deinstall.

And of course when new install/upgrade needed, I think we can move away the src folder and softlink back here.

 

About the err mesg#1  and step7. on folder “/lxr/lxrconf.d/html/”

here I didnt successfully configured the server as I didnt grant enough privilege to the “/lxr/lxrconf.d/html/” dir. it’s why failed.
I mv the folder to “/lxr/http” and grant privilege, it’s ok to access now.

I think it ok not move the folder, just chown/chmod to give enough privilege to let httpserver to access the folder.
My change is not a must, I just think it ok to delete dir “”/lxr/lxrconf.d/” after server successfully running.  and the server not rely on this folder now.

and before step#7,  invoke  “cd ” to  ${LXRROOT}, already updated.

 

Thanks Andre pointing out these issues,

-s

 

7 thoughts on “LXR-0.11.1 + glimpse-4.18.6 on Fedora 15… reading linux kernel 0.12”

  1. Step 8: it is a very bad idea to mix LXR and sources in the same directory. You’ll get into trouble when you install a newer version (the source tree might be deleted by the -future- automatic installation scripts). Also, you don’t isolate your source tree from LXR and LXR from your source tree.

    From a method point of view, you adversely modify your source tree with command ‘echo “0.12” >version’. What if directory src already contains a ‘version’ file? It is much wiser to stuff the version identification into lxr.conf. After all, according to your lxr.conf, this is where LXR takes version information (the readfile() line is commented out). You can remove the ‘echo’ command.

    From the error message 1. and step 7 (if you did not type another ‘cd’ command between steps 5 and 7), you made a mistake in ‘htmlident’ => …/lxr/http/… Configuration should read …/lxr/lxrconf.d/html/…

    ajlittoz
    LXR administrator

  2. You can have even stronger separation. In your change, you still have a source directory /usr/suse/suse/src and links from there to the actual directories.

    You already have /codes/linux. There is no need to keep ${LXRROOT}/src since LXR can access any file in the system (if permissions allow it). All you have to do is configure ‘sourceroot’ => ‘/codes/linux’.

    What you must understand is the difference between LXR doing its job and the web server emitting the HTML pages. LXR is just an ordinary process launched by the web server. As such, given an absolute file path of the local computer, it can read this file if permissions are at least ——r-x (chmod 005 — that’s stupid, of course, since it’s better to give it also to owner and group, i.e. r-xr-xr-x or 555). LXR processes the file and sends HTML code to the web server. When pages are assembled, the HTML-links can reference only HTML objects that can be accessed from DocumentRoot, which is ${LXRROOT}. The only needed objects are scripts (source, diff, ident, search and showconfig), style sheets (either at the root level or in the templates/ directory or, if you like, your private lxrconf.d/) and pictures from LXRimages/. Only these HTML objects must be located in ${LXRROOT}.

    You could object that half your code versions are outside /codes/linux. You solve that with symbolic links (ln -s) in /codes/linux: linux-0.12 to /home/suse/workspace/kernel/linux-0.12 and linux-3.0-rc1 to … The version file must contain linux-0.12, etc and ‘default’ also. What is stuffed in ‘range’ is not real version numbers but sub-directory names. Consequently, you can use any name, but use a meaningful one.

    Note: if you give readfile() a relative path, it is rooted in ${LXRROOT}; if the name is absolute (starting with /), the file can be located anywhere in the computer.

    ajl

    1. Thanks Andre, I will pay more attentions to try to simplify to configurations and just make necessary files inside the $LXRROOT folder.

      Besides I name the src-tress just using ver#, because I’m now only using LXR to read linux-kernel-src, it’s too huge to read the plain text….

      -suse

  3. Hi,
    May I ask, did you try to install lxr on Fedora 17 or Feodora 18 ?
    I am getting a hell of mess with it and spent over two days with it.

    It will be great if anyone will post here a short message about a successful installation of lxr on Fedora 17 or Feodora 18 .

    rgs,
    Kevin Wilson

    1. Hi Kevin,

      sorry for the delay updates, just wonder that Fedora17/18 should also work here as I use sourcecode compile, plz ensure that essential RPMs installed before install lxr, or please paste your err msgs here I will update u asap.

      Anyway I will try to prepare a PDF for the steps detailed, wish I have time to.

      Regards,
      -suse

Leave a Reply to Andre Littoz Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.