<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" >

<chapter id="chapter07">
  <chapterinfo>
    <othername>$Author: igor $</othername>
    <date>$Date: 2013-05-26 15:01:55 -0400 (Sun, 26 May 2013) $</date>
  </chapterinfo>

  <title>Overall editing policy</title>
  <?dbhtml filename="chapter07.html"?>

  <para>This section needs further development. Suggestions are welcome.</para>

  <section id="ch07-apps">
    <title>Adding Applications</title>

    <para>To be developed.  Discussion will center on when should new apps be
    added to the book.</para>

  </section>

  <section id='ch07-build-instructions'>
    <title>Build Instructions</title>

    <para>When developing instructions to build a package, the editor should
    recommend a preferred build method &mdash; one that is reliable, stable,
    and performs well. The editor uses his best judgment to determine the
    appropriate switches and methodology for the typical user in each section.
    In some cases, the number of options is large and there should be a note
    placed in the text to tell the user to consult other documentation for
    additional options.</para>

  </section>

  <section id="ch07-optimization">
    <title>Optimization</title>

    <para>Generally custom optimization beyond the application's default
    optimization should not be encouraged.  It generally causes more problems
    than it is worth. In some cases, certain optimizations may be recommended,
    but this should be done with appropriate explanations/warnings.</para>

  </section>

  <section id="ch07-patches">
    <title>Patches</title>

    <para>Patches are maintained in a separate patches svn repository. All BLFS
    editors have commit privileges to this repository. To check out the patch
    tree, start in an empty directory and run:</para>

<screen><userinput>svn co svn+ssh://svn.linuxfromscratch.org/patches/trunk LFS-Patches</userinput></screen>

    <para>and then use normal svn procedures for updating/adding patches.</para>

    <para>When inserting a patch in the book, or changing an existing patch,
    the first choice is to point to the package originator's site. If a custom
    patch is needed for BLFS, it should be placed in the appropriate location
    of the patches repository. A patch must always go in a directory of the
    same name as the base package without revision numbers. For instance, all
    mysql patches go in the mysql directory of the patches repository.</para>

    <para>The location of BLFS patches in the book will always be at 
    &amp;patch-root;.  The location is updated twice a day automatically when 
    the book renders.</para>

  </section>

  <section id="ch07-scripts">
    <title>Scripts</title>

    <para>To be developed.</para>

    <section id="ch07-bootscripts">
      <title>Editing/Adding Bootscripts</title>

      <para>When you make an update to the bootscripts there are three
      things that need to be done:</para>

      <itemizedlist>

        <listitem><para>The actual update to the bootscripts. Edit the scripts
        to enhance their functionality or fix bugs or even create new bootscripts
        in case there are new packages the bootscripts belong to.</para></listitem>

        <listitem><para>Update the ChangeLog file in the bootscripts. Note that
        there is a separate changelog for the bootscripts. The actual book
        changelog doesn't need an update.</para></listitem>

        <listitem><para>Update the "blfs-bootscripts-version" entity in the
        book's general.ent file.</para></listitem>

      </itemizedlist>

      <note><para>If you fail to do #3, then the automated process which
      creates a new version of the bootscripts tarball won't do its job, so #3
      is an important step in the process.</para></note>

    </section>

  </section>

  <!-- commenting this out for now as we don't update Anduin
       any longer. It is done by Justin on the main server
       and then Anduin is synced via Rsync

  <section id="ch07-anduin">
    <title>BLFS Packages</title>

    <para>The BLFS project has a web/ftp site at anduin.linuxfromscratch.org.
    This site is a repository for all the packages with build instructions in
    BLFS. When adding or upgrading a package in the book, the new package
    should be placed in the appropriate directory there, generally <filename
    class='directory'>/srv/ftp/BLFS/SVN/&lt;section&gt;</filename>; the section
    should generally be consistent with the first character of the package
    name, but there are some specialized directories for some of the larger
    packages. All files should have a group of <systemitem
    class="groupname">blfseditors</systemitem> and have 664 permissions.</para>

    <para>If necessary, repackage the source code as a .bz2 file before
    upgrading. Old versions of the package should be deleted. Also create a
    separate file that contains the md5sum of the tarball:</para>

<screen><userinput>md5sum packagename.tar.bz2 > packagename.tar.bz2.md5sum</userinput></screen>

    <para>If a package has multiple files or patches, they should all be placed
    in the same directory and md5sums calculated for all files:</para>

<screen><command>rm packagename*md5sum
md5sum packagename-x.x* > packagename-x.x.md5sums</command></screen>

  </section>
  -->

  <section id="ch07-tagging">
    <title>Adding Tags</title>

    <itemizedlist>
      <!-- <listitem>
        <para>acronym &mdash; a word formed from the initial letter or letters
        of each of the successive parts or major parts of a compound term. Try
        to avoid using this tag inside other inline tags as it really does not
        add any additional value and the XML becomes hard to read.</para>
      </listitem> -->

      <listitem>
        <para>filename &mdash; a filename, a fully qualified file name, a
        directory (use class="directory"), a library file (use
        class="libraryfile").</para>

        <para>Other extensions that may be used are extension, devicefile,
        headerfile, partition and symlink. These are not normally used, but
        could be used to define a file type.</para>
      </listitem>
      <listitem>
        <para>systemitem &mdash; similar to filename, but for items that aren't
        files. Examples are user names (use class="username"), groups (use
        class="groupname"), filesystems (use class="filesystem"), etc.</para>
      </listitem>
      <listitem>
        <para>envar &mdash; an environmental variable, can be common or
        temporary.</para>
      </listitem>
      <listitem>
        <para>command &mdash; used to tag commands names, commands (with their
        parameters) in the "Command Explanations" section, or commands that are 
        optional.</para>
      </listitem>
      <listitem>
        <para>userinput &mdash; encapsulates commands when it is
        expected that the user is required to input the command exactly as
        specified. Used mainly in screen blocks.</para>
      </listitem>
      <listitem>
        <para>option &mdash; Should be used in the flow text when command
        options are written without the command, as use
        &lt;option&gt;-q&lt;/option&gt; for quiet operation. It is also used
        in the "Commands Explanations" sections for optional switches.</para>
      </listitem>
      <listitem>
        <para>application &mdash; The proper name of the package.</para>
      </listitem>
      <listitem>
        <para>screen &mdash; This creates a 'verbatim' environment that
        allows spacing to be controlled. Mainly used when a simulated 
        console is desired. It can be encapsulated by &lt;para&gt; tags but 
        provides little value, try to avoid this.</para>
      </listitem>
      <listitem>
        <para>replaceable &mdash; used with screen to encapsulate text that
        is not to be typed as seen or copy and pasted. The text should be
        encapsulated in angle brackets '&lt;&gt;' (typed as
        <emphasis>&amp;lt;</emphasis> and <emphasis>&amp;gt;</emphasis> in the
        XML).</para>
      </listitem>
      <listitem>
        <para>literal &mdash; used with userinput in screen sections to 
        encapsulate text that will be used to create (or to be added to) a 
        text file. This text will display in the book with the same spacing,
        indentation and line lengths as used in the XML.</para>
      </listitem>
      <listitem>
        <para>emphasis role="strong" &mdash; used to emphasize some word when 
        there is no other appropriate tag that can be used or when an
        assumption is made in the instructions that may not always be true. For
        example, your network connection is on
        &lt;emphasis role=strong&gt;eth0&lt;emphasis&gt;.  Especially prior to
        giving script instructions using that assumption.</para>
      </listitem>
      <listitem>
        <para>parameter &mdash; used primarily in the command explanations
        section for items that are not commands but used in the installation
        commands provided by the book. An example of this use is when explaining
        <command>configure</command> switches.</para>
      </listitem>
    </itemizedlist>

    <note>
      <para>There are several ways to use the userinput, command, option,
      replaceable, parameter, envar, constant, varname, etc., tags.  Don't over
      do it. In some cases, the tags will not change the output and will make
      editing the XML text more difficult. Generally, a single set of tags
      around a block of text is sufficient.</para>
    </note>

  </section>

</chapter>
