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