From: Andre-Littoz <ajl...@us...> - 2013-12-31 20:17:59
|
Update of /cvsroot/lxr/html/en/Tips In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26331/en/Tips Modified Files: tiperror500.shtml tipkernel.shtml tipnotextsearch.shtml tipreconstructdb.shtml tips.shtml Log Message: Switching to HTML5, step 3: 1.0+ installation and tips directories in en/ Index: tiperror500.shtml =================================================================== RCS file: /cvsroot/lxr/html/en/Tips/tiperror500.shtml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tiperror500.shtml 7 Nov 2013 16:17:52 -0000 1.1 +++ tiperror500.shtml 31 Dec 2013 20:17:56 -0000 1.2 @@ -1,18 +1,10 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> <!--#set var="pageLang" value="en" --> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> - <meta http-equiv="Content-Language" content="<!--#echo var="pageLang" -->"> - <title>Fixing LXR Error 500</title> - <link rel="stylesheet" type="text/css" href="/backstore/LXRweb.css"> - <link rel="icon" type="image/x-icon" href="/backstore/LXRlogo2.ico"> -</head> - -<body> - <!--#set var="pageHeaderTitle" value="Fixing Error 500 Without Reconfiguring" --> - <!--#set var="homePageHeader" value="0" --> - <!--#include virtual="/backstore/header.shtml" --> +<!--#set var="pageMetaTitle" value="Fixing LXR Error 500" --> +<!--#set var="pageHeaderTitle" value="Fixing Error 500 Without Reconfiguring" --> +<!--#set var="homePageHeader" value="0" --> +<!--#include virtual="/backstore5/header.shtml" --> +<!-- $Id$ --> +<section> <p class="comment"> You went through the pain of configuring LXR for your mammoth project which took <em>genxref</em> dozens of hours to index @@ -25,64 +17,75 @@ This may be fixed in a matter of seconds. </p> - <h2>Context</h2> - <ul> - <li class="normal"> + <section> + <h1>Context</h1> + <ul> + <li class="normal"> Your web server is <strong>Apache 2.2</strong>. - </li> - <li class="normal"> + </li> + <li class="normal"> <strong>LXR</strong> release is <strong>1.1 or higher</strong>. - </li> - <li class="normal"> + </li> + <li class="normal"> You configured through the <strong>configuration wizard</strong>. - </li> - </ul> + </li> + </ul> + </section> - <h2>Cause</h2> - <p class="normal"> + <section> + <h1>Cause</h1> + <p class="normal"> You disregarded the importance of question - </p> + </p> <pre class="shell"> Is your Apache version 2.4 or higher? [YES/no] > </pre> - <p class="normal"> + <p class="normal"> and pressed "return" because the default answer is correct for most of the preceding questions. For your defence, this insignificant-looking question is "lost" among others. - </p> - <h2>Consequence</h2> - <p class="normal"> + </p> + </section> + + <section> + <h1>Consequence</h1> + <p class="normal"> An <em>.htaccess</em> file containing configuration directives recognised by <strong>Apache 2.4</strong> or higher has been copied to your <em>LXR root directory</em>. <strong>Apache 2.2</strong> errors out when it encounters these directives. - </p> - <h2>Solution</h2> - <div class="boxed"> - <p class="normal"> + </p> + </section> + + <section> + <h1>Solution</h1> + <div class="boxed"> + <p class="normal"> <span class="caution">Caveat!</span> If you customised any xxx<em>-lxrserver.conf</em>, <em>apache2-require.pl</em> or <em>lxr.css</em> file, backup them before proceeding in order to be able to reload them without having to go through customisation again. - </p> - </div> + </p> + </div> + <p class="normal"> Rerun a new fake configuration with the wizard: + </p> <pre class="shell"> $ <kbd>./scripts/configure-lxr.pl --conf-out=dummy --script-out=dummy.sh</kbd> </pre> - <ul> - <li class="normal">Accept default answers to initial questions</li> - <li class="normal">Give arbitrary directory to text search engine + <ul> + <li class="normal">Accept default answers to initial questions</li> + <li class="normal">Give arbitrary directory to text search engine (does not need to exist) - </li> - <li class= "normal"><strong>Answer <code class="error">NO</code> + </li> + <li class= "normal"><strong>Answer <code class="error">NO</code> to the <em>Apache</em> version level</strong> - </li> - </ul> + </li> + </ul> <pre class="shell"> WARNING: output configuration file test has an unusual extension! Configure for single/multiple trees? [S/m] > @@ -96,23 +99,23 @@ Is your Apache version 2.4 or higher? [YES/no] > <kbd>n</kbd> --- Use 'buttons-and-menus' instead of 'link' interface? [YES/no] > </pre> - <p class="comment"> + <p class="comment"> When this point is reached, all server configuration files have been copied into <em>custom.d/</em> and <em>.htaccess</em> has been replaced by a fresh copy. - </p> - <p class="normal"> + </p> + <p class="normal"> You can either abort the rest of configuration by typing <em>ctl+</em>C (^C) or continue, accepting default answers and giving arbitrary directory, file or version names (which do not need to exist) to open questions. - </p> - <p class="normal"> + </p> + <p class="normal"> Erase files <em>dummy</em>, <em>dummy.ctxt</em> and <em>dummy.sh</em> from <em>custom.d</em>. - </p> - + </p> <p class="comment">You're done. Relaunch your browser.</p> - -<!--#include virtual="/backstore/footer.shtml" --> + </section> +</section> +<!--#include virtual="/backstore5/footer.shtml" --> Index: tipkernel.shtml =================================================================== RCS file: /cvsroot/lxr/html/en/Tips/tipkernel.shtml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- tipkernel.shtml 28 Aug 2012 07:00:14 -0000 1.5 +++ tipkernel.shtml 31 Dec 2013 20:17:56 -0000 1.6 @@ -1,19 +1,10 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- $Id$ --> -<html> <!--#set var="pageLang" value="en" --> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> - <meta http-equiv="Content-Language" content="<!--#echo var="pageLang" -->"> - <title>LXR Configuration for Linux Kernel</title> - <link rel="stylesheet" type="text/css" href="/backstore/LXRweb.css"> - <link rel="icon" type="image/x-icon" href="/backstore/LXRlogo2.ico"> -</head> - -<body> - <!--#set var="pageHeaderTitle" value="Configuring LXR for Linux Kernel Browsing" --> - <!--#set var="homePageHeader" value="0" --> - <!--#include virtual="/backstore/header.shtml" --> +<!--#set var="pageMetaTitle" value="LXR Configuration for Linux Kernel" --> +<!--#set var="pageHeaderTitle" value="Configuring LXR for Linux Kernel Browsing" --> +<!--#set var="homePageHeader" value="0" --> +<!--#include virtual="/backstore5/header.shtml" --> +<!-- $Id$ --> +<section> <p class="normal caution"> This tip works with LXR release 1.0 or higher because precise control on the rules application order required @@ -31,54 +22,59 @@ and <a href="/<!--#echo var="langPrefix" -->LxrConf/lxrconfmaps.shtml">how to dynamically remap file paths</a>. </p> - <h2>Standard include links</h2> - <p class="normal"> + + <section> + <h1>Standard include links</h1> + <p class="normal"> The Linux kernel has been ported on many computer architectures. However, there exists a single source tree encompassing both all possible "features" and "machines". - </p> - <p class="comment"> + </p> + <p class="comment"> Here, the word <em>feature</em> is used to mean the available "services", such as ACPI, I/O, network, memory management, … - </p> - <p class="normal"> + </p> + <p class="normal"> To be manageable, the source tree is organized in smaller directories, eventually containing sub-directories to keep things tidy: - </p> - <ul> - <li class="normal"><em>kernel/</em> main source</li> - <li class="normal"><em>init/</em> boot and initialisation</li> - <li class="normal"><em>include/</em> include definitions</li> - <li class="normal">many directories dedicated to "features" or "services"</li> - </ul> - <p class="normal"> + </p> + <ul> + <li class="normal"><em>kernel/</em> main source</li> + <li class="normal"><em>init/</em> boot and initialisation</li> + <li class="normal"><em>include/</em> include definitions</li> + <li class="normal">many directories dedicated to "features" or "services"</li> + </ul> + <p class="normal"> The <em>include/</em> directory itself has a similar organisation with many sub-directories named after the feature. Featureless definitions are stored in the <em>linux/</em> sub-directory. - </p> - <p class="normal"> + </p> + <p class="normal"> A typical source file begins like: - </p> + </p> <pre class="example"> #include <linux/capability.h> #include <linux/file.h> #include <linux/times.h> #include <net/sock.h> </pre> - <p class="normal"> + <p class="normal"> As can be seen, the <em>include/</em> directory is implicit. Its location is passed to the compiler through an option. We need then to mimic this to enable hyperlink construction under the <code>#include</code> directives. This is possible with an <code>'incprefix'</code> parameter in <em>lxr.conf</em>: - </p> - <div class="boxed"> + </p> + <div class="boxed"> <pre class="example"> , 'incprefix' => [ '/include' ] </pre> - </div> - <h2>Architecture links</h2> - <p class="normal"> + </div> + </section> + + <section> + <h1>Architecture links</h1> + <p class="normal"> Architecture-specific parts are stored in the <em>arch/</em> directory in their own sub-directories (<em>alpha/</em>, <em>arm/</em>, <em>powerpc/</em>, <em>x86/</em>, …). @@ -86,13 +82,13 @@ architecture-independent code. Instead, the directive is written <code>#include <asm/...></code> as in the following example: - </p> + </p> <pre class="example"> #include <linux/mount.h> #include <asm/uaccess.h> #include <asm/div64.h> </pre> - <p class="normal"> + <p class="normal"> The abstract <em>asm/</em> directory is mapped to a real architecture-directory by the configuration management system through an option specification given to the compiler. @@ -100,28 +96,28 @@ where all <em>.h</em> definitions are stored. If we are interested in the <em>arm</em> architecture, we can augment the above <code>'incprefix'</code> to: - </p> - <div class="boxed"> + </p> + <div class="boxed"> <pre class="example"> , 'incprefix' => [ '/include' , '/arch/arm/include' ] </pre> - </div> - <p class="normal"> + </div> + <p class="normal"> But what if we want to compare the <em>x86</em> version? Reconfiguring <em>lxr.conf</em> for a two-minute reading is not user-friendly. - </p> - <p class="normal"> + </p> + <p class="normal"> Happily, we can use a very handy LXR feature: <code>'maps'</code> with variable substitution. - </p> - <p class="normal"> + </p> + <p class="normal"> First, we create a variable whose value will be the target architecture (in fact, the name of the architecture sub-directory). Let us call it <code>'a'</code> for <em>architecture</em>: - </p> - <div class="boxed"> + </p> + <div class="boxed"> <pre class="example"> , 'variables' => { 'v' => { … } # Version variable (mandatory) @@ -131,67 +127,70 @@ } } </pre> - <p class="comment"> + <p class="comment"> At this stage, the <code>'range'</code> content must be manually typed. We incur the risk of omitting an architecture or entering a non-existing one. Further below, a tip is given to automatically collect an up-to-date list. - </p> - </div> - <p class="normal indent"> + </p> + </div> + <p class="normal indent"> When LXR is launched, this variable appears in the header area. Just select the target architecture and click the <em>Change</em> button to set the variable. - </p> - <p class="normal"> + </p> + <p class="normal"> Next, the architecture <code>'incprefix'</code> rule must be rewritten to reference a <em>virtual</em> architecture: - </p> - <div class="boxed"> + </p> + <div class="boxed"> <pre class="example"> , 'incprefix' => [ '/include' , '/arch/%=ARCH=%/include' ] </pre> - <p class="comment"> + <p class="comment"> The name <em>%=ARCH=%</em> has been chosen in the hope it will never be a real directory name. If it is ever encountered, the name must be changed, otherwise strange things might happen with the next parameter. - </div> - <p class="normal"> + </div> + <p class="normal"> Finally, a path rewrite rule is applied just before the test for file existence with the variable value as parameter: - </p> - <div class="boxed"> + </p> + <div class="boxed"> <pre class="example"> , 'maps' => [ '^/arch/%=ARCH=%/' => '/arch/$a/' ] </pre> - </div> - <h2>Sub-architecture links</h2> - <p class="normal"> + </div> + </section> + + <section> + <h1>Sub-architecture links</h1> + <p class="normal"> The above configuration parameters are satisfactory for the "classical" computer architectures, but clearly do not meet all requirements for the embedded architectures, such as <em>arm</em>. These present variants in processors, boards, peripheral chips, … which challenge an effective LXR configuration. - </p> - <p class="comment"> + </p> + <p class="comment"> The known architectures with variants in the 3.x kernel are <em>arm</em>, <em>avr32</em>, <em>blackfin</em>, <em>cris</em>, <em>mn10300</em> and <em>um</em>. Unhappily, there is no automatic identification method. - </p> - <p class="normal"> + </p> + <p class="normal"> Let us consider the <em>arm</em> case as an example. The Linux-arm implementation must cope with <em>machine</em> and <em>platform</em> variants. Two new variables are then created: - </p> - <div class="boxed"> + </p> + <div class="boxed"> <pre class="example"> , 'variables' => { 'v' => { … } # Version variable (mandatory) @@ -211,46 +210,46 @@ } } </pre> - <p class="comment"> + <p class="comment"> The <code>'when'</code> clause is a 1.0 feature preventing variable display outside a defined context. Here, the variables appear on screen only when variable <code>'a'</code> is equal to <code>arm</code>. - </p> - </div> - <p class="normal"> + </p> + </div> + <p class="normal"> The <em>machine</em>-specific files are referenced with <code>#include <mach/…></code> and they live in the <em>arch/arm/mach-xxx/include/mach/</em> directory where <em>xxx</em> is one of the values defined in <code>'arm_mach'</code>'s <code>'range'</code> (respectively <code>'arm_plat'</code> for <em>platform</em>-specific files). - </p> - <p class="normal"> + </p> + <p class="normal"> Leaving aside <code>'incprefix'</code> for the moment, the following rules would do the job at first thought: - </p> + </p> <pre class="example"> , 'maps' => [ '^/arch/arm/%=LEVEL2=%/' => '/arch/arm/mach-${arm_mach}/' , '^/arch/arm/%=LEVEL2=%/' => '/arch/arm/plat-${arm_plat}/' ] </pre> - <p class="normal caution"> + <p class="normal caution"> THIS IS WRONG! - </p> - <p class="comment"> + </p> + <p class="comment"> Because the effect of <code>'maps'</code> rules is cumulative: after application of the first rule, <code>%=LEVEL2=%</code> has been replaced and, consequently, the second rule never matches any more since <code>%=LEVEL2=%</code> has disappeared. - </p> - <p class="normal"> + </p> + <p class="normal"> This implies we must force two different include paths. The correct configuration is - </p> - <div class="boxed"> + </p> + <div class="boxed"> <pre class="example"> , 'incprefix' => [ '/include' , '/arch/%=ARCH=%/include' @@ -264,43 +263,47 @@ , '^/arch/arm/%=LVL2B=%/' => '/arch/arm/plat-${arm_plat}/' ] </pre> - </div> - <p class="comment"> + </div> + <p class="comment"> CAVEAT! Not all <em>machine</em>/<em>platform</em> combinations are valid. If some <code>#include</code> directives are not hyperlinked, check if variables <code>'arm_mach'</code> and <code>'arm_plat'</code> describe an existing configuration. - </p> - <p class="normal"> + </p> + <p class="normal"> Similar rules can be designed for the other architectures. - </p> + </p> + </section> - <h2><a name="archcollect">Automatic architecture enumeration</a></h2> - <p class="normal"> + <section> + <h1>Automatic architecture enumeration</h1> + <p class="normal"> Starting with release 1.0, LXR ships with a script which collects the architecture names and their variants. Launch it from the LXR root directory as: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>cd <em>/LXR/root/directory</em></kbd> <samp>$ </samp><kbd>./scripts/kernel-grab-vars.sh <em>/kernel/source/tree</em></kbd> </pre> - <p class="normal"> + <p class="normal"> Possible options are <code>--help</code>, <code>--verbose</code>, <code>--erase</code> and <code>--suffix=</code><em>s</em>. - </p> - <p class="normal"> + </p> + <p class="normal"> The script output is a collection of <em>*_list.txt</em> files in the <em>custom.d</em> directory suitable for automatic reading into the master configuration. - </p> + </p> + </section> - <h2>Putting it all together</h2> - <p class="normal"> + <section> + <h1>Putting it all together</h1> + <p class="normal"> The following parameters are recommended for Linux kernel browsing: - </p> + </p> <pre class="example"> , 'variables' => { 'v' => @@ -371,42 +374,43 @@ , '^/arch/um/%=LVL2A=%/' => '/arch/um/arch-${um_sys}/' ] </pre> - <p class="normal"> + <p class="normal"> This can be automatically generated by the initial configuration script: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>cd <em>/LXR/root/directory</em></kbd> <samp>$ </samp><kbd>./scripts/configure-lxr.pl --add --conf-out=lxr.conf lxrkernel.conf</kbd> </pre> - <p class="normal"> + <p class="normal"> Use option <code>--add</code> if you already configured LXR for another tree. If you intend to use LXR against the kernel source only, the complete configuration process is done with: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>./scripts/configure-lxr.pl --conf-out=lxr.conf lxrkernel.conf</kbd> </pre> - <p class="normal"> + <p class="normal"> If you gave a <code>--suffix=</code><em>s</em> to script <em>kernel-grab-vars.sh</em>, you must first manually change the default suffix to your custom suffix in this file. - </p> - <p class="normal"> + </p> + <p class="normal"> Remember to run script <em>initdb.sh</em> to create the associated database: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>./custom.d/initdb.sh</kbd> </pre> - <p class="normal"> + <p class="normal"> Copy the configuration file to its final destination: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>cp custom.d/lxr.conf lxr.conf</kbd> </pre> - <p class="normal"> + <p class="normal"> Everything is ready for <em>genxref</em>. - </p> - + </p> + </section> -<!--#include virtual="/backstore/footer.shtml" --> +</section> +<!--#include virtual="/backstore5/footer.shtml" --> Index: tipnotextsearch.shtml =================================================================== RCS file: /cvsroot/lxr/html/en/Tips/tipnotextsearch.shtml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tipnotextsearch.shtml 24 Jan 2013 19:36:30 -0000 1.1 +++ tipnotextsearch.shtml 31 Dec 2013 20:17:56 -0000 1.2 @@ -1,19 +1,10 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- $Id$ --> -<html> <!--#set var="pageLang" value="en" --> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> - <meta http-equiv="Content-Language" content="<!--#echo var="pageLang" -->"> - <title>Running LXR without Free-text Search</title> - <link rel="stylesheet" type="text/css" href="/backstore/LXRweb.css"> - <link rel="icon" type="image/x-icon" href="/backstore/LXRlogo2.ico"> -</head> - -<body> - <!--#set var="pageHeaderTitle" value="Running LXR without Free-text Search" --> - <!--#set var="homePageHeader" value="0" --> - <!--#include virtual="/backstore/header.shtml" --> +<!--#set var="pageMetaTitle" value="Running LXR without Free-text Search" --> +<!--#set var="pageHeaderTitle" value="Running LXR without Free-text Search" --> +<!--#set var="homePageHeader" value="0" --> +<!--#include virtual="/backstore5/header.shtml" --> +<!-- $Id$ --> +<section> <p class="comment"> As part of configuration verification, LXR always checks that one free-text search engine has been defined. @@ -26,14 +17,15 @@ search engine is available. </p> - <h2>Case 1: initial configuration (1.0 and higher)</h2> - <p class="comment"> + <section> + <h1>Case 1: initial configuration (1.0 and higher)</h1> + <p class="comment"> This is the usual case when you install LXR for the first time on a system without free-text search engine. - </p> - <p class="normal"> + </p> + <p class="normal"> Launch script <em>configure-lxr.pl</em> from your <em>LXR root directory</em>. - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>cd <em>/LXR/root/directory</em></kbd> <samp>$ </samp><kbd>./scripts/configure-lxr.pl --verbose</kbd> @@ -42,7 +34,7 @@ LXR root directory is <em>/home/myself/lxr</em> Configuration will be stored in <em>custom.d/lxr.conf</em> </samp></pre> - <p class="normal"> + <p class="normal"> The script proceeds with database configuration, then discovers it cannot reach any free-text search engine. This usually means the free-text search engines have been installed @@ -50,70 +42,72 @@ The script asks for the location and puts it into configuration parameters so that it may later be referenced. - </p> - <p> + </p> + <p> With adequate answers, the free-text search feature can be disabled without disturbing LXR operation. - </p> + </p> <pre class="shell"> <samp>Error: neither glimpse nor swish-e found in $PATH! Is your source tree stored in a VCS repository? (yes/NO) </samp><kbd>y</kbd> <samp>Since free-text search is not compatible with VCSes, you can continue</samp></pre> - <p class="normal"> + <p class="normal"> You can safely answer <code>Y</code> in all circumstances. - </p> - <p class="normal"> + </p> + <p class="normal"> If your tree is indeed in a VCS repository, this is the expected answer since free-text search is not compatible with VCS storage. - </p> - <p class="normal"> + </p> + <p class="normal"> If it is made of plain files, it is also safe because this answer is independent from the later questions about your tree characteristics. No internal inconsistency will result from this apparent contradiction. But you may also give the real (or default) answer then confirm the search engine does not exist: - </p> + </p> <pre class="shell"> <samp>Error: neither glimpse nor swish-e found in $PATH! Is your source tree stored in a VCS repository? (yes/NO) Does one of them exist in a non standard directory? (YES/no) </samp><kbd>n</kbd> <samp>Sorry: free-text search disabled</samp></pre> - <p class="normal"> + <p class="normal"> Configuration then proceeds as usual. - </p> - <p class="comment"> + </p> + <p class="comment"> With such a configuration, free-text search will always silently return zero results. "Silently" means you get no warning nor reminder for disabling the engine. - </p> + </p> + </section> - <h2>Case 2: later change or previous releases</h2> - <p class="comment"> + <section> + <h1>Case 2: later change or previous releases</h1> + <p class="comment"> This manual procedure is used on an active LXR when you remove the free-text search engine (because finally you do not need the feature) or after you reconfigure your computer (<em>e.g.</em> after a system upgrade without reloading the free-text search engine). - </p> - <p class="normal"> + </p> + <p class="normal"> Open configuration file <em>lxr.conf</em> with your favorite editor. Locate the parameter related to your free-text search engine in <em>Auxiliary tools subsection</em> (either <code>'glimpsebin'</code> or <code>'swishbin'</code>) and change its value to <code>'/bin/true'</code>: - </p> + </p> <pre class="example"> , 'glimpsebin' => '/bin/true' </pre> - <p class="normal"> + <p class="normal"> or - </p> + </p> <pre class="example"> , 'swishbin' => '/bin/true' </pre> - <p class="normal"> + <p class="normal"> If parameters <code>'glimpsedirbase'</code> or <code>'swishdirbase'</code> have not been initialized, give them a "neutral" value, @@ -122,15 +116,17 @@ you can use <em>/tmp</em>. But, when installing later a text search engine, do not forget to give them a real value. - </p> + </p> <pre class="example"> , 'glimpsedirbase' => '/tmp' </pre> - <p class="normal"> + <p class="normal"> or - </p> + </p> <pre class="example"> , 'swishdirbase' => '/tmp' </pre> + </section> -<!--#include virtual="/backstore/footer.shtml" --> +</section> +<!--#include virtual="/backstore5/footer.shtml" --> Index: tipreconstructdb.shtml =================================================================== RCS file: /cvsroot/lxr/html/en/Tips/tipreconstructdb.shtml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tipreconstructdb.shtml 23 Sep 2012 16:48:10 -0000 1.3 +++ tipreconstructdb.shtml 31 Dec 2013 20:17:56 -0000 1.4 @@ -1,19 +1,10 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- $Id$ --> -<html> <!--#set var="pageLang" value="en" --> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> - <meta http-equiv="Content-Language" content="<!--#echo var="pageLang" -->"> - <title>Reconstruction of LXR Databases</title> - <link rel="stylesheet" type="text/css" href="/backstore/LXRweb.css"> - <link rel="icon" type="image/x-icon" href="/backstore/LXRlogo2.ico"> -</head> - -<body> - <!--#set var="pageHeaderTitle" value="Reconstructing LXR Databases" --> - <!--#set var="homePageHeader" value="0" --> - <!--#include virtual="/backstore/header.shtml" --> +<!--#set var="pageMetaTitle" value="Reconstruction of LXR Databases" --> +<!--#set var="pageHeaderTitle" value="Reconstructing LXR Databases" --> +<!--#set var="homePageHeader" value="0" --> +<!--#include virtual="/backstore5/header.shtml" --> +<!-- $Id$ --> +<section> <p class="comment"> You went through a complete system upgrade and, even if you were cautious enough to save your private data @@ -32,50 +23,54 @@ <p class="normal caution"> Script <em>recreatedb.pl</em> ships with LXR 1.0 and higher. </p> - <h2>Required backup</h2> - <p class="normal"> + + <section> + <h1>Required backup before upgrade</h1> + <p class="normal"> The bare minimum needed to reconstruct the LXR server is the master configuration file <em>lxr.conf</em>. - </p> - <p class="normal"> + </p> + <p class="normal"> To mimimize the risk of inconsistency, save also the context file <em>lxr.ctxt</em> located in the <em>custom.d/</em> directory. - </p> - <p class="comment"> + </p> + <p class="comment"> Ideally, fully backup the <em>custom.d/</em> directory, principally if you indexed a kernel tree and used script <strong>kernel-vars-grab.sh</strong> to collect the architecture names. But the collection step can be done very quickly. - </p> - <h2>After upgrade</h2> - <p class="normal"> + </p> + </section> + <section> + <h1>After upgrade</h1> + <p class="normal"> The LXR configuration and database creation are replaced by the following procedure. - </p> - <ol> - <li>Reload the saved files - <p class="normal"> + </p> + <ol> + <li>Reload the saved files + <p class="normal"> As mentioned above, you need at least the master configuration file <em>lxr.conf</em> and the context file <em>lxr.ctxt</em>. Put them into the <em>custom.d/</em> directory. - </p> - <p class="comment"> + </p> + <p class="comment"> If you forgot to backup <em>lxr.ctxt</em>, it can be rebuilt from specific questions. But, BEWARE, if your answers do not match the initial context, you may end up with an inoperative LXR server. In that case, restart the procedure here with different answers. - </p> - </li> - <li>Run script <em>recreatedb.pl</em> - <p class="comment"> + </p> + </li> + <li>Run script <em>recreatedb.pl</em> + <p class="comment"> <span class="caution">IMPORTANT!</span> This script is designed to be run from the <em>LXR root directory</em>. Eventually type command: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>cd <em>/LXR/root/directory</em></kbd> </pre> @@ -96,75 +91,81 @@ *** scanning <em>/lxr/tree2</em> tree configuration section *** *** scanning <em>/lxr/tree3</em> tree configuration section *** </samp></pre> - <p class="normal"> + <p class="normal"> <em>recreatedb.pl</em> creates a script <em>custom.d/initdb.sh</em> containing SQL instructions to rebuild all databases corresponding to the trees described in the master configuration file. - </p> - </li> - <li>Recreate the databases + </p> + </li> + <li>Recreate the databases <pre class="shell"> <samp>$ </samp><kbd>./custom.d/initdb.sh</kbd> </pre> - <p class="comment"> + <p class="comment"> See the notes related to this script in the <a href="../1-0-InstallSteps/1-0-install3config.shtml#createdb"> configuration step </a>. - </p> - </li> - <li>Eventually, collect kernel architectures - <p class="normal"> + </p> + </li> + <li>Eventually, collect kernel architectures + <p class="normal"> Should one of your trees be the Linux kernel, launch kernel architecture enumeration with this <a href="tipkernel.shtml#archcollect">script</a>. - </p> - <p class="comment"> + </p> + <p class="comment"> This step is optional if you backed up <em>custom.d/</em> and you did not change the kernel source tree. - </p> - </li> - <li>Populate the databases + </p> + </li> + <li>Populate the databases <pre class="shell"> <samp>$ </samp><kbd>./genxref --allurls</kbd> </pre> - <p class="comment"> + <p class="comment"> This the only case where option <code>--allurls</code> is recommended. - </p> - <p class="normal caution"> + </p> + <p class="normal caution"> Under some unclear circumstances, reindexing PostgreSQL trees may fail. In that case, abort the running <em>genxref</em> with control-C and relaunch individual <em>genxref</em> from the failing tree: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>./genxref --url=... --reindexall</kbd> </pre> - <p class="comment"> + <p class="comment"> Option <code>--reindexall</code> is only necessary on the failing tree to force a clean database. - </p> - </li> - </ol> - <p class="normal"> + </p> + </li> + </ol> + <p class="normal"> Web server configuration is done as usual. See <a href="../1-0-InstallSteps/1-0-install5server.shtml">here</a>. - </p> + </p> + </section> - <h2>Advanced usage</h2> - <ul> - <li>Non-default operation - <p class="normal"> + <section> + <h1>Advanced usage</h1> + <section> + <h1>Non-default operation</h1> + <p class="normal"> Use <code>--help</code> option and experiment. - </p> - </li> - <li>Incomplete backup (<em>lxr.ctxt</em> not saved) - <p class="normal"> + </p> + </section> + <section> + <h1>Incomplete backup</h1> + <p class="comment"> +Incomplete backup here means <em>lxr.ctxt</em> has not been saved. + </p> + <p class="normal"> Script <em>recreatedb.pl</em> tries to restore a missing context (but does not save it to avoid creating a permanent inconsistency). This is done through a set of questions: - </p> + </p> <pre class="shell"> <samp>$ </samp><kbd>./scripts/recreatedb.pl --verbose custom.d/lxr.conf</kbd> <samp>ERROR: configuration context file <em>custom.d/lxr.ctxt</em> does not exist! @@ -186,12 +187,12 @@ Do you want to quit or manually restore context? [QUIT/restore]</samp> </pre> - <p class="normal"> + <p class="normal"> Choose the default <code>Q</code> answer to eventually add an <code>--lxr-ctx=</code> option to designate an existing context file in an unusual location. Answer <code>R</code> to enter the following interactive dialog: - </p> + </p> <pre class="shell"> <samp>The following questions are intended to rebuild the global databases options (which may be overridden in individual @@ -212,19 +213,18 @@ Did you give the same prefix to all tables? [YES/no] --- Common table prefix? [lxr_] </samp> </pre> - <p class="normal"> + <p class="normal"> After this dialog, <em>recreatedb.pl</em> proceeds as previously. - </p> - <p class="comment"> + </p> + <p class="comment"> Note that default operation is here <strong>multiple</strong> because trying to reconstruct the databases makes sense only when there are many. If you manage only one tree, it is much safer to reconfigure following the standard installation procedure. - </p> - </li> - </ul> - - -<!--#include virtual="/backstore/footer.shtml" --> + </p> + </section> + </section> +</section> +<!--#include virtual="/backstore5/footer.shtml" --> Index: tips.shtml =================================================================== RCS file: /cvsroot/lxr/html/en/Tips/tips.shtml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- tips.shtml 7 Nov 2013 16:17:52 -0000 1.4 +++ tips.shtml 31 Dec 2013 20:17:56 -0000 1.5 @@ -1,19 +1,10 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- $Id$ --> -<html> <!--#set var="pageLang" value="en" --> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> - <meta http-equiv="Content-Language" content="<!--#echo var="pageLang" -->"> - <title>LXR Tips</title> - <link rel="stylesheet" type="text/css" href="/backstore/LXRweb.css"> - <link rel="icon" type="image/x-icon" href="/backstore/LXRlogo2.ico"> -</head> - -<body> - <!--#set var="pageHeaderTitle" value="LXR Tips" --> - <!--#set var="homePageHeader" value="0" --> - <!--#include virtual="/backstore/header.shtml" --> +<!--#set var="pageMetaTitle" value="LXR Tips" --> +<!--#set var="pageHeaderTitle" value="LXR Tips" --> +<!--#set var="homePageHeader" value="0" --> +<!--#include virtual="/backstore5/header.shtml" --> +<!-- $Id$ --> +<section> <p class="normal"> This page will contain tips for better using LXR. Contribution is welcome. @@ -45,5 +36,5 @@ </p> </li> </ul> - -<!--#include virtual="/backstore/footer.shtml" --> +</section> +<!--#include virtual="/backstore5/footer.shtml" --> |