## ## openpkg.pod -- OpenPKG maintainance utility (frontend manual page) ## ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH ## Copyright (c) 2000-2003 The OpenPKG Project ## Copyright (c) 2000-2003 Ralf S. Engelschall ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## =pod =head1 NAME B - B maintainance utility =head1 VERSION openpkg-tool XX-VERSION-XX =head1 SYNOPSIS B B [B<-r> I] [B<-p> I] [B<-C> I] [B<-o> I] [B<-c>] [B<-i>] I ... B B [B<-R> I] [B<-r> I] [B<-f> I] [B<-u>] [B<-U>] [B<-z>] [B<-Z>] [B<-i>] [B<-q>] [B<-s>] [B<-S>] [B<-M>] [B<-L>] [B<-W>] [B<-X>] [B<-K>] [B<-e>] [B<-P> I] [B<-N> I] [B<-p> I] [B<-D>I=I ...] [B<-E> I ...] ([B<-a>] [B<-A>] | I) =head1 DESCRIPTION B is a frontend utility for maintaining an B instance. It currenty provides indexing of RPM files (B) and automated recursive from-scratch installation and updating of existing RPM packages (B). =head1 COMMANDS =head2 OPENPKG INDEX B creates an XML/RDF based resource index for RPM F<.spec> files in a source tree or from an RPM package repository. The index holds enough information to support an automated build process by B. The following command line options exist: =over 4 =item B<-r> I The name of the resource stored in the index. The default is "C". =item B<-p> I B adds a platform attribute for binary RPMs. This must be unique to correctly identify a specific architecture, OS and build environment. =item B<-C> I Cache all F<.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. The B<-C> option requires an installed DB_File perl module. =item B<-o> I Name of the output XML/RDF file, default is to write to F. =item B<-c> Compress output with C. Use the B<-o> option to specify a F<.bz2> suffix. =item B<-i> The specified directories are RPM repositories. Build index over all F<.rpm> files in these directories and all subdirectories. If a subdirectory already contains a C<00INDEX.rdf> or C<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 IC<.spec> file inside each subdirectory. =back =head2 OPENPKG BUILD B 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 B. Packages are selected by providing a list of name patterns. Each pattern is either a package name or a prefix followed by a '*' character. Additionally you can append a discrimation prefix separated by a comma that matches against the full name-version-revision string. The following command line options exist: =over 4 =item B<-R> I Specify a path to the installed B C executable. Several other internal paths are deduced from the I path, so this should be something like I<%{l_prefix}>C. =item B<-r> I 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 B FTP server. =item B<-f> I 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 B FTP server for the B release you are using. =item B<-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. =item B<-U> The generated script will try to upgrade all selected packages including their dependencies to the most recent version. =item B<-z> The generated script will rebuild all selected packages including their dependencies even when the most recent version is already installed. =item B<-Z> B ignores all installed packages, the script will rebuild all selected packages from scratch. Note that this doesn't work together with the B<-a> option. =item B<-i> The generated script will ignore errors. However, if a build phase fails the install phase is still skipped. =item B<-q> Ignore all reverse dependencies. I =item B<-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: =over 4 =item OK The installed package is suitable and will not be touched. =item ADD There is no installed package yet. =item UPGRADE The installed package is outdated and requires an update. =item DEPEND The installed package needs rebuilding because one of its dependencies is rebuilt. =item MISMATCH The installed package needs rebuilding because it was build with different parameters. =item CONFLICT The required new package cannot be installed because it conflicts with some already installed package. =item UNDEF The package has an invalid or ambigous dependency. =back =item B<-S> Similar to B<-s> but also lists the newest versions in the repository. The following tag might appear in the map. =over 4 =item NEW The package exists in the repository but isn't required yet. =back =item B<-M> Similar to B<-s> but print a short dependency map. =item B<-L> Print a list of packages in the repository that depend on the target. =item B<-W> Include all conditional dependencies as if all possible configuration options had been switched on. This has little use except for generating an all-inclusive list with the B<-L> option. I therefore might fail or cause unusuable results!> =item B<-X> Ignore an installed XML parser module but use the internal simple text parser instead. =item B<-K> Keep packages that were installed temporarily during the build process. =item B<-e> Rebuild exact version from repository even when you have installed a newer version from another repository. =item B<-P> I Command prefix to use for install commands that require elevated privileges. The most common tool for this is sudo(8). If I starts with a dash it will be run without the dash and the command line it should execute is passed as a single quoted string. =item B<-N> I Command prefix to use for install commands that do not require elevated privileges. The most common tool for this is sudo(8). If I starts with a dash it will be run without the dash and the command line it should execute is passed as a single quoted string. =item B<-p> I The platform string that is matched against the index for binary packages. Default is an empty string so that no binary packages are matched. =item B<-D>I=I Specify configuration options for all selected packages. This can be either B<-D>CIC<=>I or just B<-D>CI, the latter is equivalent to a B<-D>CIC<=>C. 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 B<-D> options. =item B<-E> I Ignore a package with the specified I. This can be used to avoid upgrading to a broken package in the repository. There can be multiple B<-E> options. =item B<-a> Select all installed packages. Do not specify a pattern list together with the B<-a> option. =item B<-A> Select all packages in the repository. Do not specify a pattern list together with the B<-A> option. =back =head1 CONFIGURATION B reads the configuration file I<$HOME/.openpkg/build>. The file lists default options, one option per line and section tags of the form C<[>IC<]>. 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 B hierarchies. =head1 CAVEATS Parallel execution of B causes undefined effects. =head1 SEE ALSO rpm(8), sudo(8) =head1 HISTORY The B and B command was invented in November 2002 by I Emlelstv@dev.de.cw.netE under contract with I Ehttp://www.cw.com/de/E for use inside the B project Ehttp://www.openpkg.org/E. =head1 AUTHORS Michael van Elst mlelstv@dev.de.cw.net =cut