OPENPKG(1)

NAME
openpkg - OpenPKG maintainance utility

VERSION
openpkg-tool XX-VERSION-XX

SYNOPSIS
openpkg index [-r resource] [-p platform] [-C cache.db] [-o index.rdf] [-c] [-i] dir ...

openpkg build [-R rpm] [-r repository] [-f index.rdf] [-u] [-U] [-z] [-Z] [-i] [-q] [-s] [-S] [-P priv-cmd] [-N non-priv-cmd] [-p platform] [-Dvar=val ...] [-E name ...] ([-a] [-A] | patternlist)

DESCRIPTION
openpkg is a frontend utility for maintaining an OpenPKG instance. It currenty provides indexing of RPM files (openpkg index) and automated recursive from-scratch installation and updating of existing RPM packages (openpkg build).

COMMANDS

  OPENPKG INDEX
openpkg index creates an XML/RDF based resource index for RPM .spec files in a source tree or from an RPM package repository. The index holds enough information to support an automated build process by openpkg build.

The following command line options exist:

-r resource
    The name of the resource stored in the index. The default is "OpenPKG-CURRENT/Source/".

-p platform
    openpkg index adds a platform attribute for binary RPMs. The attribute is built as %{arch}-platform-%{os} where %{arch} and %{os} are taken from the RPM header and platform is the value of the -p option. The default value is "unknown". This must be used to distinguish between platforms that support the same Architecture and OS name like various Linux distributions.

-C cache.db
    Cache all .spec files into this Berkeley-DB file when indexing source RPMs. The cache is refreshed automatically when the source RPMs are more recent than the cache entry.

-o index.rdf
    Name of the output XML/RDF file, default is to write to stdout.

-c  Compress output with bzip2. Use the -o option to specify a .bz2 suffix.

-i  The specified directories are RPM repositories. Build index over all .rpm files in these directories and all subdirectories. If a subdirectory already contains a 00INDEX.rdf or 00INDEX.rdf.* file then skip scanning the subdirectory, instead add a reference to the index file into the new index.

    Without this option the directories are source trees with a subdirectory per package and a package.spec file inside each subdirectory.

  OPENPKG BUILD
openpkg build writes a shell script to standard output that installs or upgrades software packages including all dependencies. Packages that are upgraded automatically trigger rebuilds of all packages that depend on the upgraded package ("reverse dependencies"). The dependency information is read from an index generated by openpkg index.

The following command line options exist:

-R rpm
    Specify a path to the installed OpenPKG rpm executable. Several other internal paths are deduced from the rpm path, so this should be something like %{l_prefix}/bin/rpm.

-r repository
    Specify a path to an RPM repository, this can be a URL or a directory path. The name of the package file is appended to this path. The default is to use a URL pointing to the OpenPKG FTP server.

-f index.rdf
    Specify a path to the primary XML/RDF index, this can be a URL or a file path. If the index contains references to aother indexes these are included automatically. The default is to use a URL pointing to the OpenPKG FTP server for the OpenPKG release you are using.

-u  The generated script will ignore binary RPMs that are stored on your system. Instead it will either fetch binary RPMs or rebuild from source RPMs fetched from the repository.

-U  The generated script will try to upgrade all selected packages including their dependencies to the most recent version.

-z  The generated script will rebuild all selected packages including their dependencies even when the most recent version is already installed.

-Z  openpkg build ignores all installed packages, the script will rebuild all selected packages from scratch. Note that this doesn't work together with the -a option.

-i  The generated script will ignore errors. However, if a build phase fails the install phase is still skipped.

-q  Ignore all reverse dependencies. ATTENTION: this might break already installed packages!

-s  Print a status map instead of the install script. The map consists of 3 columns: "old", "tag" and "new". "old" shows the installed version of a package or just the package name if no package of that name is installed and "new" shows the repository version of a package if it is considered for installation. "tag" has the following possible values:

    OK  The installed package is suitable and will not be touched.

    ADD There is no installed package yet.

    UPGRADE
        The installed package is outdated and requires an update.

    DEPEND
        The installed package needs rebuilding because one of its dependencies is rebuilt.

    MISMATCH
        The installed package needs rebuilding because it was build with different parameters.

    CONFLICT
        The required new package cannot be installed because it conflicts with some already installed package.

    UNDEF
        The package has an invalid or ambigous dependency.

-S  Similar to -s but also lists the newest versions in the repository. The following tag might appear in the map.

    NEW The package exists in the repository but isn't required yet.

-P priv-cmd
    Command prefix to use for install commands that require elevated privileges. The most common tool for this is sudo(8).

-N non-priv-cmd
    Command prefix to use for install commands that do not require elevated privileges. The most common tool for this is sudo(8).

-p platform
    The platform string that is matched against the index for binary packages. Default is to use the %{_target_platform} variable.

-Dvar=val
    Specify configuration options for all selected packages. This can be either -Dwith_xxx=yyy or just -Dwith_xxx, the latter is equivalent to a -Dwith_xxx=yes. The parameters are matched against selected packages that are already installed. If they do indicate a change the package is rebuild. There can be multiple -D options.

-E name
    Ignore a package with the specified name. This can be used to avoid upgrading to a broken package in the repository. There can be multiple -E options.

-a  Select all installed packages. Do not specify a pattern list together with the -a option.

-A  Select all packages in the repository. Do not specify a pattern list together with the -a option.

CONFIGURATION
openpkg build reads the configuration file $HOME/.openpkg/build. The file lists default options, one option per line and section tags of the form [prefix]. Options following such a tag are only evaluated if the selected RPM path matches the prefix so that you can define default options for multiple OpenPKG hierarchies.

CAVEATS
Parallel execution of openpkg build causes undefined effects.

SEE ALSO
rpm(8), sudo(8)

HISTORY
The openpkg index and openpkg build command was invented in November 2002 by Michael van Elst <mlelstv@dev.de.cw.net> under contract with Cable & Wireless Germany <http://www.cw.com/de/> for use inside the OpenPKG project <http://www.openpkg.org/>.

AUTHORS
 Michael van Elst
 mlelstv@dev.de.cw.net