openpkg.pod 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. ##
  2. ## openpkg.pod -- OpenPKG maintainance utility (frontend 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> - B<OpenPKG> maintainance utility
  28. =head1 VERSION
  29. openpkg-tool XX-VERSION-XX
  30. =head1 SYNOPSIS
  31. B<openpkg>
  32. B<index>
  33. [B<-r> I<resource>]
  34. [B<-p> I<platform>]
  35. [B<-C> I<cache.db>]
  36. [B<-o> I<index.rdf>]
  37. [B<-c>]
  38. [B<-i>]
  39. I<dir> ...
  40. B<openpkg>
  41. B<build>
  42. [B<-R> I<rpm>]
  43. [B<-r> I<repository>]
  44. [B<-f> I<index.rdf>]
  45. [B<-u>]
  46. [B<-U>]
  47. [B<-z>]
  48. [B<-Z>]
  49. [B<-i>]
  50. [B<-q>]
  51. [B<-s>]
  52. [B<-S>]
  53. [B<-M>]
  54. [B<-L>]
  55. [B<-W>]
  56. [B<-X>]
  57. [B<-K>]
  58. [B<-e>]
  59. [B<-b>]
  60. [B<-B>]
  61. [B<-G>]
  62. [B<-P> I<priv-cmd>]
  63. [B<-N> I<non-priv-cmd>]
  64. [B<-p> I<platform>]
  65. [B<-D>I<var>=I<val> ...]
  66. [B<-E> I<name> ...]
  67. [B<-H> I<name> ...]
  68. ([B<-a>] [B<-A>] | I<patternlist>)
  69. =head1 DESCRIPTION
  70. B<openpkg> is a frontend utility for maintaining an B<OpenPKG> instance.
  71. It currently provides indexing of RPM files (B<openpkg index>) and
  72. automated recursive from-scratch installation and updating of existing
  73. RPM packages (B<openpkg build>).
  74. =head1 COMMANDS
  75. =head2 OPENPKG INDEX
  76. B<openpkg index> creates an XML/RDF based resource index for RPM
  77. F<.spec> files in a source tree or from an RPM package repository. The
  78. index holds enough information to support an automated build process by
  79. B<openpkg build>.
  80. The following command line options exist:
  81. =over 4
  82. =item B<-r> I<resource>
  83. The name of the resource stored in the index. The default is
  84. "C<OpenPKG-CURRENT/Source/>".
  85. =item B<-p> I<platform>
  86. B<openpkg index> adds a platform attribute for binary RPMs. This
  87. must be unique to correctly identify a specific architecture, OS
  88. and build environment.
  89. =item B<-C> I<cache.db>
  90. Cache all F<.spec> files into this Berkeley-DB file when indexing source
  91. RPMs. The cache is refreshed automatically when the source RPMs are more
  92. recent than the cache entry. The B<-C> option requires an installed
  93. DB_File perl module.
  94. =item B<-o> I<index.rdf>
  95. Name of the output XML/RDF file, default is to write to F<stdout>.
  96. =item B<-c>
  97. Compress output with C<bzip2>. Use the B<-o> option to specify a F<.bz2>
  98. suffix.
  99. =item B<-i>
  100. The specified directories are RPM repositories. Build index over
  101. all F<.rpm> files in these directories and all subdirectories.
  102. If a subdirectory already contains a C<00INDEX.rdf> or C<00INDEX.rdf.*>
  103. file then skip scanning the subdirectory, instead add a reference
  104. to the index file into the new index.
  105. Without this option the directories are source trees with a subdirectory
  106. per package and a I<package>C<.spec> file inside each subdirectory.
  107. =back
  108. =head2 OPENPKG BUILD
  109. B<openpkg build> writes a shell script to standard output that installs
  110. or upgrades software packages including all dependencies. Packages that
  111. are upgraded automatically trigger rebuilds of all packages that depend
  112. on the upgraded package ("reverse dependencies"). The dependency
  113. information is read from an index generated by B<openpkg index>.
  114. Packages are selected by providing a list of name patterns. Each
  115. pattern is either a package name or a prefix followed by a '*'
  116. character. Additionally you can append a discrimation prefix separated
  117. by a comma that matches against the full name-version-revision
  118. string.
  119. The following command line options exist:
  120. =over 4
  121. =item B<-R> I<rpm>
  122. Specify a path to the installed B<OpenPKG> C<rpm> executable. Several
  123. other internal paths are deduced from the I<rpm> path, so this should be
  124. something like I<%{l_prefix}>C</bin/rpm>.
  125. =item B<-r> I<repository>
  126. Specify a path to an RPM repository, this can be a URL or a directory
  127. path. The name of the package file is appended to this path.
  128. The default is to use a URL pointing to the B<OpenPKG> FTP server.
  129. =item B<-f> I<index.rdf>
  130. Specify a path to the primary XML/RDF index, this can be a URL or a
  131. file path. If the index contains references to aother indexes these are
  132. included automatically. The default is to use a URL pointing to the
  133. B<OpenPKG> FTP server for the B<OpenPKG> release you are using.
  134. =item B<-u>
  135. The generated script will ignore binary RPMs that are stored on
  136. your system. Instead it will either fetch binary RPMs or rebuild
  137. from source RPMs fetched from the repository.
  138. =item B<-U>
  139. The generated script will try to upgrade all selected packages
  140. including their dependencies to the most recent version.
  141. =item B<-z>
  142. The generated script will rebuild all selected packages
  143. including their dependencies even when the most recent version
  144. is already installed.
  145. =item B<-Z>
  146. B<openpkg build> ignores all installed packages, the
  147. script will rebuild all selected packages from scratch.
  148. Note that this doesn't work together with the B<-a> option.
  149. =item B<-i>
  150. The generated script will ignore errors. However, if a build
  151. phase fails the install phase is still skipped.
  152. =item B<-q>
  153. Ignore all reverse dependencies.
  154. I<ATTENTION: this might break already installed packages!>
  155. =item B<-s>
  156. Print a status map instead of the install script. The map consists
  157. of 3 columns: "old", "tag" and "new". "old" shows the installed
  158. version of a package or just the package name if no package of
  159. that name is installed and "new" shows the repository version
  160. of a package if it is considered for installation. "tag" has the
  161. following possible values:
  162. =over 4
  163. =item OK
  164. The installed package is suitable and will not be touched.
  165. =item ADD
  166. There is no installed package yet.
  167. =item UPGRADE
  168. The installed package is outdated and requires an update.
  169. =item DEPEND
  170. The installed package needs rebuilding because one of its
  171. dependencies is rebuilt.
  172. =item MISMATCH
  173. The installed package needs rebuilding because it was build
  174. with different parameters.
  175. =item CONFLICT
  176. The required new package cannot be installed because it
  177. conflicts with some already installed package.
  178. =item UNDEF
  179. The package has an invalid or ambigous dependency.
  180. =back
  181. =item B<-S>
  182. Similar to B<-s> but also lists the newest versions in the
  183. repository. The following tag might appear in the map.
  184. =over 4
  185. =item NEW
  186. The package exists in the repository but isn't required yet.
  187. =back
  188. =item B<-M>
  189. Similar to B<-s> but print a short dependency map.
  190. =item B<-L>
  191. Print a list of packages in the repository that depend on the target.
  192. =item B<-W>
  193. Include all conditional dependencies as if all possible configuration
  194. options had been switched on. This has little use except for generating
  195. an all-inclusive list with the B<-L> option.
  196. I<ATTENTION: Even mutually exclusive options are evaluated to be 'on',
  197. building packages with B<-W> therefore might fail or cause unusuable
  198. results!>
  199. =item B<-X>
  200. Ignore an installed XML parser module but use the internal
  201. simple text parser instead.
  202. =item B<-K>
  203. Keep packages that were installed temporarily during the build process.
  204. =item B<-e>
  205. Rebuild exact version from repository even when you have installed
  206. a newer version from another repository.
  207. =item B<-b>
  208. Wrap rebuild commands with build-time check for existing binary packages
  209. if the package is rebuilt as a dependency. This is best to use with
  210. B<-u> to defer all such checks until build-time.
  211. =item B<-B>
  212. Same as -b but also check all packages for existing binary packages
  213. at run-time.
  214. =item B<-g>
  215. The generated script will rebuild all packages selected even when the
  216. most recent version is already installed. Dependencies are not affected.
  217. =item B<-P> I<priv-cmd>
  218. Command prefix to use for install commands that require elevated
  219. privileges. The most common tool for this is sudo(8). If I<priv-cmd>
  220. starts with a dash it will be run without the dash and the command
  221. line it should execute is passed as a single quoted string.
  222. =item B<-N> I<non-priv-cmd>
  223. Command prefix to use for install commands that do not require elevated
  224. privileges. The most common tool for this is sudo(8). If I<priv-cmd>
  225. starts with a dash it will be run without the dash and the command
  226. line it should execute is passed as a single quoted string.
  227. =item B<-p> I<platform>
  228. The platform string that is matched against the index for binary
  229. packages. Default is an empty string so that no binary packages
  230. are matched.
  231. =item B<-D>I<var>=I<val>
  232. Specify configuration options for selected packages. This can be
  233. either B<-D>I<with_xxx>=I<yyy> or just B<-D>I<with_xxx>, the
  234. latter is equivalent to a B<-D>I<with_xxx>=I<yes>. The parameters
  235. are matched against selected packages that are already installed. If
  236. they do indicate a change, the package is rebuild. There can be multiple
  237. B<-D> options.
  238. If the option name is prefixed with a package name followed by two colons
  239. then it applies only to the specified package. E.g. B<-D>I<gcc::with_binutils>.
  240. =item B<-E> I<name>
  241. Ignore a package with the specified I<name>. This can be used to avoid
  242. upgrading to a broken package in the repository. There can be multiple
  243. B<-E> options.
  244. =item B<-H> I<name>
  245. Hint about packages that should be preferred when more than one fits
  246. a requirement. There can be multiple B<-E> options.
  247. =item B<-a>
  248. Select all installed packages. Do not specify a pattern list together
  249. with the B<-a> option.
  250. =item B<-A>
  251. Select all packages in the repository. Do not specify a pattern list together
  252. with the B<-A> option.
  253. =back
  254. =head1 CONFIGURATION
  255. B<openpkg build> reads the configuration file I<$HOME/.openpkg/build>.
  256. The file lists default options, one option per line and section tags
  257. of the form C<[>I<prefix>C<]>. Options following such a tag are only
  258. evaluated if the selected RPM path matches the prefix so that you can
  259. define default options for multiple B<OpenPKG> hierarchies.
  260. =head1 CAVEATS
  261. Parallel execution of B<openpkg build> causes undefined effects.
  262. =head1 SEE ALSO
  263. rpm(8), sudo(8)
  264. =head1 HISTORY
  265. The B<openpkg index> and B<openpkg build> command
  266. was invented in November 2002 by I<Michael van Elst>
  267. E<lt>mlelstv@dev.de.cw.netE<gt> under contract with I<Cable & Wireless
  268. Germany> E<lt>http://www.cw.com/de/E<gt> for use inside the B<OpenPKG>
  269. project E<lt>http://www.openpkg.org/E<gt>.
  270. =head1 AUTHORS
  271. Michael van Elst
  272. mlelstv@dev.de.cw.net
  273. =cut