Chapter 5. Installing LPMtool

Table of Contents

1. Initial LPMtool installation

Before building LPMtool, the libbzip2, zlib, and GDBM libraries and development files must be installed first. The RPM2 Perl module also must be installed, when using an RPM-based platform.

Note

It's not sufficient to have just the runtime bzip2, zlib, and GDBM libraries. The full bzip2, zlib, and GDBM development toolkits must be installed. They are usually packaged separately as additional devel packages.

If an older version of LPMtool is already installed, the new version can be built and installed directly from the source code tarball:

lpbuild --srcbuild lpmtool-version.tar.bz2

 ...

lpm -u lpmtool*.i386.lp   # use x86_64 for Opteron, etc...

Note

This only works with Linux distributions known to LPMtool's configuration script (see NEWS). Additionally, if the system distribution has been updated to a newer release, run the above sequence of commands again, a second time. This is because the new version of LPMtool was built by a version for the older distribution. New packages built by LPMtool will now be tagged with the correct, newer release tag, but LPMtool's own package still carries the old release tag (because the version of LPMtool used to build it was for the older distribution release).

If the Linux distribution is not known to LPMtool's configuration script, the best thing to do is come up with a short script fragment that detects the distribution, and submit a patch.

Note

The lpmtool-gnome package gets built by lpm only if an older lpmtool-gnome package is currently installed.

1. Initial LPMtool installation

Use the following procedure to install LPMtool for the first time.

  1. Unpack the source code:

    bunzip2 -cd <lpmtool-version.tar.bz2 | tar xf -
    
    cd lpmtool-version
    
  2. Additional software packages must be installed in order to build the optional lpmtool-gnome package, the optional graphical front end to LPMtool. The additional packages should be available, prepackaged, for all major systems. They are: Python, PyGTK2, Gnome bindings for Python (usually called the gnome-python2 package) including the gtkhtml2 widget (the gnome-python2-gtkhtml2 package), and the desktop-file-utils package from freedesktop.org.

    Installing and uninstalling packages requires root privileges. On Fedora-based Linux system, lpmtool-gnome will use the usermode package to prompt for the root password, if invoked by a non-root user. lpmtool-gnome will also work on non-Fedora systems (provided that a freedesktop.org-compatible Gnome desktop is present), but will have limited functionality, if invoked by a non-root user.

  3. Run the Configure script:

    ./Configure [gnome]
    

    This is Configure with the uppercase C. Configure runs LPMtool's configuration script with the default options; runs make to build a bootstrap version of LPMtool's lpm command; then uses it to rebuild LPMtool in its own package, then bootstrap-installs LPMtool.

    Configure takes an optional parameter - a single word gnome. This parameter must be specified to build the optional lpmtool-gnome package.

    The Configure script might need customization. Browse this very short script before running it. It should be able to bootstrap LPMtool on a relatively modern Linux system. Other platforms may require adjustments to the options passed to the configure script.

  4. The Configure script issues a prompt for the root password at the very end of the process. Enter the root password, when prompted, to create a LPMtool package repository and install the initial LPMtool package.

  5. When the script is done, run the mklpmcompat command, as root, to import RPM's dependencies into LPMtool. On platforms that don't use RPM, run the mksyscompat script, after reading its manual page and tweaking its configuration file.