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 4.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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><a name="rpm">Rpm</a></h2>
  22. <h3>Description</h3>
  23. <p>
  24. A basic task for invoking the rpm executable to build a RedHat Package Manager Linux installation
  25. file. The task currently only works on Linux or other Unix platforms with rpm support.
  26. </p>
  27. <h3>Parameters</h3>
  28. <table border="1" cellpadding="2" cellspacing="0">
  29. <tr>
  30. <td valign="top"><b>Attribute</b></td>
  31. <td valign="top"><b>Description</b></td>
  32. <td align="center" valign="top"><b>Required</b></td>
  33. </tr>
  34. <tr>
  35. <td valign="top">specFile</td>
  36. <td valign="top">The name of the spec file to be used. This must be relative to the SPECS directory
  37. under the root of the RPM set in the topDir attribute.</td>
  38. <td valign="top" align="center">Yes</td>
  39. </tr>
  40. <tr>
  41. <td valign="top">topDir</td>
  42. <td valign="top">
  43. This is the directory which will have the expected
  44. subdirectories, SPECS, SOURCES, BUILD, SRPMS. If this isn't specified,
  45. the default RPM directory of the system (or user, if ~/.rpmmacros defines it) is used (often
  46. /usr/src/rpm.<br>
  47. Defining a topdir will set <tt>%_topdir</tt> to the specified directory -there is no need
  48. to edit your .rpmmacros file.
  49. </td>
  50. <td valign="top" align="center">No, but your build file is very brittle if it is not set.</td>
  51. </tr>
  52. <tr>
  53. <td valign="top">cleanBuildDir</td>
  54. <td valign="top">This will remove the generated files in the BUILD
  55. directory.
  56. See the the <tt>--clean</tt> option of rpmbuild.
  57. </td>
  58. <td align="center" valign="top">No</td>
  59. </tr>
  60. <tr>
  61. <td valign="top">removeSpec</td>
  62. <td valign="top">This will remove the spec file from SPECS.
  63. See the the <tt>--rmspec</tt> option of rpmbuild.
  64. </td>
  65. <td align="center" valign="top">No</td>
  66. </tr>
  67. <tr>
  68. <td valign="top">removeSource</td>
  69. <td valign="top">Flag (optional, default=false)
  70. to remove the sources after the build.
  71. See the the <tt>--rmsource</tt> option of rpmbuild.</td>
  72. <td align="center" valign="top">No</td>
  73. </tr>
  74. <tr>
  75. <td valign="top">rpmBuildCommand</td>
  76. <td valign="top">The executable to use for building the RPM.
  77. Defaults to <code>rpmbuild</code> if it can be found or
  78. <code>rpm</code> otherwise. Set this if you don't have either on
  79. your PATH or want to use a different executable. <em>Since Apache Ant
  80. 1.6</em>.</td>
  81. <td valign="top" align="center">No</td>
  82. </tr>
  83. <tr>
  84. <td valign="top">command</td>
  85. <td valign="top">The command to pass to the rpmbuild program. The default is "-bb"</td>
  86. <td align="center" valign="top">No</td>
  87. </tr>
  88. <tr>
  89. <td valign="top">quiet</td>
  90. <td valign="top">Suppress output. Defaults to false.</td>
  91. <td align="center" valign="top">No</td>
  92. </tr>
  93. <tr>
  94. <td valign="top">output/error</td>
  95. <td valign="top">Where standard output and error go</td>
  96. <td align="center" valign="top">No</td>
  97. </tr>
  98. <tr>
  99. <td valign="top">failOnError</td>
  100. <td valign="top">Stop the buildprocess if the RPM build command exits with
  101. a non-zero retuncode. Defaults to false</td>
  102. <td align="center" valign="top">No</td>
  103. </tr>
  104. </table>
  105. <h3>Examples</h3>
  106. <pre>
  107. &lt;rpm
  108. specFile="example.spec"
  109. topDir="build/rpm"
  110. cleanBuildDir="true"
  111. failOnError="true"/&gt;
  112. </pre>
  113. </body>
  114. </html>