openpkg.pod 8.9 KB

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