1
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5
<title>Specfile Editor User Guide - General Usage</title>
6
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
9
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
11
<th style="width: 100%" align="center" colspan="3">General Usage</th>
14
<td style="width: 20%" align="left">
15
<a href="Installing.html" title="Installing">
16
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
19
<td style="width: 60%" align="center"></td>
20
<td style="width: 20%" align="right">
21
<a href="Import-src-rpm-and-export-rpm-and-src-rpm.html" title="Import src.rpm and export rpm and src.rpm">
22
<img alt="Next" border="0" src="../../../images/next.gif"/>
27
<td style="width: 20%" align="left" valign="top">Installing</td>
28
<td style="width: 60%" align="center"></td>
29
<td style="width: 20%" align="right" valign="top">Import src.rpm and export rpm and src.rpm</td>
32
<h1 id="General_Usage">General Usage</h1>
33
<p>To fully benefit from all the features offered by the Specfile Editor, ensure that your
34
<i><code>.spec</code></i> file is part of a project inside the Eclipse workspace. <code>rpmlint</code> integration, file hyperlinks, and some auto-completion features are not available otherwise. The following screenshot provides an impression of the full interface benefits provided by the Specfile Editor plug-in:
36
<img border="0" src="images/Specfile_generic.png"/>
38
<h2 id="Creating_a_New_RPM_project">Creating a New RPM project</h2>
39
<h2 id="Creating_a_New_Specfile">Creating a New Specfile</h2>
40
<p>The Specfile Editor plug-in provides a wizard for creating new
41
<i><code>.spec</code></i> files. To use this wizard, navigate first to <u>File</u> > <u>New</u> > <u>Other...</u> ; then, expand the <u>RPM Wizards</u> entry to select <u>New specfile based on a template</u>.
44
<img border="0" src="images/Specfile_new_wizard.png"/>
46
<p>This will open the Specfile Creation wizard, which provides an interface for generating the basic contents of a
47
<i><code>.spec</code></i> file.
50
<img border="0" src="images/Specfile_new_from_template.png"/>
52
<p>The Specfile Creation wizard contains the following fields:</p>
55
<dd>This field associates the generated
56
<i><code>.spec</code></i> with a project in the current workspace, which ultimately specifies where the
57
<i><code>.spec</code></i> will be saved. The
59
<i>Select a project...</i>
60
</b> button allows you to select a specific project for this field with ease. By default, the Specfile Editor plug-in specifies the last active project when you invoked the Specfile Creation wizard.
64
<dt>Select a template </dt>
65
<dd>This drop-down list allows you to select a
66
<i><code>.spec</code></i> template to use. You can install templates provided by <code>rpmdevtools</code>, which is available
67
<a href="https://fedorahosted.org/rpmdevtools">https://fedorahosted.org/rpmdevtools</a> .
72
<dd>This fills in the <code>Version:</code> line of the
73
<i><code>.spec</code></i> file.
78
<dd>This fills in the <code>Summary:</code> line of the
79
<i><code>.spec</code></i> file.
84
<dd>This drop-down list allows you to select a package group to which the project belongs.</dd>
88
<dd>This fills in the <code>License:</code> line of the
89
<i><code>.spec</code></i> file.
94
<dd>This fills in the <code>URL:</code> line of the
95
<i><code>.spec</code></i> file, which typically specifies the public home page of the project.
100
<dd>This field specifies the source archive from which the package is built.</dd>
102
<h2 id="rpmlint">rpmlint</h2>
103
<p>To enable <code>rpmlint</code> warnings, right-click on the project containing the
104
<i><code>.spec</code></i> file. Then, select <u>Add/Remove rpmlint warnings</u> from the context menu. You can use this menu selection to disable <code>rpmlint</code> warnings as well.
107
<img border="0" src="images/Specfile_enable_rpmlint.png"/>
109
<p>Enabling <code>rpmlint</code> warnings will add a new <code>rpmlint</code> builder to the project. This <code>rpmlint</code> builder checks the
110
<i><code>.spec</code></i> file during each project build or clean. Afterwards, the builder displays any appropriate warnings and errors in the
113
</b> pane. Each warning/error is plotted in the
114
<i><code>.spec</code></i> file as well; clicking an <code>rpmlint</code> warning/error in the
117
</b> pane will automatically place the insertion point on the corresponding section in the
118
<i><code>.spec</code></i> file.
121
<img border="0" src="images/Specfile_problems_rpmlint.png"/>
123
<h3 id="Quick_Fixes">Quick Fixes</h3>
124
<p>You can also directly resolve several warnings and errors through the
127
</b> menu. To access this menu, right-click on a warning or error from the
130
</b> pane and select <u>Quick Fix</u>.
132
<p>As the name suggests, the
135
</b> menu provides you with quick solutions to common
136
<i><code>.spec</code></i> file errors and problems. For example, <code>rpmlint</code> detected a <code>no-cleaning-of-buildroot</code> error in the following <code>%install</code> section from the <code>.spec</code> file:
139
<img border="0" src="images/Specfile_rpmlint_fix_before.png"/>
144
</b> menu can provide a solution for a particular error, it will be available in the menu. To apply it, simply select the solution (from the
147
</b> area) and the corresponding problem (from the
150
</b> area), then click the <u>Finish</u> button.
153
<img border="0" src="images/Specfile_rpmlint_quickfix.png"/>
155
<p>The following screenshot shows the revisions to the <code>%install</code> section applied by the
161
<img border="0" src="images/Specfile_rpmlint_fix_after.png"/>
163
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
165
<td style="width: 20%" align="left">
166
<a href="Installing.html" title="Installing">
167
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
170
<td style="width: 60%" align="center">
171
<a href="User-Guide.html" title="Specfile Editor User Guide">
172
<img alt="Specfile Editor User Guide" border="0" src="../../../images/home.gif"/>
175
<td style="width: 20%" align="right">
176
<a href="Import-src-rpm-and-export-rpm-and-src-rpm.html" title="Import src.rpm and export rpm and src.rpm">
177
<img alt="Next" border="0" src="../../../images/next.gif"/>
182
<td style="width: 20%" align="left" valign="top">Installing</td>
183
<td style="width: 60%" align="center"></td>
184
<td style="width: 20%" align="right" valign="top">Import src.rpm and export rpm and src.rpm</td>
b'\\ No newline at end of file'