openpkg.pod 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. ##
  2. ## openpkg.pod -- OpenPKG maintainance utility (frontend manual page)
  3. ##
  4. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  5. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  6. ## Copyright (c) 2000-2003 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 XX-VERSION-XX
  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<-s>]
  53. [B<-S>]
  54. [B<-X>]
  55. [B<-P> I<priv-cmd>]
  56. [B<-N> I<non-priv-cmd>]
  57. [B<-p> I<platform>]
  58. [B<-D>I<var>=I<val> ...]
  59. [B<-E> I<name> ...]
  60. ([B<-a>] [B<-A>] | I<patternlist>)
  61. =head1 DESCRIPTION
  62. B<openpkg> is a frontend utility for maintaining an B<OpenPKG> instance.
  63. It currenty provides indexing of RPM files (B<openpkg index>) and
  64. automated recursive from-scratch installation and updating of existing
  65. RPM packages (B<openpkg build>).
  66. =head1 COMMANDS
  67. =head2 OPENPKG INDEX
  68. B<openpkg index> creates an XML/RDF based resource index for RPM
  69. F<.spec> files in a source tree or from an RPM package repository. The
  70. index holds enough information to support an automated build process by
  71. B<openpkg build>.
  72. The following command line options exist:
  73. =over 4
  74. =item B<-r> I<resource>
  75. The name of the resource stored in the index. The default is
  76. "C<OpenPKG-CURRENT/Source/>".
  77. =item B<-p> I<platform>
  78. B<openpkg index> adds a platform attribute for binary RPMs. The
  79. attribute is built as I<%{arch}>C<->I<platform>C<->I<%{os}> where
  80. I<%{arch}> and I<%{os}> are taken from the RPM header and I<platform> is
  81. the value of the B<-p> option. The default value is "C<unknown>". This
  82. must be used to distinguish between platforms that support the same
  83. Architecture and OS name like various Linux distributions.
  84. =item B<-C> I<cache.db>
  85. Cache all F<.spec> files into this Berkeley-DB file when indexing source
  86. RPMs. The cache is refreshed automatically when the source RPMs are more
  87. recent than the cache entry.
  88. =item B<-o> I<index.rdf>
  89. Name of the output XML/RDF file, default is to write to F<stdout>.
  90. =item B<-c>
  91. Compress output with C<bzip2>. Use the B<-o> option to specify a F<.bz2>
  92. suffix.
  93. =item B<-i>
  94. The specified directories are RPM repositories. Build index over
  95. all F<.rpm> files in these directories and all subdirectories.
  96. If a subdirectory already contains a C<00INDEX.rdf> or C<00INDEX.rdf.*>
  97. file then skip scanning the subdirectory, instead add a reference
  98. to the index file into the new index.
  99. Without this option the directories are source trees with a subdirectory
  100. per package and a I<package>C<.spec> file inside each subdirectory.
  101. =back
  102. =head2 OPENPKG BUILD
  103. B<openpkg build> writes a shell script to standard output that installs
  104. or upgrades software packages including all dependencies. Packages that
  105. are upgraded automatically trigger rebuilds of all packages that depend
  106. on the upgraded package ("reverse dependencies"). The dependency
  107. information is read from an index generated by B<openpkg index>.
  108. The following command line options exist:
  109. =over 4
  110. =item B<-R> I<rpm>
  111. Specify a path to the installed B<OpenPKG> C<rpm> executable. Several
  112. other internal paths are deduced from the I<rpm> path, so this should be
  113. something like I<%{l_prefix}>C</bin/rpm>.
  114. =item B<-r> I<repository>
  115. Specify a path to an RPM repository, this can be a URL or a directory
  116. path. The name of the package file is appended to this path.
  117. The default is to use a URL pointing to the B<OpenPKG> FTP server.
  118. =item B<-f> I<index.rdf>
  119. Specify a path to the primary XML/RDF index, this can be a URL or a
  120. file path. If the index contains references to aother indexes these are
  121. included automatically. The default is to use a URL pointing to the
  122. B<OpenPKG> FTP server for the B<OpenPKG> release you are using.
  123. =item B<-u>
  124. The generated script will ignore binary RPMs that are stored on
  125. your system. Instead it will either fetch binary RPMs or rebuild
  126. from source RPMs fetched from the repository.
  127. =item B<-U>
  128. The generated script will try to upgrade all selected packages
  129. including their dependencies to the most recent version.
  130. =item B<-z>
  131. The generated script will rebuild all selected packages
  132. including their dependencies even when the most recent version
  133. is already installed.
  134. =item B<-Z>
  135. B<openpkg build> ignores all installed packages, the
  136. script will rebuild all selected packages from scratch.
  137. Note that this doesn't work together with the B<-a> option.
  138. =item B<-i>
  139. The generated script will ignore errors. However, if a build
  140. phase fails the install phase is still skipped.
  141. =item B<-q>
  142. Ignore all reverse dependencies.
  143. I<ATTENTION: this might break already installed packages!>
  144. =item B<-s>
  145. Print a status map instead of the install script. The map consists
  146. of 3 columns: "old", "tag" and "new". "old" shows the installed
  147. version of a package or just the package name if no package of
  148. that name is installed and "new" shows the repository version
  149. of a package if it is considered for installation. "tag" has the
  150. following possible values:
  151. =over 4
  152. =item OK
  153. The installed package is suitable and will not be touched.
  154. =item ADD
  155. There is no installed package yet.
  156. =item UPGRADE
  157. The installed package is outdated and requires an update.
  158. =item DEPEND
  159. The installed package needs rebuilding because one of its
  160. dependencies is rebuilt.
  161. =item MISMATCH
  162. The installed package needs rebuilding because it was build
  163. with different parameters.
  164. =item CONFLICT
  165. The required new package cannot be installed because it
  166. conflicts with some already installed package.
  167. =item UNDEF
  168. The package has an invalid or ambigous dependency.
  169. =back
  170. =item B<-S>
  171. Similar to B<-s> but also lists the newest versions in the
  172. repository. The following tag might appear in the map.
  173. =over 4
  174. =item NEW
  175. The package exists in the repository but isn't required yet.
  176. =back
  177. =item B<-X>
  178. Ignore an installed XML parser module but use the internal
  179. simple text parser instead.
  180. =item B<-P> I<priv-cmd>
  181. Command prefix to use for install commands that require elevated
  182. privileges. The most common tool for this is sudo(8).
  183. =item B<-N> I<non-priv-cmd>
  184. Command prefix to use for install commands that do not require elevated
  185. privileges. The most common tool for this is sudo(8).
  186. =item B<-p> I<platform>
  187. The platform string that is matched against the index for binary
  188. packages. Default is to use the I<%{_target_platform}> variable.
  189. =item B<-D>I<var>=I<val>
  190. Specify configuration options for all selected packages. This can be
  191. either B<-D>C<with_>I<xxx>C<=>I<yyy> or just B<-D>C<with_>I<xxx>, the
  192. latter is equivalent to a B<-D>C<with_>I<xxx>C<=>C<yes>. The parameters
  193. are matched against selected packages that are already installed. If
  194. they do indicate a change the package is rebuild. There can be multiple
  195. B<-D> options.
  196. =item B<-E> I<name>
  197. Ignore a package with the specified I<name>. This can be used to avoid
  198. upgrading to a broken package in the repository. There can be multiple
  199. B<-E> options.
  200. =item B<-a>
  201. Select all installed packages. Do not specify a pattern list together
  202. with the B<-a> option.
  203. =item B<-A>
  204. Select all packages in the repository. Do not specify a pattern list together
  205. with the B<-a> option.
  206. =back
  207. =head1 CONFIGURATION
  208. B<openpkg build> reads the configuration file I<$HOME/.openpkg/build>.
  209. The file lists default options, one option per line and section tags
  210. of the form C<[>I<prefix>C<]>. Options following such a tag are only
  211. evaluated if the selected RPM path matches the prefix so that you can
  212. define default options for multiple B<OpenPKG> hierarchies.
  213. =head1 CAVEATS
  214. Parallel execution of B<openpkg build> causes undefined effects.
  215. =head1 SEE ALSO
  216. rpm(8), sudo(8)
  217. =head1 HISTORY
  218. The B<openpkg index> and B<openpkg build> command
  219. was invented in November 2002 by I<Michael van Elst>
  220. E<lt>mlelstv@dev.de.cw.netE<gt> under contract with I<Cable & Wireless
  221. Germany> E<lt>http://www.cw.com/de/E<gt> for use inside the B<OpenPKG>
  222. project E<lt>http://www.openpkg.org/E<gt>.
  223. =head1 AUTHORS
  224. Michael van Elst
  225. mlelstv@dev.de.cw.net
  226. =cut