You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

rpm.html 3.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  18. <title>Rpm Task</title>
  19. </head>
  20. <body>
  21. <h2 id="rpm">Rpm</h2>
  22. <h3>Description</h3>
  23. <p> A basic task for invoking the <code>rpm</code> executable to build a RedHat Package Manager
  24. Linux installation file. The task currently only works on Linux or other Unix platforms
  25. with <code>rpm</code> support.</p>
  26. <h3>Parameters</h3>
  27. <table class="attr">
  28. <tr>
  29. <th>Attribute</th>
  30. <th>Description</th>
  31. <th>Required</th>
  32. </tr>
  33. <tr>
  34. <td>specFile</td>
  35. <td>The name of the spec file to be used. This must be relative to the <samp>SPECS</samp>
  36. directory under the root of the RPM set in the <var>topDir</var> attribute.</td>
  37. <td>Yes</td>
  38. </tr>
  39. <tr>
  40. <td>topDir</td>
  41. <td>This is the directory which will have the expected
  42. subdirectories, <samp>SPECS</samp>, <samp>SOURCES</samp>, <samp>BUILD</samp>, <samp>SRPMS</samp>.
  43. If this isn't specified, the default RPM directory of the system (or user,
  44. if <samp>~/.rpmmacros</samp> defines it) is used (often <samp>/usr/src/rpm</samp>.<br/>
  45. Defining a <var>topdir</var> will set <code>%_topdir</code> to the specified
  46. directory&mdash;there is no need to edit your <samp>.rpmmacros</samp> file.</td>
  47. <td>No, but your build file is very brittle if it is not set.</td>
  48. </tr>
  49. <tr>
  50. <td>cleanBuildDir</td>
  51. <td>This will remove the generated files in the <samp>BUILD</samp> directory. See the
  52. the <code>--clean</code> option of rpmbuild.</td>
  53. <td>No</td>
  54. </tr>
  55. <tr>
  56. <td>removeSpec</td>
  57. <td>This will remove the spec file from <samp>SPECS</samp>. See the the <code>--rmspec</code>
  58. option of <code>rpmbuild</code>.</td>
  59. <td>No</td>
  60. </tr>
  61. <tr>
  62. <td>removeSource</td>
  63. <td>Flag to remove the sources after the build. See the <code>--rmsource</code> option
  64. of <code>rpmbuild</code>.</td>
  65. <td>No; default is <q>false</q></td>
  66. </tr>
  67. <tr>
  68. <td>rpmBuildCommand</td>
  69. <td>The executable to use for building the RPM. Set this if default executables are not on
  70. <code>PATH</code> or a different executable is needed. <em>Since Apache Ant 1.6</em>.</td>
  71. <td>No; defaults to <code>rpmbuild</code> if it can be found or <code>rpm</code> otherwise</td>
  72. </tr>
  73. <tr>
  74. <td>command</td>
  75. <td>The command to pass to the <code>rpmbuild</code> program.</td>
  76. <td>No; default is <code>-bb</code></td>
  77. </tr>
  78. <tr>
  79. <td>quiet</td>
  80. <td>Suppress output.</td>
  81. <td>No; defaults to <q>false</q></td>
  82. </tr>
  83. <tr>
  84. <td>output/error</td>
  85. <td>Where standard output and error go.</td>
  86. <td>No</td>
  87. </tr>
  88. <tr>
  89. <td>failOnError</td>
  90. <td>Stop the build process if the RPM build command exits with a non-zero return code.</td>
  91. <td>No; defaults to <q>false</q></td>
  92. </tr>
  93. </table>
  94. <h3>Examples</h3>
  95. <pre>
  96. &lt;rpm specFile="example.spec"
  97. topDir="build/rpm"
  98. cleanBuildDir="true"
  99. failOnError="true"/&gt;</pre>
  100. </body>
  101. </html>