Update of /cvsroot/leaf/doc/howto
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1076

Added Files:
        apkg-howto.xml 
Log Message:
initial version


--- NEW FILE: apkg-howto.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://docbook.org/xml/4.1.2/docbookx.dtd";>
<article>
  <articleinfo>
    <title>apkg User Guide</title>

    <authorgroup>
      <author>
        <firstname>K.-P.</firstname>

        <surname>Kirchdoerfer</surname>

        <affiliation>
          <address><email>kapeka at users.sourceforge.net</email></address>
        </affiliation>
      </author>

      <author>
        <firstname>Eric</firstname>

        <surname>Spakman</surname>

        <affiliation>
          <address><email>espakman at users.sourceforge.net</email></address>
        </affiliation>
      </author>
    </authorgroup>

    <revhistory>
      <revision>
        <revnumber>1.0</revnumber>

        <date>August 2006</date>

        <revremark>Initial document</revremark>
      </revision>
    </revhistory>
  </articleinfo>

  <section id="apkg">
    <title>About apkg</title>

    <section>
      <title>What is apkg?</title>

      <para><filename>apkg</filename> is the tool for package management and
      configuration backup in the <ulink
      
url="http://leaf.sourceforge.net/mod.php?mod=userpage&amp;menu=910&amp;page_id=36";>Bering-uClibc</ulink>
      branch of LEAF. It is first introduced with version 3.0 of Bering-uClibc
      and replaces the aged <filename>lrpkg</filename> scripts.</para>

      <para><filename>apkg</filename> simplifies configuration saving, is
      extendable and eases package updates. The most visible difference is
      that all changes to the various configuration files and directories are
      saved in configdb.lrp. Modules are saved in moddb.lrp.</para>
    </section>

    <section>
      <title>Acknowledgments and Thanks</title>

      <para>Eric Spakman re-wrote "apkg" as a replacement for lrpkg. His work
      is based on David Douthitt, Nathan Angelacos and Natanael Copa's efforts
      towards a more advanced package management tool.</para>
    </section>

    <section>
      <title>Saving your configuration</title>

      <para>The "<computeroutput>LEAF configuration menu</computeroutput>" is
      the first screen you'll see after login. You can always start it from
      the shell prompt with the <command>lrcfg</command> command. In this menu
      you'll find in the lower right corner the commands to save
      configurations ("<command>s</command>) Save config") and backup the
      modules ("<command>m</command>) Backup modules).</para>

      <para>The first one will save all changed configuration files and
      directories. You can change the options "always writing to /tmp before
      /mnt" and the confirmation question before writing the lrp to your
      storage media in <filename>/etc/config.cfg</filename>. Setting CWRT to
      "off" allows you to save your completly configured box with only two
      keystrokes ("<command>s</command>" and "<command>m</command>" )</para>
    </section>

    <section>
      <title>apkg command line options</title>

      <para>apkg supports the following commands:</para>

      <itemizedlist>
        <listitem>
          <para>-i [path]&lt;package&gt; install package</para>
        </listitem>

        <listitem>
          <para>-u [path]&lt;package&gt; upgrade package</para>
        </listitem>

        <listitem>
          <para>-c [path]&lt;package&gt; list contents of package</para>
        </listitem>

        <listitem>
          <para>-l [&lt;package&gt;] list installed packages; if
          &lt;package&gt; given, tell if it is installed</para>
        </listitem>

        <listitem>
          <para>-h this help</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Upgrading packages</title>

      <para>The new package and configuration management alleviate upgrading
      packages. You can copy a new version of a package to your storage media
      and with reboot the new version is loaded (from the &lt;package&gt;.lrp)
      and your previous configuration, cause the configuration files in the
      package are overwritten by those saved earlier in
      <filename>configdb.lrp</filename>.</para>

      <para>You can also use the <command>apkg -u</command> upgrade command,
      created by Cedric Schieli. When <command>apkg -u</command> in invoked,
      the user will be prompted for each changed configuration file - you can
      keep the old file, install the new file, view a diff or edit a merged
      version. If a configuration file has not changed between two releases
      (e.g. no new defaults, no new options etc), the file modified by the
      user will be kept without asking.</para>

      <note>
        <para>The new package has to be copied to the storage media before the
        upgrade to survive a reboot and for the same reason the config has to
        be saved after the upgrade.</para>
      </note>
    </section>

    <section>
      <title>More insights for developers and interested users</title>

      <para>Every package has a <filename>&lt;package&gt;.local</filename>
      file with files listed which shall be saved. At startup (linuxrc) the
      sha1 sums of everything listed in the
      <filename>&lt;package&gt;.local</filename> file are calculated and saved
      in <filename>&lt;package&gt;.sha1</filename> files. This part is done
      with a "find", so also directories can be listed in
      <filename>&lt;package&gt;.local</filename> files. Only use directories,
      when this directory is unique for the package, otherwise the content is
      processed multiple times which cost time and processing power. During
      backup the sha1sums of the files in memory are compared with the saved
      *.sha1 sums, new files are detected and duplicates are filtered out. For
      example: when one package has an etc/ppp directory in
      <filename>&lt;package&gt;.local</filename> and another one an
      <filename>etc/ppp/dsl-providers</filename> file listed, the
      <filename>dsl-provider</filename> file would be find twice and also
      stored twice in the configdb. Changed files are saved in
      <filename>configdb.lrp</filename> with a "full" backup, this is dynamic
      so installing (or removing) a package will also be taken into account.
      The first device in the PKGPATH list is used as backup device. The
      configdb and moddb will always loaded last by linuxrc. This loading is
      automatic so there is no need to specify configdb and moddb in the
      packages list. Modules system, a very simple implementation: The
      complete /lib/modules directory is backuped to
      <filename>moddb.lrp</filename> and the /lib/modules/'kernel version' is
      excluded. This also means that the <filename>modules.lrp</filename>
      package now only contains the insmod logic and no modules.</para>
    </section>
  </section>
</article>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to