Lines 9-21
Link Here
|
9 |
<author title="Author"><mail link="karltk@gentoo.org">Karl Trygve Kalleberg</mail></author> |
9 |
<author title="Author"><mail link="karltk@gentoo.org">Karl Trygve Kalleberg</mail></author> |
10 |
<author title="Author/Editor"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author> |
10 |
<author title="Author/Editor"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author> |
11 |
<author title="Editor"><mail link="seemant@gentoo.org">Seemant Kulleen</mail></author> |
11 |
<author title="Editor"><mail link="seemant@gentoo.org">Seemant Kulleen</mail></author> |
|
|
12 |
<author title="Editor"><mail link="avenj@gentoo.org">Jon Portnoy</mail></author> |
13 |
<author title="Editor"><mail link="vapier@gentoo.org">vapier</mail></author> |
14 |
|
12 |
<abstract> |
15 |
<abstract> |
13 |
This guide is meant to be the authoritative written reference for Gentoo Linux development policy. |
16 |
This guide is meant to be the authoritative written reference for Gentoo Linux development policy. |
14 |
It will be updated periodically to reflect new developer procedures. |
17 |
It will be updated periodically to reflect new developer procedures. |
15 |
</abstract> |
18 |
</abstract> |
16 |
|
19 |
|
17 |
<version>1.0.1</version> |
20 |
<version>1.0.2</version> |
18 |
<date>25 Mar 2003</date> |
21 |
<date>3 May 2003</date> |
19 |
|
22 |
|
20 |
<chapter> |
23 |
<chapter> |
21 |
<title>General guidelines</title> |
24 |
<title>General guidelines</title> |
Lines 37-47
Link Here
|
37 |
settings.</li> |
40 |
settings.</li> |
38 |
|
41 |
|
39 |
<li>Don't be afraid to consult our on-line documentation and ebuilds written |
42 |
<li>Don't be afraid to consult our on-line documentation and ebuilds written |
40 |
and maintained by more senior developers.</li> |
43 |
and maintained by more senior developers. Feel free to contact senior |
|
|
44 |
developers directly with any technical or policy questions.</li> |
45 |
|
46 |
<li>Be cautious about what you commit. Remember that your commits |
47 |
can potentially harm thousands of users. If your commits cause any breakage |
48 |
in the tree, it must be fixed in a timely fashion.</li> |
49 |
|
41 |
</ul> |
50 |
</ul> |
42 |
</body> |
51 |
</body> |
43 |
</section> |
52 |
</section> |
44 |
</chapter> |
53 |
</chapter> |
|
|
54 |
|
45 |
<chapter> |
55 |
<chapter> |
46 |
<title>Ebuild policy</title> |
56 |
<title>Ebuild policy</title> |
47 |
<section> |
57 |
<section> |
Lines 56-115
Link Here
|
56 |
the literal package name. <c>#</c> represents any non-zero positive |
66 |
the literal package name. <c>#</c> represents any non-zero positive |
57 |
integer.</note> |
67 |
integer.</note> |
58 |
|
68 |
|
59 |
<p>The first <c>pkg</c> section is the package name, which should only contain |
69 |
<p> |
|
|
70 |
The first <c>pkg</c> section is the package name, which should only contain |
60 |
lowercase letters, the digits 0-9, and any number of single hyphen (<c>-</c>) |
71 |
lowercase letters, the digits 0-9, and any number of single hyphen (<c>-</c>) |
61 |
characters. Examples: <c>util-linux</c>, <c>sysklogd</c>, <c>glibc</c>. We have |
72 |
characters. Examples: <c>util-linux</c>, <c>sysklogd</c>, <c>glibc</c>. We have |
62 |
some packages in Portage that don't follow these rules, but <i>your</i> |
73 |
some packages in Portage that don't follow these rules, but <i>your</i> |
63 |
packages should.</p> |
74 |
packages should. |
|
|
75 |
</p> |
64 |
|
76 |
|
65 |
<p>The <c>ver</c> second section is the version of the package, which should |
77 |
<p> |
|
|
78 |
The <c>ver</c> second section is the version of the package, which should |
66 |
normally be same as the version on the main source tarball. The version is |
79 |
normally be same as the version on the main source tarball. The version is |
67 |
normally made up of two or three (or more) numbers separated by periods, such |
80 |
normally made up of two or three (or more) numbers separated by periods, such |
68 |
as <c>1.2</c> or <c>4.5.2</c>, and may have a single letter immediately |
81 |
as <c>1.2</c> or <c>4.5.2</c>, and may have a single letter immediately |
69 |
following the last digit, e.g., <c>1.4b</c> or <c>2.6h</c>. The package version |
82 |
following the last digit, e.g., <c>1.4b</c> or <c>2.6h</c>. The package version |
70 |
is joined to the package name with a hyphen. Examples: <c>foo-1.0</c>, |
83 |
is joined to the package name with a hyphen. Examples: <c>foo-1.0</c>, |
71 |
<c>bar-2.4.6</c>.</p> |
84 |
<c>bar-2.4.6</c>. |
|
|
85 |
</p> |
72 |
|
86 |
|
73 |
<p>The third <c>{_suf{#}}</c> section is optional may contain one of these |
87 |
<p> |
74 |
predefined suffixes, listed in least-recent to most-recent order:</p> |
88 |
The third <c>{_suf{#}}</c> section is optional may contain one of these |
|
|
89 |
predefined suffixes, listed in least-recent to most-recent order: |
90 |
</p> |
75 |
|
91 |
|
76 |
<table> |
92 |
<table> |
77 |
<tr><th>Suffix</th><th>Meaning</th></tr> |
93 |
<tr><th>Suffix</th><th>Meaning</th></tr> |
78 |
<tr><ti><c>_alpha</c></ti><ti>Alpha release</ti></tr> |
94 |
<tr><ti><c>_alpha</c></ti><ti>Alpha release</ti></tr> |
79 |
<tr><ti><c>_beta</c></ti><ti>Beta release</ti></tr> |
95 |
<tr><ti><c>_beta</c></ti><ti>Beta release</ti></tr> |
80 |
<tr><ti><c>_pre</c></ti><ti>Prerelease</ti></tr> |
96 |
<tr><ti><c>_pre</c></ti><ti>Prerelease</ti></tr> |
81 |
<tr><ti><c>_rc</c></ti><ti>Release candidate</ti></tr> |
97 |
<tr><ti><c>_rc</c></ti><ti>Release candidate</ti></tr> |
82 |
<tr><ti>(none)</ti><ti>Normal release</ti></tr> |
98 |
<tr><ti>(none)</ti><ti>Normal release</ti></tr> |
83 |
<tr><ti><c>_p</c></ti><ti>Patch level (normally accompanied by trailing integer)</ti></tr> |
99 |
<tr><ti><c>_p</c></ti><ti>Patch level (normally accompanied by trailing integer)</ti></tr> |
84 |
</table> |
100 |
</table> |
85 |
|
101 |
|
86 |
<p> Any of these suffixes may be immediately followed by a non-zero positive |
102 |
<p> |
|
|
103 |
Any of these suffixes may be immediately followed by a non-zero positive |
87 |
integer, e.g., <c>linux-2.4.0_pre10</c>. Assuming identical version parts, the |
104 |
integer, e.g., <c>linux-2.4.0_pre10</c>. Assuming identical version parts, the |
88 |
suffixes are ordered as follows (lower means older): <c>_alpha</c> < |
105 |
suffixes are ordered as follows (lower means older): <c>_alpha</c> < |
89 |
<c>_beta</c> < <c>_pre</c> < <c>_rc</c> < (no suffix) < |
106 |
<c>_beta</c> < <c>_pre</c> < <c>_rc</c> < (no suffix) < |
90 |
<c>_p</c></p> |
107 |
<c>_p</c> |
|
|
108 |
</p> |
91 |
|
109 |
|
92 |
<p>When comparing identical suffixes with trailing integers, the one with the |
110 |
<p> |
|
|
111 |
When comparing identical suffixes with trailing integers, the one with the |
93 |
larger integer will be considered most recent. Example: <c>foo-1.0_alpha4</c> |
112 |
larger integer will be considered most recent. Example: <c>foo-1.0_alpha4</c> |
94 |
is more recent than <c>foo-1.0_alpha3</c>.</p> |
113 |
is more recent than <c>foo-1.0_alpha3</c>. |
|
|
114 |
</p> |
95 |
|
115 |
|
96 |
<p>The fourth section of the package name is the Gentoo Linux-specific revision |
116 |
<p> |
|
|
117 |
The fourth section of the package name is the Gentoo Linux-specific revision |
97 |
number (<c>{-r#}</c>). This section, like the suffix, is also optional. |
118 |
number (<c>{-r#}</c>). This section, like the suffix, is also optional. |
98 |
<c>#</c> is a non-zero positive integer, e.g. <c>package-4.5.3-r3</c>. </p> |
119 |
<c>#</c> is a non-zero positive integer, e.g. <c>package-4.5.3-r3</c>. |
|
|
120 |
</p> |
99 |
|
121 |
|
100 |
<p>This revision number is independent of the version of the source tarball and |
122 |
<p> |
|
|
123 |
This revision number is independent of the version of the source tarball and |
101 |
is used to inform people that a new and improved Gentoo Linux revision of a |
124 |
is used to inform people that a new and improved Gentoo Linux revision of a |
102 |
particular package is available. Initial releases of ebuilds must have no |
125 |
particular package is available. Initial releases of ebuilds must have no |
103 |
revision number, e.g. <c>package-4.5.3</c> and are considered by Portage to |
126 |
revision number, e.g. <c>package-4.5.3</c> and are considered by Portage to |
104 |
have a revision number of zero. This means that counting goes as follows: |
127 |
have a revision number of zero. This means that counting goes as follows: |
105 |
<c>1.0</c> (initial version), <c>1.0-r1</c>, <c>1.0-r2</c>, etc. </p> |
128 |
<c>1.0</c> (initial version), <c>1.0-r1</c>, <c>1.0-r2</c>, etc. |
|
|
129 |
</p> |
130 |
|
106 |
</body> |
131 |
</body> |
107 |
</section> |
132 |
</section> |
|
|
133 |
|
108 |
<section> |
134 |
<section> |
109 |
<title>Versioning and revision bumps</title> |
135 |
<title>Versioning and revision bumps</title> |
110 |
<body> |
136 |
<body> |
111 |
|
137 |
|
112 |
<p>Package revision numbers should be incremented by Gentoo Linux developers |
138 |
<p> |
|
|
139 |
Package revision numbers should be incremented by Gentoo Linux developers |
113 |
when the ebuild has changed to the point where users would want to upgrade. |
140 |
when the ebuild has changed to the point where users would want to upgrade. |
114 |
Typically, this is the case when fixes are made to an ebuild that affect the |
141 |
Typically, this is the case when fixes are made to an ebuild that affect the |
115 |
resultant installed files, but the ebuild uses the same source tarball as the |
142 |
resultant installed files, but the ebuild uses the same source tarball as the |
Lines 120-139
Link Here
|
120 |
those for whom it worked perfectly would see no benefit in installing a new |
147 |
those for whom it worked perfectly would see no benefit in installing a new |
121 |
revision, and those who experienced the problem do not have the package |
148 |
revision, and those who experienced the problem do not have the package |
122 |
installed (since compilation failed) and thus have no need for the new revision |
149 |
installed (since compilation failed) and thus have no need for the new revision |
123 |
number to force an upgrade.</p> |
150 |
number to force an upgrade. |
|
|
151 |
</p> |
124 |
|
152 |
|
125 |
<impo>Whenever you create a new revision of an ebuild, be sure to update the |
153 |
<impo> |
|
|
154 |
Whenever you create a new revision of an ebuild, be sure to update the |
126 |
<path>ChangeLog</path> file in the ebuild directory. Failing to do so is |
155 |
<path>ChangeLog</path> file in the ebuild directory. Failing to do so is |
127 |
considered to be in very poor taste and may result in disciplinary |
156 |
considered to be in very poor taste and may result in disciplinary |
128 |
action.</impo> |
157 |
action. |
|
|
158 |
</impo> |
129 |
|
159 |
|
130 |
</body> |
160 |
</body> |
131 |
</section> |
161 |
</section> |
|
|
162 |
|
132 |
<section> |
163 |
<section> |
133 |
<title>Virtuals</title> |
164 |
<title>Virtuals</title> |
134 |
<body> |
165 |
<body> |
135 |
|
166 |
|
136 |
<p>Portage supports a concept called "virtual" packages. Using virtual |
167 |
<p> |
|
|
168 |
Portage supports a concept called "virtual" packages. Using virtual |
137 |
packages, it is possible to have a particular category/package name map to |
169 |
packages, it is possible to have a particular category/package name map to |
138 |
another. Here's an example of how to use virtual packages. Let's say you create |
170 |
another. Here's an example of how to use virtual packages. Let's say you create |
139 |
a new cron package called <c>foocron</c>. Gentoo Linux is currently set up so |
171 |
a new cron package called <c>foocron</c>. Gentoo Linux is currently set up so |
Lines 141-162
Link Here
|
141 |
<c>virtual/cron</c> package. This allows ebuilds to ensure that there is some |
173 |
<c>virtual/cron</c> package. This allows ebuilds to ensure that there is some |
142 |
kind of cron available while allowing users the flexibility to install the cron |
174 |
kind of cron available while allowing users the flexibility to install the cron |
143 |
package that they prefer. To plug your <path>foocron-1.0.ebuild</path> into |
175 |
package that they prefer. To plug your <path>foocron-1.0.ebuild</path> into |
144 |
this system, you'd add a line to the ebuild that reads:</p> |
176 |
this system, you'd add a line to the ebuild that reads: |
|
|
177 |
</p> |
145 |
|
178 |
|
146 |
<pre> |
179 |
<pre> |
147 |
PROVIDE="virtual/cron" |
180 |
PROVIDE="virtual/cron" |
148 |
</pre> |
181 |
</pre> |
149 |
|
182 |
|
150 |
<p>Now, when <c>foocron-1.0</c> is installed, the <c>virtual/cron</c> package |
183 |
<p> |
|
|
184 |
Now, when <c>foocron-1.0</c> is installed, the <c>virtual/cron</c> package |
151 |
will be registered. If you didn't have any cron package installed before, this |
185 |
will be registered. If you didn't have any cron package installed before, this |
152 |
would mean that any package <e>depending</e> on <c>virtual/cron</c> would have |
186 |
would mean that any package <e>depending</e> on <c>virtual/cron</c> would have |
153 |
that dependency fully satisfied. Note that it is possible to specify a |
187 |
that dependency fully satisfied. Note that it is possible to specify a |
154 |
<c>PROVIDE</c> value for any type of package -- it need not begin with |
188 |
<c>PROVIDE</c> value for any type of package -- it need not begin with |
155 |
<c>virtual/</c>. However, you <e>should</e> use the <c>virtual/</c> category |
189 |
<c>virtual/</c>. However, you <e>should</e> use the <c>virtual/</c> category |
156 |
unless you are using the <c>PROVIDE</c> functionality to handle packages that |
190 |
unless you are using the <c>PROVIDE</c> functionality to handle packages that |
157 |
have been renamed. </p> |
191 |
have been renamed. |
|
|
192 |
</p> |
158 |
|
193 |
|
159 |
<p>There is a second component to the Gentoo Linux virtuals implementation. |
194 |
<p> |
|
|
195 |
There is a second component to the Gentoo Linux virtuals implementation. |
160 |
What would happen if there were no installed package that provided |
196 |
What would happen if there were no installed package that provided |
161 |
<c>virtual/cron</c>? How would Portage choose the "correct" cron to install to |
197 |
<c>virtual/cron</c>? How would Portage choose the "correct" cron to install to |
162 |
satisfy the <c>virtual/cron</c> dependency? Portage takes care of this |
198 |
satisfy the <c>virtual/cron</c> dependency? Portage takes care of this |
Lines 164-170
Link Here
|
164 |
<path>virtuals</path> which is stored in the profile directory |
200 |
<path>virtuals</path> which is stored in the profile directory |
165 |
<path>/etc/make.profile</path>. If you take a look at your |
201 |
<path>/etc/make.profile</path>. If you take a look at your |
166 |
<path>virtuals</path> file, you'll find that the contents look something like |
202 |
<path>virtuals</path> file, you'll find that the contents look something like |
167 |
this: </p> |
203 |
this: |
|
|
204 |
</p> |
168 |
|
205 |
|
169 |
<pre caption="Sample virtuals file"> |
206 |
<pre caption="Sample virtuals file"> |
170 |
virtual/lpr net-print/cups |
207 |
virtual/lpr net-print/cups |
Lines 172-249
Link Here
|
172 |
virtual/mta net-mail/ssmtp |
209 |
virtual/mta net-mail/ssmtp |
173 |
</pre> |
210 |
</pre> |
174 |
|
211 |
|
175 |
<p>The first line of this file tells Portage that if a package depends on |
212 |
<p> |
|
|
213 |
The first line of this file tells Portage that if a package depends on |
176 |
<c>virtual/lpr</c> and no <c>virtual/lpr</c> is installed and no |
214 |
<c>virtual/lpr</c> and no <c>virtual/lpr</c> is installed and no |
177 |
<c>virtual/lpr</c> package is available in the Portage tree, then |
215 |
<c>virtual/lpr</c> package is available in the Portage tree, then |
178 |
<c>net-print/cups</c> should be installed to satisfy this dependency. |
216 |
<c>net-print/cups</c> should be installed to satisfy this dependency. |
179 |
<c>net-print/cups</c> contains a line that reads <c>PROVIDE="virtual/lpr"</c> |
217 |
<c>net-print/cups</c> contains a line that reads <c>PROVIDE="virtual/lpr"</c> |
180 |
so that future dependencies on <c>virtual/lpr</c> will be satisfied.</p> |
218 |
so that future dependencies on <c>virtual/lpr</c> will be satisfied. |
|
|
219 |
</p> |
181 |
|
220 |
|
182 |
<p>Now for the developer guidelines. If you were to add the <c>foocron</c> |
221 |
<p> |
|
|
222 |
Now for the developer guidelines. If you were to add the <c>foocron</c> |
183 |
package, you would obviously want to ensure that all programs that depend upon |
223 |
package, you would obviously want to ensure that all programs that depend upon |
184 |
<c>virtual/cron</c> are able to work correctly with it. And if you were to add |
224 |
<c>virtual/cron</c> are able to work correctly with it. And if you were to add |
185 |
a package named <c>foobarosity</c> that depended on <c>virtual/cron</c>, you |
225 |
a package named <c>foobarosity</c> that depended on <c>virtual/cron</c>, you |
186 |
should likewise ensure that all packages that provide <c>virtual/cron</c> will |
226 |
should likewise ensure that all packages that provide <c>virtual/cron</c> will |
187 |
be satisfactory for the proper functioning of <c>foobarosity</c>.</p> |
227 |
be satisfactory for the proper functioning of <c>foobarosity</c>. |
|
|
228 |
</p> |
229 |
|
230 |
<p> |
231 |
Before creating new virtual packages, please begin a discussion on the |
232 |
internal developer mailing list about that virtual. Keeping developers |
233 |
informed of new virtuals is essential to ensure uniform use of |
234 |
virtuals. |
235 |
</p> |
236 |
|
188 |
</body> |
237 |
</body> |
189 |
</section> |
238 |
</section> |
|
|
239 |
|
190 |
<section> |
240 |
<section> |
191 |
<title>CVS sources policy</title> |
241 |
<title>CVS sources policy</title> |
192 |
<body> |
242 |
<body> |
193 |
|
243 |
|
194 |
<p>There are two different ways to build an ebuild based on sources from a CVS |
244 |
<p> |
|
|
245 |
There are two different ways to build an ebuild based on sources from a CVS |
195 |
development tree. The first and traditional way is to create a "CVS snapshot" |
246 |
development tree. The first and traditional way is to create a "CVS snapshot" |
196 |
ebuild by creating your own tarball snapshot of the upstream CVS tree, |
247 |
ebuild by creating your own tarball snapshot of the upstream CVS tree, |
197 |
mirroring the sources on our official distfile repository, and writing an |
248 |
mirroring the sources on our official distfile repository, and writing an |
198 |
ebuild to specifically use this tarball snapshot. These types of CVS ebuilds |
249 |
ebuild to specifically use this tarball snapshot. These types of CVS ebuilds |
199 |
will be referred to as "CVS snapshot ebuilds" below.</p> <p>The other method of |
250 |
will be referred to as "CVS snapshot ebuilds" below. |
|
|
251 |
</p> |
252 |
|
253 |
<p> |
254 |
The other method of |
200 |
creating a CVS-based ebuild is to use <path>cvs.eclass</path> to create a |
255 |
creating a CVS-based ebuild is to use <path>cvs.eclass</path> to create a |
201 |
"live" CVS ebuild. Such an ebuild will dynamically grab the latest development |
256 |
"live" CVS ebuild. Such an ebuild will dynamically grab the latest development |
202 |
sources from a CVS repository at "fetch" time, ensuring that the sources are as |
257 |
sources from a CVS repository at "fetch" time, ensuring that the sources are as |
203 |
up-to-date as possible. These types of CVS ebuilds will be referred to as |
258 |
up-to-date as possible. These types of CVS ebuilds will be referred to as |
204 |
"'live' ebuilds" below.</p> |
259 |
"'live' ebuilds" below. |
|
|
260 |
</p> |
205 |
|
261 |
|
206 |
<p>The following paragraphs detail the policy relating to the use of CVS-based |
262 |
<p> |
|
|
263 |
The following paragraphs detail the policy relating to the use of CVS-based |
207 |
ebuilds. Note that there are strict rules relating to the addition of such |
264 |
ebuilds. Note that there are strict rules relating to the addition of such |
208 |
ebuilds to the Portage tree.</p> |
265 |
ebuilds to the Portage tree. |
|
|
266 |
</p> |
209 |
|
267 |
|
210 |
<p>Snapshot cvs ebuilds are greatly preferred over "live" <path>cvs.eclass</path> |
268 |
<p> |
211 |
cvs ebuilds.</p> |
269 |
Snapshot cvs ebuilds are greatly preferred over "live" <path>cvs.eclass</path> |
|
|
270 |
cvs ebuilds. |
271 |
</p> |
212 |
|
272 |
|
213 |
<p>Snapshot cvs ebuilds are allowed if a cvs snapshot contains known fixes that |
273 |
<p> |
|
|
274 |
Snapshot cvs ebuilds are allowed if a cvs snapshot contains known fixes that |
214 |
are needed for proper operation of a software package, or if the cvs version of |
275 |
are needed for proper operation of a software package, or if the cvs version of |
215 |
a particular software package is known to or has been proven to simply "work |
276 |
a particular software package is known to or has been proven to simply "work |
216 |
better" than the normal release version.</p> |
277 |
better" than the normal release version. |
|
|
278 |
</p> |
217 |
|
279 |
|
218 |
<p>"live" <path>cvs.eclass</path> ebuilds are generally only intended for the |
280 |
<p> |
|
|
281 |
"live" <path>cvs.eclass</path> ebuilds are generally only intended for the |
219 |
convenience of developers and should always be masked with a <c>~[arch]</c> |
282 |
convenience of developers and should always be masked with a <c>~[arch]</c> |
220 |
keyword. It is impossible to guarantee the reliability of a "live" |
283 |
keyword. It is impossible to guarantee the reliability of a "live" |
221 |
<path>cvs.eclass</path> ebuild since the upstream cvs tree may change at any |
284 |
<path>cvs.eclass</path> ebuild since the upstream cvs tree may change at any |
222 |
time, which is why they should always be masked.</p> |
285 |
time, which is why they should always be masked. |
|
|
286 |
</p> |
223 |
|
287 |
|
224 |
<p>Whether a "live" cvs ebuild or a "snapshot" CVS ebuild, <b>you the |
288 |
<p> |
|
|
289 |
Whether a "live" cvs ebuild or a "snapshot" CVS ebuild, <b>you the |
225 |
developer are responsible for ensuring that the ebuild works correctly</b>. |
290 |
developer are responsible for ensuring that the ebuild works correctly</b>. |
226 |
This is particularly difficult to do with "live" cvs ebuilds for obvious |
291 |
This is particularly difficult to do with "live" cvs ebuilds for obvious |
227 |
reasons.</p> |
292 |
reasons. |
|
|
293 |
</p> |
228 |
|
294 |
|
229 |
<p>If ebuilds (of any kind) do not work correctly or are flaky, they should be |
295 |
<p> |
|
|
296 |
If ebuilds (of any kind) do not work correctly or are flaky, they should be |
230 |
fixed or removed from the Portage tree. If they are "live" ebuilds, they may be |
297 |
fixed or removed from the Portage tree. If they are "live" ebuilds, they may be |
231 |
<c>~[arch]</c> keyword masked for their lifetime (this special exception is |
298 |
<c>~[arch]</c> keyword masked for their lifetime (this special exception is |
232 |
detailed below.) </p> |
299 |
detailed below). |
|
|
300 |
</p> |
233 |
|
301 |
|
234 |
<p>If a user or users specifically request a "live" cvs ebuild, you can add one |
302 |
<p> |
|
|
303 |
If a user or users specifically request a "live" cvs ebuild, you can add one |
235 |
for them. It should have a <c>~[arch]</c> keyword so that other users don't |
304 |
for them. It should have a <c>~[arch]</c> keyword so that other users don't |
236 |
merge it unsuspectingly. </p> |
305 |
merge it unsuspectingly. |
|
|
306 |
</p> |
237 |
|
307 |
|
238 |
<p>This way, the user(s) requesting them (likely developers) can install |
308 |
<p> |
|
|
309 |
This way, the user(s) requesting them (likely developers) can install |
239 |
them but other users will be protected from merging them accidentally. |
310 |
them but other users will be protected from merging them accidentally. |
240 |
Again, this only applies to situations where a user or users |
311 |
Again, this only applies to situations where a user or users |
241 |
specifically request a "live" <path>cvs.eclass</path> CVS ebuild. Snapshot |
312 |
specifically request a "live" <path>cvs.eclass</path> CVS ebuild. Snapshot |
242 |
ebuilds should only be added to the Portage tree with the intention that they |
313 |
ebuilds should only be added to the Portage tree with the intention that they |
243 |
are stable and provide better functionality than the normal release versions |
314 |
are stable and provide better functionality than the normal release versions |
244 |
of said software.</p> |
315 |
of said software. |
|
|
316 |
</p> |
245 |
|
317 |
|
246 |
<impo>Snapshot ebuilds of <e>pre-release</e> CVS sources should be named as |
318 |
<impo> |
|
|
319 |
Snapshot ebuilds of <e>pre-release</e> CVS sources should be named as |
247 |
follows: <path>foo-x.y_preYYYYMMDD.ebuild</path>. <c>foo</c> is the package |
320 |
follows: <path>foo-x.y_preYYYYMMDD.ebuild</path>. <c>foo</c> is the package |
248 |
name, <c>x.y</c> is the version number of the <e>upcoming</e> release, |
321 |
name, <c>x.y</c> is the version number of the <e>upcoming</e> release, |
249 |
<c>_pre</c> is a literal string, and <c>YYYYMMDD</c> is a timestamp of the day |
322 |
<c>_pre</c> is a literal string, and <c>YYYYMMDD</c> is a timestamp of the day |
Lines 254-274
Link Here
|
254 |
snapshots of <e>already-released</e> CVS sources, use the format |
327 |
snapshots of <e>already-released</e> CVS sources, use the format |
255 |
<path>foo-x.y_pYYYYMMDD.ebuild</path> (notice the <c>_p</c> for "patchlevel.") |
328 |
<path>foo-x.y_pYYYYMMDD.ebuild</path> (notice the <c>_p</c> for "patchlevel.") |
256 |
This will ensure that your CVS ebuild will be considered <e>newer</e> than the |
329 |
This will ensure that your CVS ebuild will be considered <e>newer</e> than the |
257 |
standard <c>x.y</c> release.</impo> |
330 |
standard <c>x.y</c> release. |
|
|
331 |
</impo> |
258 |
|
332 |
|
259 |
<impo>Currently, the policy for naming "live" cvs ebuilds is to ensure that the |
333 |
<impo> |
|
|
334 |
Currently, the policy for naming "live" cvs ebuilds is to ensure that the |
260 |
package name ends with <c>-cvs</c>. In the future, a <c>_cvs</c> version suffix |
335 |
package name ends with <c>-cvs</c>. In the future, a <c>_cvs</c> version suffix |
261 |
will likely be added to Portage and this policy will be updated.</impo> |
336 |
will likely be added to Portage and this policy will be updated. |
|
|
337 |
</impo> |
262 |
|
338 |
|
263 |
</body> |
339 |
</body> |
264 |
</section> |
340 |
</section> |
|
|
341 |
|
265 |
<section> |
342 |
<section> |
266 |
<title>User-submitted ebuilds</title> |
343 |
<title>User-submitted ebuilds</title> |
267 |
<body> |
344 |
<body> |
268 |
<p>User-submitted ebuilds should never be blindly trusted and should always be |
345 |
|
|
|
346 |
<p> |
347 |
User-submitted ebuilds should never be blindly trusted and should always be |
269 |
well-tested and audited before being committed to CVS. <b>If a user-submitted |
348 |
well-tested and audited before being committed to CVS. <b>If a user-submitted |
270 |
ebuild has problems, you will be held accountable.</b> By committing it to CVS, |
349 |
ebuild has problems, you will be held accountable.</b> By committing it to CVS, |
271 |
you are vouching that the ebuild meets all Gentoo Linux development standards.</p> |
350 |
you are vouching that the ebuild meets all Gentoo Linux development standards. |
|
|
351 |
</p> |
272 |
|
352 |
|
273 |
<p>Make sure that the user-submitted ebuild doesn't contain custom headers like this:</p> |
353 |
<p>Make sure that the user-submitted ebuild doesn't contain custom headers like this:</p> |
274 |
|
354 |
|
Lines 276-284
Link Here
|
276 |
# Ebuild updated by: me <me@me.com> |
356 |
# Ebuild updated by: me <me@me.com> |
277 |
</pre> |
357 |
</pre> |
278 |
|
358 |
|
279 |
<p>This information should be added to the <path>ChangeLog</path> using proper ChangeLog |
359 |
<p> |
|
|
360 |
This information should be added to the <path>ChangeLog</path> using proper ChangeLog |
280 |
comment syntax. <b>Always ensure that the ChangeLog gives proper credit to the user |
361 |
comment syntax. <b>Always ensure that the ChangeLog gives proper credit to the user |
281 |
who submitted the ebuild. This information should appear in the first ChangeLog entry.</b></p> |
362 |
who submitted the ebuild. This information should appear in the first ChangeLog entry.</b> |
|
|
363 |
</p> |
282 |
|
364 |
|
283 |
<p>Also ensure that any new ebuilds you commit contain the following line:</p> |
365 |
<p>Also ensure that any new ebuilds you commit contain the following line:</p> |
284 |
<pre> |
366 |
<pre> |
Lines 287-310
Link Here
|
287 |
<p>Quite a few user-submitted ebuilds are based on files from rsync, which can contain |
369 |
<p>Quite a few user-submitted ebuilds are based on files from rsync, which can contain |
288 |
incorrect header lines.</p> |
370 |
incorrect header lines.</p> |
289 |
|
371 |
|
290 |
<p>Encourage users to submit diffs to existing ebuilds if they are submitting |
372 |
<p> |
|
|
373 |
Encourage users to submit diffs to existing ebuilds if they are submitting |
291 |
an upgrade. By doing this, we can help avoid the re-introduction of |
374 |
an upgrade. By doing this, we can help avoid the re-introduction of |
292 |
previously-fixed bugs into our "new" ebuilds. If you are not working from a user-submitted |
375 |
previously-fixed bugs into our "new" ebuilds. If you are not working from a user-submitted |
293 |
diff but a complete ebuild, then use the <c>diff</c> command to see what has changed, keeping |
376 |
diff but a complete ebuild, then use the <c>diff</c> command to see what has changed, keeping |
294 |
an eye open for anything from our current ebuild that should appear in the new ebuild, or |
377 |
an eye open for anything from our current ebuild that should appear in the new ebuild, or |
295 |
anything in the new ebuild that should be fixed or removed.</p> |
378 |
anything in the new ebuild that should be fixed or removed. |
|
|
379 |
</p> |
296 |
|
380 |
|
297 |
<p>In general, let the user do the work required to get his or her ebuild up to par, unless |
381 |
<p> |
|
|
382 |
In general, let the user do the work required to get his or her ebuild up to par, unless |
298 |
you <e>want</e> to clean up the ebuild on his or her behalf. Even so, it's often better |
383 |
you <e>want</e> to clean up the ebuild on his or her behalf. Even so, it's often better |
299 |
to have the user do the work so that they can learn from their mistakes and submit cleaner ebuilds |
384 |
to have the user do the work so that they can learn from their mistakes and submit cleaner ebuilds |
300 |
in the future. Be sure to be thankful for any submission, even if it isn't very good. Be polite |
385 |
in the future. Be sure to be thankful for any submission, even if it isn't very good. Be polite |
301 |
but honest -- if an ebuild isn't usable, the user can be told in a way that does not insult their |
386 |
but honest -- if an ebuild isn't usable, the user can be told in a way that does not insult their |
302 |
current ebuild-writing abilities. Remember that the user who submitted that broken ebuild may |
387 |
current ebuild-writing abilities. Remember that the user who submitted that broken ebuild may |
303 |
be a skilled and productive member of our project in the future -- that is, if they receive the right |
388 |
be a skilled an productive member of our project in the future -- that is, if they receive the right |
304 |
amount of encouragement and support and continue to improve in their abilities.</p> |
389 |
amount of encouragement and support and continue to improve in their abilities. |
|
|
390 |
</p> |
391 |
|
305 |
</body> |
392 |
</body> |
306 |
</section> |
393 |
</section> |
|
|
394 |
|
395 |
|
307 |
</chapter> |
396 |
</chapter> |
|
|
397 |
|
308 |
<chapter> |
398 |
<chapter> |
309 |
<title>QA policy</title> |
399 |
<title>QA policy</title> |
310 |
<section> |
400 |
<section> |
Lines 316-328
Link Here
|
316 |
Only the Portage Maintainer has the |
406 |
Only the Portage Maintainer has the |
317 |
authority to roll new releases of Portage for use by users, either |
407 |
authority to roll new releases of Portage for use by users, either |
318 |
masked or unmasked versions. <b>No one</b> else is allowed to roll new |
408 |
masked or unmasked versions. <b>No one</b> else is allowed to roll new |
319 |
releases of Portage. </p> |
409 |
releases of Portage. |
|
|
410 |
</p> |
320 |
|
411 |
|
321 |
<p> |
412 |
<p> |
322 |
The only exception to this rule is for situations where the Portage Maintainer may be |
413 |
The only exception to this rule is for situations where the Portage Maintainer may be |
323 |
unavailable for extended periods of time and there is a major bug in |
414 |
unavailable for extended periods of time and there is a major bug in |
324 |
Portage. In this emergency situation, it would be allowable for a senior |
415 |
Portage. In this emergency situation, it would be allowable for a senior |
325 |
developer to test the fix and then roll a new release. </p> |
416 |
developer to test the fix and then roll a new release. |
|
|
417 |
</p> |
326 |
|
418 |
|
327 |
<p> |
419 |
<p> |
328 |
Before using this "escape clause," please ask yourself: is the Portage Maintainer really |
420 |
Before using this "escape clause," please ask yourself: is the Portage Maintainer really |
Lines 356-384
Link Here
|
356 |
|
448 |
|
357 |
</body> |
449 |
</body> |
358 |
</section> |
450 |
</section> |
|
|
451 |
|
452 |
<section> |
453 |
<title>Masked packages</title> |
454 |
<body> |
455 |
|
456 |
<p> |
457 |
/usr/portage/profiles/package.mask contains a list of packages that should not be merged |
458 |
by users and comments detailing the specific reason why. Package.mask |
459 |
is used to prevent merging of packages that are broken, break something else, or badly |
460 |
need testing before going into ~ARCH KEYWORDS in the tree. When adding to package.mask, |
461 |
always commit package.mask prior to committing the masked ebuild. This prevents |
462 |
the ebuild from hitting users before the updated package.mask does. |
463 |
</p> |
464 |
|
465 |
<p> |
466 |
Great care must be taken any time a package is removed from /usr/portage/package.mask. |
467 |
Keep in mind that if an ebuild is in package.mask, it's there for a reason. |
468 |
If you didn't mask the ebuild, always contact the developer listed in the |
469 |
package.mask comments prior to taking any action. Additionally, if the |
470 |
masked ebuild is a core package, a dependency of a core package, or the unmasking |
471 |
has any possibility for adverse effects, the change must be discussed internally |
472 |
on the developer mailing list. |
473 |
</p> |
474 |
|
475 |
</body> |
476 |
</section> |
359 |
</chapter> |
477 |
</chapter> |
|
|
478 |
|
360 |
<chapter> |
479 |
<chapter> |
361 |
<title>Variables</title> |
480 |
<title>Variables</title> |
|
|
481 |
|
362 |
<section> |
482 |
<section> |
363 |
<title>Required variables</title> |
483 |
<title>Required variables</title> |
364 |
<body> |
484 |
<body> |
365 |
<p>Gentoo Linux policy requires that all ebuilds contain <c>KEYWORDS</c>, <c>LICENSE</c> and <c>SLOT</c> variables. |
485 |
<p> |
366 |
<c>HOMEPAGE</c>, <c>SRC_URI</c> and <c>DESCRIPTION</c> should also be included except for special circumstances, |
486 |
Gentoo Linux policy requires that all ebuilds contain <c>KEYWORDS</c>, <c>LICENSE</c>, |
367 |
and <c>DEPEND</c> (and if necessary, <c>RDEPEND</c>) should be included if your package has any build or runtime dependencies |
487 |
and <c>SLOT</c> variables. <c>HOMEPAGE</c>, <c>SRC_URI</c> and <c>DESCRIPTION</c> |
368 |
respectively. |
488 |
should also be included except for special circumstances. <c>DEPEND</c> (and if |
|
|
489 |
necessary, <c>RDEPEND</c>) should be included if your package has any build or |
490 |
runtime dependencies, respectively. |
369 |
</p> |
491 |
</p> |
370 |
</body> |
492 |
</body> |
371 |
</section> |
493 |
</section> |
|
|
494 |
|
372 |
<section> |
495 |
<section> |
373 |
<title>DEPEND and RDEPEND</title> |
496 |
<title>DEPEND and RDEPEND</title> |
374 |
<body> |
497 |
<body> |
375 |
|
498 |
|
376 |
<p>Use <c>DEPEND</c> to define the dependencies required for building a |
499 |
<p> |
|
|
500 |
Use <c>DEPEND</c> to define the dependencies required for building a |
377 |
particular package, and set <c>RDEPEND</c> to the dependencies required to |
501 |
particular package, and set <c>RDEPEND</c> to the dependencies required to |
378 |
<e>run</e> a particular package. You only need to explicitly specify <c>RDEPEND</c> |
502 |
<e>run</e> a particular package. You only need to explicitly specify <c>RDEPEND</c> |
379 |
if the ebuild's runtime dependencies are different than what you specified in |
503 |
if the ebuild's runtime dependencies are different than what you specified in |
380 |
<c>DEPEND</c>; if not specified, <c>RDEPEND</c> will default to your <c>DEPEND</c> |
504 |
<c>DEPEND</c>; if not specified, <c>RDEPEND</c> will default to your <c>DEPEND</c> |
381 |
settings. |
505 |
settings. <b>Never</b> set <c>RDEPEND</c> to <c>DEPEND</c> yourself in an ebuild. |
|
|
506 |
<pre> |
507 |
# Acceptable: |
508 |
RDEPEND="${DEPEND} |
509 |
net-ftp/curl |
510 |
virtual/glibc" |
511 |
# Not acceptable: |
512 |
RDEPEND="${DEPEND}" |
513 |
</pre> |
382 |
</p> |
514 |
</p> |
383 |
|
515 |
|
384 |
<p> |
516 |
<p> |
Lines 386-412
Link Here
|
386 |
<c>RDEPEND</c> dependencies are satisfied when one installs a binary |
518 |
<c>RDEPEND</c> dependencies are satisfied when one installs a binary |
387 |
<c>.tbz2</c> package; use this information to help you choose the correct |
519 |
<c>.tbz2</c> package; use this information to help you choose the correct |
388 |
<c>RDEPEND</c> dependencies. If undefined, and ebuild's <c>RDEPEND</c> setting |
520 |
<c>RDEPEND</c> dependencies. If undefined, and ebuild's <c>RDEPEND</c> setting |
389 |
will default to <c>DEPEND</c>.</p> |
521 |
will default to <c>DEPEND</c>. |
|
|
522 |
</p> |
390 |
|
523 |
|
391 |
<p> A package should depend upon the oldest version that satisfies the |
524 |
<p> |
|
|
525 |
A package should depend upon the oldest version that satisfies the |
392 |
dependency. If it works with <c>libfoo-1.2.x</c>, don't depend on |
526 |
dependency. If it works with <c>libfoo-1.2.x</c>, don't depend on |
393 |
<c>libfoo-2.x</c> just because that's what you have installed.</p> |
527 |
<c>libfoo-2.x</c> just because that's what you have installed. |
|
|
528 |
</p> |
394 |
|
529 |
|
395 |
<p>In general, packages should depend on <c>=libfoo-1.2*</c> instead of |
530 |
<p> |
|
|
531 |
In general, packages should depend on <c>=libfoo-1.2*</c> instead of |
396 |
<c>>=libfoo-1.2</c>. Otherwise, things may start breaking horribly when |
532 |
<c>>=libfoo-1.2</c>. Otherwise, things may start breaking horribly when |
397 |
<c>libfoo-2.0</c> is introduced.</p> |
533 |
<c>libfoo-2.0</c> is introduced. |
|
|
534 |
</p> |
398 |
|
535 |
|
399 |
<p>Depending on a virtual package entry like <c>virtual/foo</c> will only work |
536 |
<p> |
|
|
537 |
Depending on a virtual package entry like <c>virtual/foo</c> will only work |
400 |
when the different packages providing <c>virtual/foo</c> have identical |
538 |
when the different packages providing <c>virtual/foo</c> have identical |
401 |
interfaces. Consider <c>virtual/jdk-1.3</c> for example. Some packages don't |
539 |
interfaces. Consider <c>virtual/jdk-1.3</c> for example. Some packages don't |
402 |
work with <c>ibm-jdk-1.3</c> while they do work with <c>sun-jdk-1.3</c>. For |
540 |
work with <c>ibm-jdk-1.3</c> while they do work with <c>sun-jdk-1.3</c>. For |
403 |
this reason, be sure that your package is tested against all virtual providers |
541 |
this reason, be sure that your package is tested against all virtual providers |
404 |
before unmasking. It may be possible to only depend on a subset of those |
542 |
before unmasking. It may be possible to only depend on a subset of those |
405 |
packages in the virtual rather than the virtual itself.</p> |
543 |
packages in the virtual rather than the virtual itself. |
|
|
544 |
</p> |
406 |
|
545 |
|
407 |
</body> |
546 |
</body> |
408 |
</section> |
547 |
</section> |
409 |
|
548 |
|
410 |
</chapter> |
549 |
</chapter> |
411 |
|
550 |
|
|
|
551 |
<chapter> |
552 |
<title>Moving packages</title> |
553 |
<section> |
554 |
<title>Moving packages between categories</title> |
555 |
<body> |
556 |
|
557 |
<p> |
558 |
From time to time, the Portage tree may need to be reorganized to split |
559 |
overflowing categories into specific smaller categories. For example, if there are a |
560 |
large number of firewall-related packages in <c>net-misc</c>, splitting those into a |
561 |
smaller category would be a worthwhile reoganization, whereas breaking up |
562 |
<c>dev-perl</c> would be unlikely to make sense. |
563 |
</p> |
564 |
|
565 |
<p> |
566 |
This kind of decision is not something that should be made by a single developer. It |
567 |
should first be discussed on the internal mailing list so we can share ideas on |
568 |
potentially superior solutions. |
569 |
</p> |
570 |
|
571 |
<p> |
572 |
Formerly, packages were moved by adding a <c>PROVIDE</c> line to the new ebuild that |
573 |
would cause the package to satisfy the <c>DEPEND</c> settings of ebuilds that are |
574 |
unaware of the package's new location. The new and correct way to move packages is to |
575 |
add an entry to the appropriate files in <path>profiles/updates/</path> in the Portage |
576 |
tree. The format is as follows: |
577 |
<pre> |
578 |
move net-misc/fwbuilder net-firewall/fwbuilder |
579 |
</pre> |
580 |
In this case, we are moving the package <c>fwbuilder</c> from the category |
581 |
<c>net-misc</c> to <c>net-firewall</c>. |
582 |
</p> |
583 |
|
584 |
</body> |
585 |
</section> |
586 |
</chapter> |
587 |
|
412 |
</guide> |
588 |
</guide> |