openpkg.pod 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. ##
  2. ## openpkg.pod -- OpenPKG maintainance utility (frontend manual page)
  3. ##
  4. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  5. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  6. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
  7. ##
  8. ## Permission to use, copy, modify, and distribute this software for
  9. ## any purpose with or without fee is hereby granted, provided that
  10. ## the above copyright notice and this permission notice appear in all
  11. ## copies.
  12. ##
  13. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  14. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  15. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  16. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  17. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  18. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  19. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  20. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  21. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  22. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  23. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  24. ## SUCH DAMAGE.
  25. ##
  26. =pod
  27. =head1 NAME
  28. B<openpkg> - B<OpenPKG> maintainance utility
  29. =head1 VERSION
  30. openpkg-tool @version@
  31. =head1 SYNOPSIS
  32. B<openpkg>
  33. B<index>
  34. [B<-r> I<resource>]
  35. [B<-p> I<platform>]
  36. [B<-C> I<cache.db>]
  37. [B<-o> I<index.rdf>]
  38. [B<-c>]
  39. [B<-i>]
  40. I<dir> ...
  41. B<openpkg>
  42. B<build>
  43. [B<-R> I<rpm>]
  44. [B<-r> I<repository>]
  45. [B<-f> I<index.rdf>]
  46. [B<-u>]
  47. [B<-U>]
  48. [B<-z>]
  49. [B<-Z>]
  50. [B<-i>]
  51. [B<-q>]
  52. [B<-P> I<priv-cmd>]
  53. [B<-N> I<non-priv-cmd>]
  54. [B<-p> I<platform>]
  55. [B<-D>I<var>=I<val> ...]
  56. [B<-E> I<name> ...]
  57. ([B<-a>] [B<-A>] | I<patternlist>)
  58. =head1 DESCRIPTION
  59. B<openpkg> is a frontend utility for maintaining an B<OpenPKG> instance.
  60. It currenty provides indexing of RPM files (B<openpkg index>) and
  61. automated recursive from-scratch installation and updating of existing
  62. RPM packages (B<openpkg build>).
  63. =head1 COMMANDS
  64. =head2 OPENPKG INDEX
  65. B<openpkg-index> creates an XML/RDF based resource index for RPM
  66. F<.spec> files in a source tree or from an RPM package repository. The
  67. index holds enough information to support an automated build process by
  68. B<openpkg build>.
  69. The following command line options exist:
  70. =over 4
  71. =item B<-r> I<resource>
  72. The name of the resource stored in the index. The default is
  73. "C<OpenPKG-CURRENT/Source/>".
  74. =item B<-p> I<platform>
  75. B<openpkg index> adds a platform attribute for binary RPMs. The
  76. attribute is built as I<%{arch}>C<->I<platform>C<->I<%{os}> where
  77. I<%{arch}> and I<%{os}> are taken from the RPM header and I<platform> is
  78. the value of the B<-p> option. The default value is "C<unkown>". This
  79. must be used to distinguish between platforms that support the same
  80. Architecture and OS name like various Linux distributions.
  81. =item B<-C> I<cache.db>
  82. Cache all F<.spec> files into this Berkeley-DB file when indexing source
  83. RPMs. The cache is refreshed automatically when the source RPMs are more
  84. recent than the cache entry.
  85. =item B<-o> I<index.rdf>
  86. Name of the output XML/RDF file, default is to write to F<stdout>.
  87. =item B<-c>
  88. Compress output with C<bzip2>. Use the B<-o> option to specify a F<.bz2>
  89. suffix.
  90. =item B<-i>
  91. The specified directories are RPM repositories. Build index over
  92. all F<.rpm> files in these directories and all subdirectories.
  93. If a subdirectory already contains a C<00INDEX.rdf> or C<00INDEX.rdf.*>
  94. file then skip scanning the subdirectory, instead add a reference
  95. to the index file into the new index.
  96. Without this option the directories are source trees with a subdirectory
  97. per package and a I<package>C<.spec> file inside each subdirectory.
  98. =back
  99. =head2 OPENPKG BUILD
  100. B<openpkg build> writes a shell script to standard output that installs
  101. or upgrades software packages including all dependencies. Packages that
  102. are upgraded automatically trigger rebuilds of all packages that depend
  103. on the upgraded package ("reverse dependencies"). The dependency
  104. information is read from an index generated by B<openpkg index>.
  105. The following command line options exist:
  106. =over 4
  107. =item B<-R> I<rpm>
  108. Specify a path to the installed B<OpenPKG> C<rpm> executable. Several
  109. other internal paths are deduced from the I<rpm> path, so this should be
  110. something like I<%{l_prefix}>C</bin/rpm>.
  111. =item B<-r> I<repository>
  112. Specify a path to an RPM repository, this can be a URL or a directory
  113. path. The name of the package file is appended to this path.
  114. The default is to use a URL pointing to the B<OpenPKG> FTP server.
  115. =item B<-f> I<index.rdf>
  116. Specify a path to the primary XML/RDF index, this can be a URL or a
  117. file path. If the index contains references to aother indexes these are
  118. included automatically. The default is to use a URL pointing to the
  119. B<OpenPKG> FTP server for the B<OpenPKG> release you are using.
  120. =item B<-u>
  121. The generated script will ignore binary RPMs that are stored on
  122. your system. Instead it will either fetch binary RPMs or rebuild
  123. from source RPMs fetched from the repository.
  124. =item B<-U>
  125. The generated script will try to upgrade all selected packages
  126. including their dependencies to the most recent version.
  127. =item B<-z>
  128. The generated script will rebuild all selected packages
  129. including their dependencies even when the most recent version
  130. is already installed.
  131. =item B<-Z>
  132. B<openpkg build> ignores a installed packages, the
  133. script will rebuild all selected packages from scratch.
  134. Note that this doesn't work together with the B<-a> option.
  135. =item B<-i>
  136. The generated script will ignore errors. However, if a build
  137. phase fails the install phase is still skipped.
  138. =item B<-q>
  139. Ignore all reverse dependencies.
  140. I<ATTENTION: this might break already installed packages!>
  141. =item B<-P> I<priv-cmd>
  142. Command prefix to use for install commands that require elevated
  143. privileges. The most common tool for this is sudo(1).
  144. =item B<-N> I<non-priv-cmd>
  145. Command prefix to use for install commands that do not require elevated
  146. privileges. The most common tool for this is sudo(1).
  147. =item B<-p> I<platform>
  148. The platform string that is matched against the index for binary
  149. packages. Default is to use the I<%{_target_platform}> variable.
  150. =item B<-D>I<var>=I<val>
  151. Specify configuration options for all selected packages. This can be
  152. either B<-D>C<with_>I<xxx>C<=>I<yyy> or just B<-D>C<with_>I<xxx>, the
  153. latter is equivalent to a B<-D>C<with_>I<xxx>C<=>C<yes>. The parameters
  154. are matched against selected packages that are already installed. If
  155. they do indicate a change the package is rebuild. There can be multiple
  156. B<-D> options.
  157. =item B<-E> I<name>
  158. Ignore a package with the specified I<name>. This can be used to avoid
  159. upgrading to a broken package in the repository. There can be multiple
  160. B<-E> options.
  161. =item B<-a>
  162. Select all installed packages. Do not specify a pattern list together
  163. with the B<-a> option.
  164. =item B<-A>
  165. Select all packages in the repository. Do not specify a pattern list together
  166. with the B<-a> option.
  167. =back
  168. =head1 CONFIGURATION
  169. B<openpkg build> reads the configuration file I<$HOME/.openpkg/build>.
  170. The file lists default options, one option per line and section tags
  171. of the form C<[>I<prefix>C<]>. Options following such a tag are only
  172. evaluated if the selected RPM path matches the prefix so that you can
  173. define default options for multiple B<OpenPKG> hierarchies.
  174. =head1 CAVEATS
  175. Parallel execution of B<openpkg build> causes undefined effects.
  176. =head1 SEE ALSO
  177. rpm(1), sudo(1)
  178. =head1 HISTORY
  179. The B<openpkg index> and B<openpkg build> command
  180. was invented in November 2002 by I<Michael van Elst>
  181. E<lt>mlelstv@dev.de.cw.netE<gt> under contract with I<Cable & Wireless
  182. Germany> E<lt>http://www.cw.com/deE<gt> for use inside the B<OpenPKG>
  183. project E<lt>http://www.openpkg.org/E<gt>.
  184. =head1 AUTHORS
  185. Michael van Elst
  186. mlelstv@dev.de.cw.net
  187. =cut