~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/Linux_Tools_Project/SpecfileEditor/User_Guide/General-Usage.html

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
3
        <head>
 
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"/>
 
7
        </head>
 
8
        <body>
 
9
                <table class="navigation" style="width: 100%;" border="0" summary="navigation">
 
10
                        <tr>
 
11
                                <th style="width: 100%" align="center" colspan="3">General Usage</th>
 
12
                        </tr>
 
13
                        <tr>
 
14
                                <td style="width: 20%" align="left">
 
15
                                        <a href="Installing.html" title="Installing">
 
16
                                                <img alt="Previous" border="0" src="../../../images/prev.gif"/>
 
17
                                        </a>
 
18
                                </td>
 
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"/>
 
23
                                        </a>
 
24
                                </td>
 
25
                        </tr>
 
26
                        <tr>
 
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>
 
30
                        </tr>
 
31
                </table><hr/>
 
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:
 
35
                        <br/>
 
36
                        <img border="0" src="images/Specfile_generic.png"/>
 
37
                </p>
 
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> &gt; <u>New</u> &gt; <u>Other...</u> ; then, expand the <u>RPM Wizards</u> entry to select <u>New specfile based on a template</u>.
 
42
                </p>
 
43
                <p>
 
44
                        <img border="0" src="images/Specfile_new_wizard.png"/>
 
45
                </p>
 
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.
 
48
                </p>
 
49
                <p>
 
50
                        <img border="0" src="images/Specfile_new_from_template.png"/>
 
51
                </p>
 
52
                <p>The Specfile Creation wizard contains the following fields:</p>
 
53
                <dl>
 
54
                        <dt>Project</dt>
 
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 
 
58
                                <b>
 
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.
 
61
                        </dd>
 
62
                </dl>
 
63
                <dl>
 
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> .
 
68
                        </dd>
 
69
                </dl>
 
70
                <dl>
 
71
                        <dt>Version </dt>
 
72
                        <dd>This fills in the <code>Version:</code> line of the 
 
73
                                <i><code>.spec</code></i> file.
 
74
                        </dd>
 
75
                </dl>
 
76
                <dl>
 
77
                        <dt>Summary </dt>
 
78
                        <dd>This fills in the <code>Summary:</code> line of the 
 
79
                                <i><code>.spec</code></i> file.
 
80
                        </dd>
 
81
                </dl>
 
82
                <dl>
 
83
                        <dt>Group </dt>
 
84
                        <dd>This drop-down list allows you to select a package group to which the project belongs.</dd>
 
85
                </dl>
 
86
                <dl>
 
87
                        <dt>License </dt>
 
88
                        <dd>This fills in the <code>License:</code> line of the 
 
89
                                <i><code>.spec</code></i> file.
 
90
                        </dd>
 
91
                </dl>
 
92
                <dl>
 
93
                        <dt>URL </dt>
 
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.
 
96
                        </dd>
 
97
                </dl>
 
98
                <dl>
 
99
                        <dt>Source0 </dt>
 
100
                        <dd>This field specifies the source archive from which the package is built.</dd>
 
101
                </dl>
 
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.
 
105
                </p>
 
106
                <p>
 
107
                        <img border="0" src="images/Specfile_enable_rpmlint.png"/>
 
108
                </p>
 
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 
 
111
                        <b>
 
112
                                <i>Problems</i>
 
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 
 
115
                        <b>
 
116
                                <i>Problems</i>
 
117
                        </b> pane will automatically place the insertion point on the corresponding section in the 
 
118
                        <i><code>.spec</code></i> file.
 
119
                </p>
 
120
                <p>
 
121
                        <img border="0" src="images/Specfile_problems_rpmlint.png"/>
 
122
                </p>
 
123
                <h3 id="Quick_Fixes">Quick Fixes</h3>
 
124
                <p>You can also directly resolve several warnings and errors through the 
 
125
                        <b>
 
126
                                <i>Quick Fix</i>
 
127
                        </b> menu. To access this menu, right-click on a warning or error from the 
 
128
                        <b>
 
129
                                <i>Problems</i>
 
130
                        </b> pane and select <u>Quick Fix</u>.
 
131
                </p>
 
132
                <p>As the name suggests, the 
 
133
                        <b>
 
134
                                <i>Quick Fix</i>
 
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:
 
137
                </p>
 
138
                <p>
 
139
                        <img border="0" src="images/Specfile_rpmlint_fix_before.png"/>
 
140
                </p>
 
141
                <p>If the 
 
142
                        <b>
 
143
                                <i>Quick Fix</i>
 
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 
 
145
                        <b>
 
146
                                <i>Select a fix:</i>
 
147
                        </b> area) and the corresponding problem (from the 
 
148
                        <b>
 
149
                                <i>Problems:</i>
 
150
                        </b> area), then click the <u>Finish</u> button. 
 
151
                </p>
 
152
                <p>
 
153
                        <img border="0" src="images/Specfile_rpmlint_quickfix.png"/>
 
154
                </p>
 
155
                <p>The following screenshot shows the revisions to the <code>%install</code> section applied by the 
 
156
                        <b>
 
157
                                <i>Quick Fix</i>
 
158
                        </b> menu:
 
159
                </p>
 
160
                <p>
 
161
                        <img border="0" src="images/Specfile_rpmlint_fix_after.png"/>
 
162
                </p><hr/>
 
163
                <table class="navigation" style="width: 100%;" border="0" summary="navigation">
 
164
                        <tr>
 
165
                                <td style="width: 20%" align="left">
 
166
                                        <a href="Installing.html" title="Installing">
 
167
                                                <img alt="Previous" border="0" src="../../../images/prev.gif"/>
 
168
                                        </a>
 
169
                                </td>
 
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"/>
 
173
                                        </a>
 
174
                                </td>
 
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"/>
 
178
                                        </a>
 
179
                                </td>
 
180
                        </tr>
 
181
                        <tr>
 
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>
 
185
                        </tr>
 
186
                </table>
 
187
        </body>
 
188
</html>
 
 
b'\\ No newline at end of file'