openpkg-build.pod 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. ##
  2. ## openpkg.pod -- OpenPKG Maintenance Tool (manual page)
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. =pod
  26. =head1 NAME
  27. B<openpkg build> - B<OpenPKG> Maintenance Tool (Building)
  28. =head1 VERSION
  29. openpkg build XX-VERSION-XX
  30. =head1 SYNOPSIS
  31. B<openpkg>
  32. B<build>
  33. [B<-R> I<rpm>]
  34. [B<-r> I<repository>]
  35. [B<-f> I<index.rdf>]
  36. [B<-u>]
  37. [B<-U>]
  38. [B<-z>]
  39. [B<-Z>]
  40. [B<-i>]
  41. [B<-q>]
  42. [B<-s>]
  43. [B<-S>]
  44. [B<-M>]
  45. [B<-L>]
  46. [B<-W>]
  47. [B<-X>]
  48. [B<-K>]
  49. [B<-e>]
  50. [B<-b>]
  51. [B<-B>]
  52. [B<-G>]
  53. [B<-P> I<priv-cmd>]
  54. [B<-N> I<non-priv-cmd>]
  55. [B<-p> I<platform>]
  56. [B<-D>I<var>=I<val> ...]
  57. [B<-E> I<name> ...]
  58. [B<-H> I<name> ...]
  59. ([B<-a>] [B<-A>] | I<patternlist>)
  60. =head1 DESCRIPTION
  61. The B<openpkg build> tool provides automated recursive from-scratch
  62. installation and updating of existing RPM packages (B<openpkg build>).
  63. It writes a shell script to standard output that installs or upgrades
  64. software packages including all dependencies. Packages that are upgraded
  65. automatically trigger rebuilds of all packages that depend on the
  66. upgraded package ("reverse dependencies"). The dependency information is
  67. read from an index generated by B<openpkg index>.
  68. Packages are selected by providing a list of name patterns. Each
  69. pattern is either a package name or a prefix followed by a '*'
  70. character. Additionally you can append a discrimination prefix separated
  71. by a comma that matches against the full name-version-revision
  72. string.
  73. =head1 OPTIONS
  74. The following command line options exist:
  75. =over 4
  76. =item B<-R> I<rpm>
  77. Specify a path to the installed B<OpenPKG> C<rpm> command. Several
  78. other internal paths are deduced from the I<rpm> path, so this should be
  79. something like "I<%{l_prefix}>C</bin/openpkg rpm>".
  80. =item B<-r> I<repository>
  81. Specify a path to an RPM repository, this can be a URL or a directory
  82. path. The name of the package file is appended to this path.
  83. The default is to use a URL pointing to the B<OpenPKG> FTP server.
  84. =item B<-f> I<index.rdf>
  85. Specify a path to the primary XML/RDF index, this can be a URL or a
  86. file path. If the index contains references to other indexes these are
  87. included automatically. The default is to use a URL pointing to the
  88. B<OpenPKG> FTP server for the B<OpenPKG> release you are using.
  89. =item B<-u>
  90. The generated script will ignore binary RPMs that are stored on
  91. your system. Instead it will either fetch binary RPMs or rebuild
  92. from source RPMs fetched from the repository.
  93. =item B<-U>
  94. The generated script will try to upgrade all selected packages
  95. including their dependencies to the most recent version.
  96. =item B<-z>
  97. The generated script will rebuild all selected packages
  98. including their dependencies even when the most recent version
  99. is already installed.
  100. =item B<-Z>
  101. B<openpkg build> ignores all installed packages, the
  102. script will rebuild all selected packages from scratch.
  103. Note that this doesn't work together with the B<-a> option.
  104. =item B<-i>
  105. The generated script will ignore errors. However, if a build
  106. phase fails the install phase is still skipped.
  107. =item B<-q>
  108. Ignore all reverse dependencies.
  109. I<ATTENTION: this might break already installed packages!>
  110. =item B<-s>
  111. Print a status map instead of the install script. The map consists
  112. of 3 columns: "old", "tag" and "new". "old" shows the installed
  113. version of a package or just the package name if no package of
  114. that name is installed and "new" shows the repository version
  115. of a package if it is considered for installation. "tag" has the
  116. following possible values:
  117. =over 4
  118. =item OK
  119. The installed package is suitable and will not be touched.
  120. =item ADD
  121. There is no installed package yet.
  122. =item UPGRADE
  123. The installed package is outdated and requires an update.
  124. =item DEPEND
  125. The installed package needs rebuilding because one of its
  126. dependencies is rebuilt.
  127. =item MISMATCH
  128. The installed package needs rebuilding because it was build
  129. with different parameters.
  130. =item CONFLICT
  131. The required new package cannot be installed because it
  132. conflicts with some already installed package.
  133. =item UNDEF
  134. The package has an invalid or ambiguous dependency.
  135. =back
  136. =item B<-S>
  137. Similar to B<-s> but also lists the newest versions in the
  138. repository. The following tag might appear in the map.
  139. =over 4
  140. =item NEW
  141. The package exists in the repository but isn't required yet.
  142. =back
  143. =item B<-M>
  144. Similar to B<-s> but print a short dependency map.
  145. =item B<-L>
  146. Print a list of packages in the repository that depend on the target.
  147. =item B<-W>
  148. Include all conditional dependencies as if all possible configuration
  149. options had been switched on. This has little use except for generating
  150. an all-inclusive list with the B<-L> option.
  151. I<ATTENTION: Even mutually exclusive options are evaluated to be 'on',
  152. building packages with B<-W> therefore might fail or cause unusable
  153. results!>
  154. =item B<-X>
  155. Ignore an installed XML parser module but use the internal
  156. simple text parser instead.
  157. =item B<-K>
  158. Keep packages that were installed temporarily during the build process.
  159. =item B<-e>
  160. Rebuild exact version from repository even when you have installed
  161. a newer version from another repository.
  162. =item B<-b>
  163. Wrap rebuild commands with build-time check for existing binary packages
  164. if the package is rebuilt as a dependency. This is best to use with
  165. B<-u> to defer all such checks until build-time.
  166. =item B<-B>
  167. Same as -b but also check all packages for existing binary packages
  168. at run-time.
  169. =item B<-g>
  170. The generated script will rebuild all packages selected even when the
  171. most recent version is already installed. Dependencies are not affected.
  172. =item B<-P> I<priv-cmd>
  173. Command prefix to use for install commands that require elevated
  174. privileges. The most common tool for this is sudo(8). If I<priv-cmd>
  175. starts with a dash it will be run without the dash and the command
  176. line it should execute is passed as a single quoted string.
  177. =item B<-N> I<non-priv-cmd>
  178. Command prefix to use for install commands that do not require elevated
  179. privileges. The most common tool for this is sudo(8). If I<priv-cmd>
  180. starts with a dash it will be run without the dash and the command
  181. line it should execute is passed as a single quoted string.
  182. =item B<-p> I<platform>
  183. The platform string that is matched against the index for binary
  184. packages. Default is an empty string so that no binary packages
  185. are matched.
  186. =item B<-D>I<var>=I<val>
  187. Specify configuration options for selected packages. This can be
  188. either B<-D>I<with_xxx>=I<yyy> or just B<-D>I<with_xxx>, the
  189. latter is equivalent to a B<-D>I<with_xxx>=I<yes>. The parameters
  190. are matched against selected packages that are already installed. If
  191. they do indicate a change, the package is rebuild. There can be multiple
  192. B<-D> options.
  193. If the option name is prefixed with a package name followed by two colons
  194. then it applies only to the specified package. E.g. B<-D>I<gcc::with_binutils>.
  195. =item B<-E> I<name>
  196. Ignore a package with the specified I<name>. This can be used to avoid
  197. upgrading to a broken package in the repository. There can be multiple
  198. B<-E> options.
  199. =item B<-H> I<name>
  200. Hint about packages that should be preferred when more than one fits
  201. a requirement. There can be multiple B<-E> options.
  202. =item B<-a>
  203. Select all installed packages. Do not specify a pattern list together
  204. with the B<-a> option.
  205. =item B<-A>
  206. Select all packages in the repository. Do not specify a pattern list together
  207. with the B<-A> option.
  208. =back
  209. =head1 CONFIGURATION
  210. B<openpkg build> reads the configuration file I<$HOME/.openpkg/build>.
  211. The file lists default options, one option per line and section tags
  212. of the form C<[>I<prefix>C<]>. Options following such a tag are only
  213. evaluated if the selected RPM path matches the prefix so that you can
  214. define default options for multiple B<OpenPKG> hierarchies.
  215. =head1 CAVEATS
  216. Parallel execution of B<openpkg build> causes undefined effects.
  217. =head1 SEE ALSO
  218. rpm(8), sudo(8)
  219. =head1 HISTORY
  220. The B<openpkg build> command was invented in November 2002 by I<Michael
  221. van Elst> E<lt>mlelstv@dev.de.cw.netE<gt> under contract with I<Cable
  222. & Wireless> E<lt>http://www.cw.com/E<gt> for use inside the B<OpenPKG>
  223. project E<lt>http://www.openpkg.org/E<gt>.
  224. =head1 AUTHORS
  225. Michael van Elst
  226. mlelstv@dev.de.cw.net
  227. =cut