chiark / gitweb /
Regenerate POT files and merge into po files
[developers-reference.git] / po4a / po / best-pkging-practices.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2010-01-04 00:17+0100\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=utf-8\n"
16 "Content-Transfer-Encoding: ENCODING"
17
18 #. type: Content of: <chapter><title>
19 #: best-pkging-practices.dbk:7
20 msgid "Best Packaging Practices"
21 msgstr ""
22
23 #. type: Content of: <chapter><para>
24 #: best-pkging-practices.dbk:9
25 msgid ""
26 "Debian's quality is largely due to the <ulink "
27 "url=\"&url-debian-policy;\">Debian Policy</ulink>, which defines explicit "
28 "baseline requirements which all Debian packages must fulfill.  Yet there is "
29 "also a shared history of experience which goes beyond the Debian Policy, an "
30 "accumulation of years of experience in packaging.  Many very talented people "
31 "have created great tools, tools which help you, the Debian maintainer, "
32 "create and maintain excellent packages."
33 msgstr ""
34
35 #. type: Content of: <chapter><para>
36 #: best-pkging-practices.dbk:18
37 msgid ""
38 "This chapter provides some best practices for Debian developers.  All "
39 "recommendations are merely that, and are not requirements or policy.  These "
40 "are just some subjective hints, advice and pointers collected from Debian "
41 "developers.  Feel free to pick and choose whatever works best for you."
42 msgstr ""
43
44 #. type: Content of: <chapter><section><title>
45 #: best-pkging-practices.dbk:24
46 msgid "Best practices for <filename>debian/rules</filename>"
47 msgstr ""
48
49 #. type: Content of: <chapter><section><para>
50 #: best-pkging-practices.dbk:26
51 msgid ""
52 "The following recommendations apply to the <filename>debian/rules</filename> "
53 "file.  Since <filename>debian/rules</filename> controls the build process "
54 "and selects the files which go into the package (directly or indirectly), "
55 "it's usually the file maintainers spend the most time on."
56 msgstr ""
57
58 #. type: Content of: <chapter><section><section><title>
59 #: best-pkging-practices.dbk:32
60 msgid "Helper scripts"
61 msgstr ""
62
63 #. type: Content of: <chapter><section><section><para>
64 #: best-pkging-practices.dbk:34
65 msgid ""
66 "The rationale for using helper scripts in <filename>debian/rules</filename> "
67 "is that they let maintainers use and share common logic among many "
68 "packages.  Take for instance the question of installing menu entries: you "
69 "need to put the file into <filename>/usr/share/menu</filename> (or "
70 "<filename>/usr/lib/menu</filename> for executable binary menufiles, if this "
71 "is needed), and add commands to the maintainer scripts to register and "
72 "unregister the menu entries.  Since this is a very common thing for packages "
73 "to do, why should each maintainer rewrite all this on their own, sometimes "
74 "with bugs? Also, supposing the menu directory changed, every package would "
75 "have to be changed."
76 msgstr ""
77
78 #. type: Content of: <chapter><section><section><para>
79 #: best-pkging-practices.dbk:45
80 msgid ""
81 "Helper scripts take care of these issues.  Assuming you comply with the "
82 "conventions expected by the helper script, the helper takes care of all the "
83 "details.  Changes in policy can be made in the helper script; then packages "
84 "just need to be rebuilt with the new version of the helper and no other "
85 "changes."
86 msgstr ""
87
88 #. type: Content of: <chapter><section><section><para>
89 #: best-pkging-practices.dbk:52
90 msgid ""
91 "<xref linkend=\"tools\"/> contains a couple of different helpers.  The most "
92 "common and best (in our opinion) helper system is <systemitem "
93 "role=\"package\">debhelper</systemitem>.  Previous helper systems, such as "
94 "<systemitem role=\"package\">debmake</systemitem>, were monolithic: you "
95 "couldn't pick and choose which part of the helper you found useful, but had "
96 "to use the helper to do everything.  <systemitem "
97 "role=\"package\">debhelper</systemitem>, however, is a number of separate "
98 "little <command>dh_*</command> programs.  For instance, "
99 "<command>dh_installman</command> installs and compresses man pages, "
100 "<command>dh_installmenu</command> installs menu files, and so on.  Thus, it "
101 "offers enough flexibility to be able to use the little helper scripts, where "
102 "useful, in conjunction with hand-crafted commands in "
103 "<filename>debian/rules</filename>."
104 msgstr ""
105
106 #. type: Content of: <chapter><section><section><para>
107 #: best-pkging-practices.dbk:66
108 msgid ""
109 "You can get started with <systemitem role=\"package\">debhelper</systemitem> "
110 "by reading <citerefentry> <refentrytitle>debhelper</refentrytitle> "
111 "<manvolnum>1</manvolnum> </citerefentry>, and looking at the examples that "
112 "come with the package.  <command>dh_make</command>, from the <systemitem "
113 "role=\"package\">dh-make</systemitem> package (see <xref "
114 "linkend=\"dh-make\"/> ), can be used to convert a vanilla source package to "
115 "a <systemitem role=\"package\">debhelper</systemitem>ized package.  This "
116 "shortcut, though, should not convince you that you do not need to bother "
117 "understanding the individual <command>dh_*</command> helpers.  If you are "
118 "going to use a helper, you do need to take the time to learn to use that "
119 "helper, to learn its expectations and behavior."
120 msgstr ""
121
122 #. type: Content of: <chapter><section><section><para>
123 #: best-pkging-practices.dbk:79
124 msgid ""
125 "Some people feel that vanilla <filename>debian/rules</filename> files are "
126 "better, since you don't have to learn the intricacies of any helper system.  "
127 "This decision is completely up to you.  Use what works for you.  Many "
128 "examples of vanilla <filename>debian/rules</filename> files are available at "
129 "<ulink url=\"&url-rules-files;\"></ulink>."
130 msgstr ""
131
132 #. type: Content of: <chapter><section><section><title>
133 #: best-pkging-practices.dbk:88
134 msgid "Separating your patches into multiple files"
135 msgstr ""
136
137 #. type: Content of: <chapter><section><section><para>
138 #: best-pkging-practices.dbk:90
139 msgid ""
140 "Big, complex packages may have many bugs that you need to deal with.  If you "
141 "correct a number of bugs directly in the source, and you're not careful, it "
142 "can get hard to differentiate the various patches that you applied.  It can "
143 "get quite messy when you have to update the package to a new upstream "
144 "version which integrates some of the fixes (but not all).  You can't take "
145 "the total set of diffs (e.g., from <filename>.diff.gz</filename>) and work "
146 "out which patch sets to back out as a unit as bugs are fixed upstream."
147 msgstr ""
148
149 #. type: Content of: <chapter><section><section><para>
150 #: best-pkging-practices.dbk:99
151 msgid ""
152 "Fortunately, with the source format “3.0 (quilt)” it is now possible to keep "
153 "patches separate without having to modify <filename>debian/rules</filename> "
154 "to setup a patch system. Patches are stored in "
155 "<filename>debian/patches/</filename> and when the source package is unpacked "
156 "patches listed in <filename>debian/patches/series</filename> are "
157 "automatically applied.  As the name implies, patches can be managed with "
158 "<command>quilt</command>."
159 msgstr ""
160
161 #. type: Content of: <chapter><section><section><para>
162 #: best-pkging-practices.dbk:107
163 msgid ""
164 "When using the older source “1.0”, it's also possible to separate patches "
165 "but a dedicated patch system must be used: the patch files are shipped "
166 "within the Debian patch file (<filename>.diff.gz</filename>), usually within "
167 "the <filename>debian/</filename> directory. The only difference is that they "
168 "aren't applied immediately by <command>dpkg-source</command>, but by the "
169 "<literal>build</literal> rule of <filename>debian/rules</filename>, through "
170 "a dependency on the <literal>patch</literal> rule.  Conversely, they are "
171 "reverted in the <literal>clean</literal> rule, through a dependency on the "
172 "<literal>unpatch</literal> rule."
173 msgstr ""
174
175 #. type: Content of: <chapter><section><section><para>
176 #: best-pkging-practices.dbk:119
177 msgid ""
178 "<command>quilt</command> is the recommended tool for this.  It does all of "
179 "the above, and also allows to manage patch series.  See the <systemitem "
180 "role=\"package\">quilt</systemitem> package for more information."
181 msgstr ""
182
183 #. type: Content of: <chapter><section><section><para>
184 #: best-pkging-practices.dbk:125
185 msgid ""
186 "There are other tools to manage patches, like <command>dpatch</command>, and "
187 "the patch system integrated with <systemitem "
188 "role=\"package\">cdbs</systemitem>."
189 msgstr ""
190
191 #. type: Content of: <chapter><section><section><title>
192 #: best-pkging-practices.dbk:132
193 msgid "Multiple binary packages"
194 msgstr ""
195
196 #. type: Content of: <chapter><section><section><para>
197 #: best-pkging-practices.dbk:134
198 msgid ""
199 "A single source package will often build several binary packages, either to "
200 "provide several flavors of the same software (e.g., the <systemitem "
201 "role=\"package\">vim</systemitem> source package) or to make several small "
202 "packages instead of a big one (e.g., so the user can install only the subset "
203 "needed, and thus save some disk space)."
204 msgstr ""
205
206 #. type: Content of: <chapter><section><section><para>
207 #: best-pkging-practices.dbk:141
208 msgid ""
209 "The second case can be easily managed in <filename>debian/rules</filename>.  "
210 "You just need to move the appropriate files from the build directory into "
211 "the package's temporary trees.  You can do this using "
212 "<command>install</command> or <command>dh_install</command> from <systemitem "
213 "role=\"package\">debhelper</systemitem>.  Be sure to check the different "
214 "permutations of the various packages, ensuring that you have the "
215 "inter-package dependencies set right in <filename>debian/control</filename>."
216 msgstr ""
217
218 #. type: Content of: <chapter><section><section><para>
219 #: best-pkging-practices.dbk:150
220 msgid ""
221 "The first case is a bit more difficult since it involves multiple recompiles "
222 "of the same software but with different configuration options.  The "
223 "<systemitem role=\"package\">vim</systemitem> source package is an example "
224 "of how to manage this using an hand-crafted "
225 "<filename>debian/rules</filename> file."
226 msgstr ""
227
228 #. type: Content of: <chapter><section><title>
229 #: best-pkging-practices.dbk:162
230 msgid "Best practices for <filename>debian/control</filename>"
231 msgstr ""
232
233 #. type: Content of: <chapter><section><para>
234 #: best-pkging-practices.dbk:164
235 msgid ""
236 "The following practices are relevant to the "
237 "<filename>debian/control</filename> file.  They supplement the <ulink "
238 "url=\"&url-debian-policy;ch-binary.html#s-descriptions\">Policy on package "
239 "descriptions</ulink>."
240 msgstr ""
241
242 #. type: Content of: <chapter><section><para>
243 #: best-pkging-practices.dbk:170
244 msgid ""
245 "The description of the package, as defined by the corresponding field in the "
246 "<filename>control</filename> file, contains both the package synopsis and "
247 "the long description for the package.  <xref linkend=\"bpp-desc-basics\"/> "
248 "describes common guidelines for both parts of the package description.  "
249 "Following that, <xref linkend=\"bpp-pkg-synopsis\"/> provides guidelines "
250 "specific to the synopsis, and <xref linkend=\"bpp-pkg-desc\"/> contains "
251 "guidelines specific to the description."
252 msgstr ""
253
254 #. type: Content of: <chapter><section><section><title>
255 #: best-pkging-practices.dbk:179
256 msgid "General guidelines for package descriptions"
257 msgstr ""
258
259 #. type: Content of: <chapter><section><section><para>
260 #: best-pkging-practices.dbk:181
261 msgid ""
262 "The package description should be written for the average likely user, the "
263 "average person who will use and benefit from the package.  For instance, "
264 "development packages are for developers, and can be technical in their "
265 "language.  More general-purpose applications, such as editors, should be "
266 "written for a less technical user."
267 msgstr ""
268
269 #. type: Content of: <chapter><section><section><para>
270 #: best-pkging-practices.dbk:188
271 msgid ""
272 "Our review of package descriptions lead us to conclude that most package "
273 "descriptions are technical, that is, are not written to make sense for "
274 "non-technical users.  Unless your package really is only for technical "
275 "users, this is a problem."
276 msgstr ""
277
278 #. type: Content of: <chapter><section><section><para>
279 #: best-pkging-practices.dbk:194
280 msgid ""
281 "How do you write for non-technical users? Avoid jargon.  Avoid referring to "
282 "other applications or frameworks that the user might not be familiar with — "
283 "GNOME or KDE is fine, since users are probably familiar with these terms, "
284 "but GTK+ is probably not.  Try not to assume any knowledge at all.  If you "
285 "must use technical terms, introduce them."
286 msgstr ""
287
288 #. type: Content of: <chapter><section><section><para>
289 #: best-pkging-practices.dbk:201
290 msgid ""
291 "Be objective.  Package descriptions are not the place for advocating your "
292 "package, no matter how much you love it.  Remember that the reader may not "
293 "care about the same things you care about."
294 msgstr ""
295
296 #. type: Content of: <chapter><section><section><para>
297 #: best-pkging-practices.dbk:206
298 msgid ""
299 "References to the names of any other software packages, protocol names, "
300 "standards, or specifications should use their canonical forms, if one "
301 "exists.  For example, use X Window System, X11, or X; not X Windows, "
302 "X-Windows, or X Window.  Use GTK+, not GTK or gtk.  Use GNOME, not Gnome.  "
303 "Use PostScript, not Postscript or postscript."
304 msgstr ""
305
306 #. type: Content of: <chapter><section><section><para>
307 #: best-pkging-practices.dbk:213
308 msgid ""
309 "If you are having problems writing your description, you may wish to send it "
310 "along to &email-debian-l10n-english; and request feedback."
311 msgstr ""
312
313 #. type: Content of: <chapter><section><section><title>
314 #: best-pkging-practices.dbk:219
315 msgid "The package synopsis, or short description"
316 msgstr ""
317
318 #. type: Content of: <chapter><section><section><para>
319 #: best-pkging-practices.dbk:221
320 msgid ""
321 "Policy says the synopsis line (the short description) must be concise, not "
322 "repeating the package name, but also informative."
323 msgstr ""
324
325 #. type: Content of: <chapter><section><section><para>
326 #: best-pkging-practices.dbk:225
327 msgid ""
328 "The synopsis functions as a phrase describing the package, not a complete "
329 "sentence, so sentential punctuation is inappropriate: it does not need extra "
330 "capital letters or a final period (full stop). It should also omit any "
331 "initial indefinite or definite article - \"a\", \"an\", or \"the\". Thus for "
332 "instance:"
333 msgstr ""
334
335 #. type: Content of: <chapter><section><section><screen>
336 #: best-pkging-practices.dbk:231
337 #, no-wrap
338 msgid ""
339 "Package: libeg0\n"
340 "Description: exemplification support library\n"
341 msgstr ""
342
343 #. type: Content of: <chapter><section><section><para>
344 #: best-pkging-practices.dbk:235
345 msgid ""
346 "Technically this is a noun phrase minus articles, as opposed to a verb "
347 "phrase.  A good heuristic is that it should be possible to substitute the "
348 "package name and synopsis into this formula:"
349 msgstr ""
350
351 #. type: Content of: <chapter><section><section><para>
352 #: best-pkging-practices.dbk:240
353 msgid ""
354 "The package <replaceable>name</replaceable> provides {a,an,the,some} "
355 "<replaceable>synopsis</replaceable>."
356 msgstr ""
357
358 #. type: Content of: <chapter><section><section><para>
359 #: best-pkging-practices.dbk:244
360 msgid ""
361 "Sets of related packages may use an alternative scheme that divides the "
362 "synopsis into two parts, the first a description of the whole suite and the "
363 "second a summary of the package's role within it:"
364 msgstr ""
365
366 #. type: Content of: <chapter><section><section><screen>
367 #: best-pkging-practices.dbk:249
368 #, no-wrap
369 msgid ""
370 "Package: eg-tools\n"
371 "Description: simple exemplification system (utilities)\n"
372 "\t\t\t              \n"
373 "Package: eg-doc\n"
374 "Description: simple exemplification system - documentation\n"
375 msgstr ""
376
377 #. type: Content of: <chapter><section><section><para>
378 #: best-pkging-practices.dbk:256
379 msgid ""
380 "These synopses follow a modified formula. Where a package "
381 "\"<replaceable>name</replaceable>\" has a synopsis "
382 "\"<replaceable>suite</replaceable> (<replaceable>role</replaceable>)\" or "
383 "\"<replaceable>suite</replaceable> - <replaceable>role</replaceable>\", the "
384 "elements should be phrased so that they fit into the formula:"
385 msgstr ""
386
387 #. type: Content of: <chapter><section><section><para>
388 #: best-pkging-practices.dbk:263
389 msgid ""
390 "The package <replaceable>name</replaceable> provides {a,an,the} "
391 "<replaceable>role</replaceable> for the <replaceable>suite</replaceable>."
392 msgstr ""
393
394 #. type: Content of: <chapter><section><section><title>
395 #: best-pkging-practices.dbk:269
396 msgid "The long description"
397 msgstr ""
398
399 #. type: Content of: <chapter><section><section><para>
400 #: best-pkging-practices.dbk:271
401 msgid ""
402 "The long description is the primary information available to the user about "
403 "a package before they install it.  It should provide all the information "
404 "needed to let the user decide whether to install the package.  Assume that "
405 "the user has already read the package synopsis."
406 msgstr ""
407
408 #. type: Content of: <chapter><section><section><para>
409 #: best-pkging-practices.dbk:277
410 msgid "The long description should consist of full and complete sentences."
411 msgstr ""
412
413 #. type: Content of: <chapter><section><section><para>
414 #: best-pkging-practices.dbk:280
415 msgid ""
416 "The first paragraph of the long description should answer the following "
417 "questions: what does the package do? what task does it help the user "
418 "accomplish? It is important to describe this in a non-technical way, unless "
419 "of course the audience for the package is necessarily technical."
420 msgstr ""
421
422 #. type: Content of: <chapter><section><section><para>
423 #: best-pkging-practices.dbk:286
424 msgid ""
425 "The following paragraphs should answer the following questions: Why do I as "
426 "a user need this package? What other features does the package have? What "
427 "outstanding features and deficiencies are there compared to other packages "
428 "(e.g., if you need X, use Y instead)? Is this package related to other "
429 "packages in some way that is not handled by the package manager (e.g., this "
430 "is the client for the foo server)?"
431 msgstr ""
432
433 #. type: Content of: <chapter><section><section><para>
434 #: best-pkging-practices.dbk:294
435 msgid ""
436 "Be careful to avoid spelling and grammar mistakes.  Ensure that you "
437 "spell-check it.  Both <command>ispell</command> and "
438 "<command>aspell</command> have special modes for checking "
439 "<filename>debian/control</filename> files:"
440 msgstr ""
441
442 #. type: Content of: <chapter><section><section><screen>
443 #: best-pkging-practices.dbk:299
444 #, no-wrap
445 msgid "ispell -d american -g debian/control\n"
446 msgstr ""
447
448 #. type: Content of: <chapter><section><section><screen>
449 #: best-pkging-practices.dbk:302
450 #, no-wrap
451 msgid "aspell -d en -D -c debian/control\n"
452 msgstr ""
453
454 #. type: Content of: <chapter><section><section><para>
455 #: best-pkging-practices.dbk:305
456 msgid ""
457 "Users usually expect these questions to be answered in the package "
458 "description:"
459 msgstr ""
460
461 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
462 #: best-pkging-practices.dbk:310
463 msgid ""
464 "What does the package do? If it is an add-on to another package, then the "
465 "short description of the package we are an add-on to should be put in here."
466 msgstr ""
467
468 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
469 #: best-pkging-practices.dbk:316
470 msgid ""
471 "Why should I want this package? This is related to the above, but not the "
472 "same (this is a mail user agent; this is cool, fast, interfaces with PGP and "
473 "LDAP and IMAP, has features X, Y, and Z)."
474 msgstr ""
475
476 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
477 #: best-pkging-practices.dbk:323
478 msgid ""
479 "If this package should not be installed directly, but is pulled in by "
480 "another package, this should be mentioned."
481 msgstr ""
482
483 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
484 #: best-pkging-practices.dbk:329
485 msgid ""
486 "If the package is <literal>experimental</literal>, or there are other "
487 "reasons it should not be used, if there are other packages that should be "
488 "used instead, it should be here as well."
489 msgstr ""
490
491 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
492 #: best-pkging-practices.dbk:336
493 msgid ""
494 "How is this package different from the competition? Is it a better "
495 "implementation? more features? different features? Why should I choose this "
496 "package."
497 msgstr ""
498
499 #. type: Content of: <chapter><section><section><title>
500 #: best-pkging-practices.dbk:349
501 msgid "Upstream home page"
502 msgstr ""
503
504 #. type: Content of: <chapter><section><section><para>
505 #: best-pkging-practices.dbk:351
506 msgid ""
507 "We recommend that you add the URL for the package's home page in the "
508 "<literal>Homepage</literal> field of the <literal>Source</literal> section "
509 "in <filename>debian/control</filename>.  Adding this information in the "
510 "package description itself is considered deprecated."
511 msgstr ""
512
513 #. type: Content of: <chapter><section><section><title>
514 #: best-pkging-practices.dbk:359
515 msgid "Version Control System location"
516 msgstr ""
517
518 #. type: Content of: <chapter><section><section><para>
519 #: best-pkging-practices.dbk:361
520 msgid ""
521 "There are additional fields for the location of the Version Control System "
522 "in <filename>debian/control</filename>."
523 msgstr ""
524
525 #. type: Content of: <chapter><section><section><section><title>
526 #: best-pkging-practices.dbk:365
527 msgid "Vcs-Browser"
528 msgstr ""
529
530 #. type: Content of: <chapter><section><section><section><para>
531 #: best-pkging-practices.dbk:367
532 msgid ""
533 "Value of this field should be a <literal>http://</literal> URL pointing to a "
534 "web-browsable copy of the Version Control System repository used to maintain "
535 "the given package, if available."
536 msgstr ""
537
538 #. type: Content of: <chapter><section><section><section><para>
539 #: best-pkging-practices.dbk:372
540 msgid ""
541 "The information is meant to be useful for the final user, willing to browse "
542 "the latest work done on the package (e.g.  when looking for the patch fixing "
543 "a bug tagged as <literal>pending</literal> in the bug tracking system)."
544 msgstr ""
545
546 #. type: Content of: <chapter><section><section><section><title>
547 #: best-pkging-practices.dbk:379
548 msgid "Vcs-*"
549 msgstr ""
550
551 #. type: Content of: <chapter><section><section><section><para>
552 #: best-pkging-practices.dbk:381
553 msgid ""
554 "Value of this field should be a string identifying unequivocally the "
555 "location of the Version Control System repository used to maintain the given "
556 "package, if available.  <literal>*</literal> identify the Version Control "
557 "System; currently the following systems are supported by the package "
558 "tracking system: <literal>arch</literal>, <literal>bzr</literal> (Bazaar), "
559 "<literal>cvs</literal>, <literal>darcs</literal>, <literal>git</literal>, "
560 "<literal>hg</literal> (Mercurial), <literal>mtn</literal> (Monotone), "
561 "<literal>svn</literal> (Subversion).  It is allowed to specify different VCS "
562 "fields for the same package: they will all be shown in the PTS web "
563 "interface."
564 msgstr ""
565
566 #. type: Content of: <chapter><section><section><section><para>
567 #: best-pkging-practices.dbk:392
568 msgid ""
569 "The information is meant to be useful for a user knowledgeable in the given "
570 "Version Control System and willing to build the current version of a package "
571 "from the VCS sources.  Other uses of this information might include "
572 "automatic building of the latest VCS version of the given package.  To this "
573 "end the location pointed to by the field should better be version agnostic "
574 "and point to the main branch (for VCSs supporting such a concept).  Also, "
575 "the location pointed to should be accessible to the final user; fulfilling "
576 "this requirement might imply pointing to an anonymous access of the "
577 "repository instead of pointing to an SSH-accessible version of the same."
578 msgstr ""
579
580 #. type: Content of: <chapter><section><section><section><para>
581 #: best-pkging-practices.dbk:403
582 msgid ""
583 "In the following example, an instance of the field for a Subversion "
584 "repository of the <systemitem role=\"package\">vim</systemitem> package is "
585 "shown.  Note how the URL is in the <literal>svn://</literal> scheme (instead "
586 "of <literal>svn+ssh://</literal>) and how it points to the "
587 "<filename>trunk/</filename> branch.  The use of the "
588 "<literal>Vcs-Browser</literal> and <literal>Homepage</literal> fields "
589 "described above is also shown."
590 msgstr ""
591
592 #. type: Content of: <chapter><section><section><section><screen>
593 #: best-pkging-practices.dbk:412
594 #, no-wrap
595 msgid ""
596 "  Source: vim\n"
597 "  Section: editors\n"
598 "  Priority: optional\n"
599 "  &lt;snip&gt;\n"
600 "  Vcs-Svn: svn://svn.debian.org/svn/pkg-vim/trunk/packages/vim\n"
601 "  Vcs-Browser: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim\n"
602 "  Homepage: http://www.vim.org\n"
603 msgstr ""
604
605 #. type: Content of: <chapter><section><title>
606 #: best-pkging-practices.dbk:427
607 msgid "Best practices for <filename>debian/changelog</filename>"
608 msgstr ""
609
610 #. type: Content of: <chapter><section><para>
611 #: best-pkging-practices.dbk:429
612 msgid ""
613 "The following practices supplement the <ulink "
614 "url=\"&url-debian-policy;ch-docs.html#s-changelogs\">Policy on changelog "
615 "files</ulink>."
616 msgstr ""
617
618 #. type: Content of: <chapter><section><section><title>
619 #: best-pkging-practices.dbk:434
620 msgid "Writing useful changelog entries"
621 msgstr ""
622
623 #. type: Content of: <chapter><section><section><para>
624 #: best-pkging-practices.dbk:436
625 msgid ""
626 "The changelog entry for a package revision documents changes in that "
627 "revision, and only them.  Concentrate on describing significant and "
628 "user-visible changes that were made since the last version."
629 msgstr ""
630
631 #. type: Content of: <chapter><section><section><para>
632 #: best-pkging-practices.dbk:441
633 msgid ""
634 "Focus on <emphasis>what</emphasis> was changed — who, how and when are "
635 "usually less important.  Having said that, remember to politely attribute "
636 "people who have provided notable help in making the package (e.g., those who "
637 "have sent in patches)."
638 msgstr ""
639
640 #. type: Content of: <chapter><section><section><para>
641 #: best-pkging-practices.dbk:447
642 msgid ""
643 "There's no need to elaborate the trivial and obvious changes.  You can also "
644 "aggregate several changes in one entry.  On the other hand, don't be overly "
645 "terse if you have undertaken a major change.  Be especially clear if there "
646 "are changes that affect the behaviour of the program.  For further "
647 "explanations, use the <filename>README.Debian</filename> file."
648 msgstr ""
649
650 #. type: Content of: <chapter><section><section><para>
651 #: best-pkging-practices.dbk:454
652 msgid ""
653 "Use common English so that the majority of readers can comprehend it.  Avoid "
654 "abbreviations, tech-speak and jargon when explaining changes that close "
655 "bugs, especially for bugs filed by users that did not strike you as "
656 "particularly technically savvy.  Be polite, don't swear."
657 msgstr ""
658
659 #. type: Content of: <chapter><section><section><para>
660 #: best-pkging-practices.dbk:460
661 msgid ""
662 "It is sometimes desirable to prefix changelog entries with the names of the "
663 "files that were changed.  However, there's no need to explicitly list each "
664 "and every last one of the changed files, especially if the change was small "
665 "or repetitive.  You may use wildcards."
666 msgstr ""
667
668 #. type: Content of: <chapter><section><section><para>
669 #: best-pkging-practices.dbk:466
670 msgid ""
671 "When referring to bugs, don't assume anything.  Say what the problem was, "
672 "how it was fixed, and append the closes: #nnnnn string.  See <xref "
673 "linkend=\"upload-bugfix\"/> for more information."
674 msgstr ""
675
676 #. type: Content of: <chapter><section><section><title>
677 #: best-pkging-practices.dbk:473
678 msgid "Common misconceptions about changelog entries"
679 msgstr ""
680
681 #. type: Content of: <chapter><section><section><para>
682 #: best-pkging-practices.dbk:475
683 msgid ""
684 "The changelog entries should <emphasis role=\"strong\">not</emphasis> "
685 "document generic packaging issues (Hey, if you're looking for foo.conf, it's "
686 "in /etc/blah/.), since administrators and users are supposed to be at least "
687 "remotely acquainted with how such things are generally arranged on Debian "
688 "systems.  Do, however, mention if you change the location of a configuration "
689 "file."
690 msgstr ""
691
692 #. type: Content of: <chapter><section><section><para>
693 #: best-pkging-practices.dbk:483
694 msgid ""
695 "The only bugs closed with a changelog entry should be those that are "
696 "actually fixed in the same package revision.  Closing unrelated bugs in the "
697 "changelog is bad practice.  See <xref linkend=\"upload-bugfix\"/> ."
698 msgstr ""
699
700 #. type: Content of: <chapter><section><section><para>
701 #: best-pkging-practices.dbk:488
702 msgid ""
703 "The changelog entries should <emphasis role=\"strong\">not</emphasis> be "
704 "used for random discussion with bug reporters (I don't see segfaults when "
705 "starting foo with option bar; send in more info), general statements on "
706 "life, the universe and everything (sorry this upload took me so long, but I "
707 "caught the flu), or pleas for help (the bug list on this package is huge, "
708 "please lend me a hand).  Such things usually won't be noticed by their "
709 "target audience, but may annoy people who wish to read information about "
710 "actual changes in the package.  See <xref linkend=\"bug-answering\"/> for "
711 "more information on how to use the bug tracking system."
712 msgstr ""
713
714 #. type: Content of: <chapter><section><section><para>
715 #: best-pkging-practices.dbk:499
716 msgid ""
717 "It is an old tradition to acknowledge bugs fixed in non-maintainer uploads "
718 "in the first changelog entry of the proper maintainer upload.  As we have "
719 "version tracking now, it is enough to keep the NMUed changelog entries and "
720 "just mention this fact in your own changelog entry."
721 msgstr ""
722
723 #. type: Content of: <chapter><section><section><title>
724 #: best-pkging-practices.dbk:507
725 msgid "Common errors in changelog entries"
726 msgstr ""
727
728 #. type: Content of: <chapter><section><section><para>
729 #: best-pkging-practices.dbk:509
730 msgid ""
731 "The following examples demonstrate some common errors or examples of bad "
732 "style in changelog entries."
733 msgstr ""
734
735 #. type: Content of: <chapter><section><section><screen>
736 #: best-pkging-practices.dbk:513
737 #, no-wrap
738 msgid "  * Fixed all outstanding bugs.\n"
739 msgstr ""
740
741 #. type: Content of: <chapter><section><section><para>
742 #: best-pkging-practices.dbk:516
743 msgid "This doesn't tell readers anything too useful, obviously."
744 msgstr ""
745
746 #. type: Content of: <chapter><section><section><screen>
747 #: best-pkging-practices.dbk:519
748 #, no-wrap
749 msgid "  * Applied patch from Jane Random.\n"
750 msgstr ""
751
752 #. type: Content of: <chapter><section><section><para>
753 #: best-pkging-practices.dbk:522
754 msgid "What was the patch about?"
755 msgstr ""
756
757 #. type: Content of: <chapter><section><section><screen>
758 #: best-pkging-practices.dbk:525
759 #, no-wrap
760 msgid "  * Late night install target overhaul.\n"
761 msgstr ""
762
763 #. type: Content of: <chapter><section><section><para>
764 #: best-pkging-practices.dbk:528
765 msgid ""
766 "Overhaul which accomplished what? Is the mention of late night supposed to "
767 "remind us that we shouldn't trust that code?"
768 msgstr ""
769
770 #. type: Content of: <chapter><section><section><screen>
771 #: best-pkging-practices.dbk:532
772 #, no-wrap
773 msgid "  * Fix vsync FU w/ ancient CRTs.\n"
774 msgstr ""
775
776 #. type: Content of: <chapter><section><section><para>
777 #: best-pkging-practices.dbk:535
778 msgid ""
779 "Too many acronyms, and it's not overly clear what the, uh, fsckup (oops, a "
780 "curse word!) was actually about, or how it was fixed."
781 msgstr ""
782
783 #. type: Content of: <chapter><section><section><screen>
784 #: best-pkging-practices.dbk:539
785 #, no-wrap
786 msgid "  * This is not a bug, closes: #nnnnnn.\n"
787 msgstr ""
788
789 #. type: Content of: <chapter><section><section><para>
790 #: best-pkging-practices.dbk:542
791 msgid ""
792 "First of all, there's absolutely no need to upload the package to convey "
793 "this information; instead, use the bug tracking system.  Secondly, there's "
794 "no explanation as to why the report is not a bug."
795 msgstr ""
796
797 #. type: Content of: <chapter><section><section><screen>
798 #: best-pkging-practices.dbk:547
799 #, no-wrap
800 msgid "  * Has been fixed for ages, but I forgot to close; closes: #54321.\n"
801 msgstr ""
802
803 #. type: Content of: <chapter><section><section><para>
804 #: best-pkging-practices.dbk:550
805 msgid ""
806 "If for some reason you didn't mention the bug number in a previous changelog "
807 "entry, there's no problem, just close the bug normally in the BTS.  There's "
808 "no need to touch the changelog file, presuming the description of the fix is "
809 "already in (this applies to the fixes by the upstream authors/maintainers as "
810 "well, you don't have to track bugs that they fixed ages ago in your "
811 "changelog)."
812 msgstr ""
813
814 #. type: Content of: <chapter><section><section><screen>
815 #: best-pkging-practices.dbk:557
816 #, no-wrap
817 msgid "  * Closes: #12345, #12346, #15432\n"
818 msgstr ""
819
820 #. type: Content of: <chapter><section><section><para>
821 #: best-pkging-practices.dbk:560
822 msgid ""
823 "Where's the description? If you can't think of a descriptive message, start "
824 "by inserting the title of each different bug."
825 msgstr ""
826
827 #. type: Content of: <chapter><section><section><title>
828 #: best-pkging-practices.dbk:566
829 msgid "Supplementing changelogs with NEWS.Debian files"
830 msgstr ""
831
832 #. type: Content of: <chapter><section><section><para>
833 #: best-pkging-practices.dbk:568
834 msgid ""
835 "Important news about changes in a package can also be put in <filename> "
836 "NEWS.Debian</filename> files.  The news will be displayed by tools like "
837 "apt-listchanges, before all the rest of the changelogs.  This is the "
838 "preferred means to let the user know about significant changes in a "
839 "package.  It is better than using debconf notes since it is less annoying "
840 "and the user can go back and refer to the <filename> NEWS.Debian</filename> "
841 "file after the install.  And it's better than listing major changes in "
842 "<filename>README.Debian</filename>, since the user can easily miss such "
843 "notes."
844 msgstr ""
845
846 #. type: Content of: <chapter><section><section><para>
847 #: best-pkging-practices.dbk:579
848 msgid ""
849 "The file format is the same as a debian changelog file, but leave off the "
850 "asterisks and describe each news item with a full paragraph when necessary "
851 "rather than the more concise summaries that would go in a changelog.  It's a "
852 "good idea to run your file through <literal>dpkg-parsechangelog</literal> to "
853 "check its formatting as it will not be automatically checked during build as "
854 "the changelog is.  Here is an example of a real <filename>NEWS.Debian "
855 "</filename> file:"
856 msgstr ""
857
858 #. type: Content of: <chapter><section><section><screen>
859 #: best-pkging-practices.dbk:588
860 #, no-wrap
861 msgid ""
862 "cron (3.0pl1-74) unstable; urgency=low\n"
863 "\n"
864 "    The checksecurity script is no longer included with the cron package:\n"
865 "    it now has its own package, checksecurity. If you liked the\n"
866 "    functionality provided with that script, please install the new\n"
867 "    package.\n"
868 "\n"
869 " -- Steve Greenland &lt;stevegr@debian.org&gt;  Sat,  6 Sep 2003 17:15:03 "
870 "-0500\n"
871 msgstr ""
872
873 #. type: Content of: <chapter><section><section><para>
874 #: best-pkging-practices.dbk:598
875 msgid ""
876 "The <filename>NEWS.Debian</filename> file is installed as <filename> "
877 "/usr/share/doc/<replaceable>package</replaceable>/NEWS.Debian.gz</filename>.  "
878 "It is compressed, and always has that name even in Debian native packages.  "
879 "If you use <literal>debhelper</literal>, <literal>dh_installchangelogs "
880 "</literal> will install <filename>debian/NEWS</filename> files for you."
881 msgstr ""
882
883 #. type: Content of: <chapter><section><section><para>
884 #: best-pkging-practices.dbk:605
885 msgid ""
886 "Unlike changelog files, you need not update <filename>NEWS.Debian</filename> "
887 "files with every release.  Only update them if you have something "
888 "particularly newsworthy that user should know about.  If you have no news at "
889 "all, there's no need to ship a <filename>NEWS.Debian</filename> file in your "
890 "package.  No news is good news!"
891 msgstr ""
892
893 #. type: Content of: <chapter><section><title>
894 #: best-pkging-practices.dbk:627
895 msgid "Best practices for maintainer scripts"
896 msgstr ""
897
898 #. type: Content of: <chapter><section><para>
899 #: best-pkging-practices.dbk:629
900 msgid ""
901 "Maintainer scripts include the files <filename>debian/postinst</filename>, "
902 "<filename>debian/preinst</filename>, <filename>debian/prerm</filename> and "
903 "<filename>debian/postrm</filename>.  These scripts take care of any package "
904 "installation or deinstallation setup which isn't handled merely by the "
905 "creation or removal of files and directories.  The following instructions "
906 "supplement the <ulink url=\"&url-debian-policy;\">Debian Policy</ulink>."
907 msgstr ""
908
909 #. type: Content of: <chapter><section><para>
910 #: best-pkging-practices.dbk:637
911 msgid ""
912 "Maintainer scripts must be idempotent.  That means that you need to make "
913 "sure nothing bad will happen if the script is called twice where it would "
914 "usually be called once."
915 msgstr ""
916
917 #. type: Content of: <chapter><section><para>
918 #: best-pkging-practices.dbk:642
919 msgid ""
920 "Standard input and output may be redirected (e.g.  into pipes) for logging "
921 "purposes, so don't rely on them being a tty."
922 msgstr ""
923
924 #. type: Content of: <chapter><section><para>
925 #: best-pkging-practices.dbk:646
926 msgid ""
927 "All prompting or interactive configuration should be kept to a minimum.  "
928 "When it is necessary, you should use the <systemitem "
929 "role=\"package\">debconf</systemitem> package for the interface.  Remember "
930 "that prompting in any case can only be in the <literal>configure</literal> "
931 "stage of the <filename>postinst</filename> script."
932 msgstr ""
933
934 #. type: Content of: <chapter><section><para>
935 #: best-pkging-practices.dbk:653
936 msgid ""
937 "Keep the maintainer scripts as simple as possible.  We suggest you use pure "
938 "POSIX shell scripts.  Remember, if you do need any bash features, the "
939 "maintainer script must have a bash shebang line.  POSIX shell or Bash are "
940 "preferred to Perl, since they enable <systemitem "
941 "role=\"package\">debhelper</systemitem> to easily add bits to the scripts."
942 msgstr ""
943
944 #. type: Content of: <chapter><section><para>
945 #: best-pkging-practices.dbk:660
946 msgid ""
947 "If you change your maintainer scripts, be sure to test package removal, "
948 "double installation, and purging.  Be sure that a purged package is "
949 "completely gone, that is, it must remove any files created, directly or "
950 "indirectly, in any maintainer script."
951 msgstr ""
952
953 #. type: Content of: <chapter><section><para>
954 #: best-pkging-practices.dbk:666
955 msgid ""
956 "If you need to check for the existence of a command, you should use "
957 "something like"
958 msgstr ""
959
960 #. type: Content of: <chapter><section><programlisting>
961 #: best-pkging-practices.dbk:669
962 #, no-wrap
963 msgid "if [ -x /usr/sbin/install-docs ]; then ..."
964 msgstr ""
965
966 #. type: Content of: <chapter><section><para>
967 #: best-pkging-practices.dbk:671
968 msgid ""
969 "If you don't wish to hard-code the path of a command in your maintainer "
970 "script, the following POSIX-compliant shell function may help:"
971 msgstr ""
972
973 #. type: Content of: <chapter><section><para>
974 #: best-pkging-practices.dbk:676
975 msgid ""
976 "You can use this function to search <literal>$PATH</literal> for a command "
977 "name, passed as an argument.  It returns true (zero) if the command was "
978 "found, and false if not.  This is really the most portable way, since "
979 "<literal>command -v</literal>, <command>type</command>, and "
980 "<command>which</command> are not POSIX."
981 msgstr ""
982
983 #. type: Content of: <chapter><section><para>
984 #: best-pkging-practices.dbk:683
985 msgid ""
986 "While <command>which</command> is an acceptable alternative, since it is "
987 "from the required <systemitem role=\"package\">debianutils</systemitem> "
988 "package, it's not on the root partition.  That is, it's in "
989 "<filename>/usr/bin</filename> rather than <filename>/bin</filename>, so one "
990 "can't use it in scripts which are run before the <filename>/usr</filename> "
991 "partition is mounted.  Most scripts won't have this problem, though."
992 msgstr ""
993
994 #. type: Content of: <chapter><section><title>
995 #: best-pkging-practices.dbk:693
996 msgid ""
997 "Configuration management with <systemitem "
998 "role=\"package\">debconf</systemitem>"
999 msgstr ""
1000
1001 #. type: Content of: <chapter><section><para>
1002 #: best-pkging-practices.dbk:695
1003 msgid ""
1004 "<systemitem role=\"package\">Debconf</systemitem> is a configuration "
1005 "management system which can be used by all the various packaging scripts "
1006 "(<filename>postinst</filename> mainly) to request feedback from the user "
1007 "concerning how to configure the package.  Direct user interactions must now "
1008 "be avoided in favor of <systemitem role=\"package\">debconf</systemitem> "
1009 "interaction.  This will enable non-interactive installations in the future."
1010 msgstr ""
1011
1012 #. type: Content of: <chapter><section><para>
1013 #: best-pkging-practices.dbk:703
1014 msgid ""
1015 "Debconf is a great tool but it is often poorly used.  Many common mistakes "
1016 "are listed in the <citerefentry> "
1017 "<refentrytitle>debconf-devel</refentrytitle> <manvolnum>7</manvolnum> "
1018 "</citerefentry> man page.  It is something that you must read if you decide "
1019 "to use debconf.  Also, we document some best practices here."
1020 msgstr ""
1021
1022 #. type: Content of: <chapter><section><para>
1023 #: best-pkging-practices.dbk:710
1024 msgid ""
1025 "These guidelines include some writing style and typography recommendations, "
1026 "general considerations about debconf usage as well as more specific "
1027 "recommendations for some parts of the distribution (the installation system "
1028 "for instance)."
1029 msgstr ""
1030
1031 #. type: Content of: <chapter><section><section><title>
1032 #: best-pkging-practices.dbk:716
1033 msgid "Do not abuse debconf"
1034 msgstr ""
1035
1036 #. type: Content of: <chapter><section><section><para>
1037 #: best-pkging-practices.dbk:718
1038 msgid ""
1039 "Since debconf appeared in Debian, it has been widely abused and several "
1040 "criticisms received by the Debian distribution come from debconf abuse with "
1041 "the need of answering a wide bunch of questions before getting any little "
1042 "thing installed."
1043 msgstr ""
1044
1045 #. type: Content of: <chapter><section><section><para>
1046 #: best-pkging-practices.dbk:724
1047 msgid ""
1048 "Keep usage notes to what they belong: the NEWS.Debian, or README.Debian "
1049 "file.  Only use notes for important notes which may directly affect the "
1050 "package usability.  Remember that notes will always block the install until "
1051 "confirmed or bother the user by email."
1052 msgstr ""
1053
1054 #. type: Content of: <chapter><section><section><para>
1055 #: best-pkging-practices.dbk:730
1056 msgid ""
1057 "Carefully choose the questions priorities in maintainer scripts.  See "
1058 "<citerefentry> <refentrytitle>debconf-devel</refentrytitle> "
1059 "<manvolnum>7</manvolnum> </citerefentry> for details about priorities.  Most "
1060 "questions should use medium and low priorities."
1061 msgstr ""
1062
1063 #. type: Content of: <chapter><section><section><title>
1064 #: best-pkging-practices.dbk:738
1065 msgid "General recommendations for authors and translators"
1066 msgstr ""
1067
1068 #. type: Content of: <chapter><section><section><section><title>
1069 #: best-pkging-practices.dbk:740
1070 msgid "Write correct English"
1071 msgstr ""
1072
1073 #. type: Content of: <chapter><section><section><section><para>
1074 #: best-pkging-practices.dbk:742
1075 msgid ""
1076 "Most Debian package maintainers are not native English speakers.  So, "
1077 "writing properly phrased templates may not be easy for them."
1078 msgstr ""
1079
1080 #. type: Content of: <chapter><section><section><section><para>
1081 #: best-pkging-practices.dbk:746
1082 msgid ""
1083 "Please use (and abuse) &email-debian-l10n-english; mailing list.  Have your "
1084 "templates proofread."
1085 msgstr ""
1086
1087 #. type: Content of: <chapter><section><section><section><para>
1088 #: best-pkging-practices.dbk:750
1089 msgid ""
1090 "Badly written templates give a poor image of your package, of your work...or "
1091 "even of Debian itself."
1092 msgstr ""
1093
1094 #. type: Content of: <chapter><section><section><section><para>
1095 #: best-pkging-practices.dbk:754
1096 msgid ""
1097 "Avoid technical jargon as much as possible.  If some terms sound common to "
1098 "you, they may be impossible to understand for others.  If you cannot avoid "
1099 "them, try to explain them (use the extended description).  When doing so, "
1100 "try to balance between verbosity and simplicity."
1101 msgstr ""
1102
1103 #. type: Content of: <chapter><section><section><section><title>
1104 #: best-pkging-practices.dbk:762
1105 msgid "Be kind to translators"
1106 msgstr ""
1107
1108 #. type: Content of: <chapter><section><section><section><para>
1109 #: best-pkging-practices.dbk:764
1110 msgid ""
1111 "Debconf templates may be translated.  Debconf, along with its sister package "
1112 "<command>po-debconf</command> offers a simple framework for getting "
1113 "templates translated by translation teams or even individuals."
1114 msgstr ""
1115
1116 #. type: Content of: <chapter><section><section><section><para>
1117 #: best-pkging-practices.dbk:769
1118 msgid ""
1119 "Please use gettext-based templates.  Install <systemitem "
1120 "role=\"package\">po-debconf</systemitem> on your development system and read "
1121 "its documentation (<literal>man po-debconf</literal> is a good start)."
1122 msgstr ""
1123
1124 #. type: Content of: <chapter><section><section><section><para>
1125 #: best-pkging-practices.dbk:774
1126 msgid ""
1127 "Avoid changing templates too often.  Changing templates text induces more "
1128 "work to translators which will get their translation fuzzied.  A fuzzy "
1129 "translation is a string for which the original changed since it was "
1130 "translated, therefore requiring some update by a translator to be usable.  "
1131 "When changes are small enough, the original translation is kept in PO files "
1132 "but marked as <literal>fuzzy</literal>."
1133 msgstr ""
1134
1135 #. type: Content of: <chapter><section><section><section><para>
1136 #: best-pkging-practices.dbk:782
1137 msgid ""
1138 "If you plan to do changes to your original templates, please use the "
1139 "notification system provided with the <systemitem "
1140 "role=\"package\">po-debconf</systemitem> package, namely the <command> "
1141 "podebconf-report-po</command>, to contact translators.  Most active "
1142 "translators are very responsive and getting their work included along with "
1143 "your modified templates will save you additional uploads.  If you use "
1144 "gettext-based templates, the translator's name and e-mail addresses are "
1145 "mentioned in the PO files headers and will be used by <command> "
1146 "podebconf-report-po</command>."
1147 msgstr ""
1148
1149 #. type: Content of: <chapter><section><section><section><para>
1150 #: best-pkging-practices.dbk:794
1151 msgid "A recommended use of that utility is:"
1152 msgstr ""
1153
1154 #. type: Content of: <chapter><section><section><section><programlisting>
1155 #: best-pkging-practices.dbk:796
1156 #, no-wrap
1157 msgid ""
1158 "cd debian/po &amp;&amp; podebconf-report-po --languageteam --withtranslators "
1159 "--call --deadline=\"+10 days\""
1160 msgstr ""
1161
1162 #. type: Content of: <chapter><section><section><section><para>
1163 #: best-pkging-practices.dbk:798
1164 msgid ""
1165 "This command will first synchronize the PO and POT files in debian/po with "
1166 "the templates files listed in <filename>debian/po/POTFILES.in</filename>.  "
1167 "Then, it will send a call for translation updates to the language team "
1168 "(mentioned in the <literal>Language-Team</literal> field of each PO file)  "
1169 "as well as the last translator (mentioned in "
1170 "<literal>Last-translator</literal>). Finally, it will also send a call for "
1171 "new translations, in the &email-debian-i18n; mailing list."
1172 msgstr ""
1173
1174 #. type: Content of: <chapter><section><section><section><para>
1175 #: best-pkging-practices.dbk:807
1176 msgid ""
1177 "Giving a deadline to translators is always appreciated, so that they can "
1178 "organize their work. Please remember that some translation teams have a "
1179 "formalized translate/review process and a delay lower than 10 days is "
1180 "considered as unreasonable. A shorter delay puts too much pressure on "
1181 "translation teams and should be kept for very minor changes."
1182 msgstr ""
1183
1184 #. type: Content of: <chapter><section><section><section><para>
1185 #: best-pkging-practices.dbk:814
1186 msgid ""
1187 "If in doubt, you may also contact the translation team for a given language "
1188 "(debian-l10n-xxxxx@&lists-host;), or the &email-debian-i18n; mailing list."
1189 msgstr ""
1190
1191 #. type: Content of: <chapter><section><section><section><title>
1192 #: best-pkging-practices.dbk:821
1193 msgid "Unfuzzy complete translations when correcting typos and spelling"
1194 msgstr ""
1195
1196 #. type: Content of: <chapter><section><section><section><para>
1197 #: best-pkging-practices.dbk:823
1198 msgid ""
1199 "When the text of a debconf template is corrected and you are <emphasis "
1200 "role=\"strong\">sure</emphasis> that the change does <emphasis "
1201 "role=\"strong\">not</emphasis> affect translations, please be kind to "
1202 "translators and <emphasis>unfuzzy</emphasis> their translations."
1203 msgstr ""
1204
1205 #. type: Content of: <chapter><section><section><section><para>
1206 #: best-pkging-practices.dbk:829
1207 msgid ""
1208 "If you don't do so, the whole template will not be translated as long as a "
1209 "translator will send you an update."
1210 msgstr ""
1211
1212 #. type: Content of: <chapter><section><section><section><para>
1213 #: best-pkging-practices.dbk:833
1214 msgid ""
1215 "To <emphasis>unfuzzy</emphasis> translations, you can use two methods. The "
1216 "first method does <emphasis>preventive</emphasis> search and replace actions "
1217 "in the PO files. The latter uses <command>gettext</command> utilities to "
1218 "<emphasis>unfuzzy</emphasis> strings."
1219 msgstr ""
1220
1221 #. type: Content of: <chapter><section><section><section><para>
1222 #: best-pkging-practices.dbk:839
1223 msgid "<emphasis>Preventive unfuzzy</emphasis> method:"
1224 msgstr ""
1225
1226 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1227 #: best-pkging-practices.dbk:844
1228 msgid ""
1229 "Try finding a complete translation file <emphasis role=\"strong\"> "
1230 "before</emphasis> the change:"
1231 msgstr ""
1232
1233 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1234 #: best-pkging-practices.dbk:847 best-pkging-practices.dbk:917
1235 #, no-wrap
1236 msgid ""
1237 "for i in debian/po/*po; do echo -n $i: ; msgfmt -o /dev/null\n"
1238 "--statistics $i; done"
1239 msgstr ""
1240
1241 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1242 #: best-pkging-practices.dbk:850
1243 msgid ""
1244 "The file only showing <emphasis>translated</emphasis> items will be used as "
1245 "the reference file. If there is none (which should not happen if you take "
1246 "care to properly interact with translators), you should use the file with "
1247 "the most translated strings."
1248 msgstr ""
1249
1250 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1251 #: best-pkging-practices.dbk:858
1252 msgid ""
1253 "Identify the needed change. In this example, let's assume the change is "
1254 "about fixing a typo in the word <literal>typo</literal> which was "
1255 "inadvertently written as <literal>tpyo</literal>. Therefore, the change is "
1256 "<command>s/tpyo/typo</command>."
1257 msgstr ""
1258
1259 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1260 #: best-pkging-practices.dbk:866
1261 msgid ""
1262 "Check that this change is only applied to the place where you really intend "
1263 "to make it and <emphasis role=\"strong\">not</emphasis> in any other place "
1264 "where the original string is appropriate. This specifically applies to "
1265 "change in punctuation, for instance."
1266 msgstr ""
1267
1268 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1269 #: best-pkging-practices.dbk:874
1270 msgid ""
1271 "Modify all PO files by using <command>sed</command>. The use of that command "
1272 "is recommended over any text editor to guarantee that the files encoding "
1273 "will not be broken by the edit action."
1274 msgstr ""
1275
1276 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1277 #: best-pkging-practices.dbk:879
1278 #, no-wrap
1279 msgid ""
1280 "cd debian/po\n"
1281 "for i in *.po; do sed -i 's/tpyo/typo/g' $i; done\n"
1282 msgstr ""
1283
1284 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1285 #: best-pkging-practices.dbk:885
1286 msgid "Change the debconf template file to fix the typo."
1287 msgstr ""
1288
1289 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1290 #: best-pkging-practices.dbk:890
1291 msgid "Run <command>debconf-updatepo</command>"
1292 msgstr ""
1293
1294 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1295 #: best-pkging-practices.dbk:895
1296 msgid ""
1297 "Check the <filename>foo.po</filename> reference file. Its statistics should "
1298 "not be changed:"
1299 msgstr ""
1300
1301 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1302 #: best-pkging-practices.dbk:899
1303 #, no-wrap
1304 msgid "msgfmt -o /dev/null --statistics debian/po/foo.po\n"
1305 msgstr ""
1306
1307 #. type: Content of: <chapter><section><section><section><para>
1308 #: best-pkging-practices.dbk:908
1309 msgid "Gettext utilities method:"
1310 msgstr ""
1311
1312 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1313 #: best-pkging-practices.dbk:913
1314 msgid ""
1315 "Put all incomplete PO files out of the way.  You can check the completeness "
1316 "by using (needs the <systemitem role=\"package\">gettext</systemitem> "
1317 "package installed):"
1318 msgstr ""
1319
1320 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1321 #: best-pkging-practices.dbk:922
1322 msgid ""
1323 "move all files which report either fuzzy strings to a temporary place.  "
1324 "Files which report no fuzzy strings (only translated and untranslated) will "
1325 "be kept in place."
1326 msgstr ""
1327
1328 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1329 #: best-pkging-practices.dbk:929
1330 msgid ""
1331 "now <emphasis role=\"strong\">and now only</emphasis>, modify the template "
1332 "for the typos and check again that translation are not impacted (typos, "
1333 "spelling errors, sometimes typographical corrections are usually OK)"
1334 msgstr ""
1335
1336 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1337 #: best-pkging-practices.dbk:936
1338 msgid ""
1339 "run <command>debconf-updatepo</command>.  This will fuzzy all strings you "
1340 "modified in translations.  You can see this by running the above again"
1341 msgstr ""
1342
1343 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1344 #: best-pkging-practices.dbk:942
1345 msgid "use the following command:"
1346 msgstr ""
1347
1348 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1349 #: best-pkging-practices.dbk:944
1350 #, no-wrap
1351 msgid "for i in debian/po/*po; do msgattrib --output-file=$i --clear-fuzzy $i; done"
1352 msgstr ""
1353
1354 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1355 #: best-pkging-practices.dbk:948
1356 msgid ""
1357 "move back to debian/po the files which showed fuzzy strings in the first "
1358 "step"
1359 msgstr ""
1360
1361 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1362 #: best-pkging-practices.dbk:953
1363 msgid "run <command>debconf-updatepo</command> again"
1364 msgstr ""
1365
1366 #. type: Content of: <chapter><section><section><section><title>
1367 #: best-pkging-practices.dbk:960
1368 msgid "Do not make assumptions about interfaces"
1369 msgstr ""
1370
1371 #. type: Content of: <chapter><section><section><section><para>
1372 #: best-pkging-practices.dbk:962
1373 msgid ""
1374 "Templates text should not make reference to widgets belonging to some "
1375 "debconf interfaces.  Sentences like <emphasis>If you answer "
1376 "Yes...</emphasis> have no meaning for users of graphical interfaces which "
1377 "use checkboxes for boolean questions."
1378 msgstr ""
1379
1380 #. type: Content of: <chapter><section><section><section><para>
1381 #: best-pkging-practices.dbk:967
1382 msgid ""
1383 "String templates should also avoid mentioning the default values in their "
1384 "description.  First, because this is redundant with the values seen by the "
1385 "users.  Also, because these default values may be different from the "
1386 "maintainer choices (for instance, when the debconf database was preseeded)."
1387 msgstr ""
1388
1389 #. type: Content of: <chapter><section><section><section><para>
1390 #: best-pkging-practices.dbk:973
1391 msgid ""
1392 "More generally speaking, try to avoid referring to user actions.  Just give "
1393 "facts."
1394 msgstr ""
1395
1396 #. type: Content of: <chapter><section><section><section><title>
1397 #: best-pkging-practices.dbk:979
1398 msgid "Do not use first person"
1399 msgstr ""
1400
1401 #. type: Content of: <chapter><section><section><section><para>
1402 #: best-pkging-practices.dbk:981
1403 msgid ""
1404 "You should avoid the use of first person (<emphasis>I will do "
1405 "this...</emphasis> or <emphasis>We recommend...</emphasis>).  The computer "
1406 "is not a person and the Debconf templates do not speak for the Debian "
1407 "developers.  You should use neutral construction.  Those of you who already "
1408 "wrote scientific publications, just write your templates like you would "
1409 "write a scientific paper.  However, try using active voice if still "
1410 "possible, like <emphasis>Enable this if ...</emphasis> instead of "
1411 "<emphasis>This can be enabled if...</emphasis>."
1412 msgstr ""
1413
1414 #. type: Content of: <chapter><section><section><section><title>
1415 #: best-pkging-practices.dbk:991
1416 msgid "Be gender neutral"
1417 msgstr ""
1418
1419 #. type: Content of: <chapter><section><section><section><para>
1420 #: best-pkging-practices.dbk:993
1421 msgid ""
1422 "The world is made of men and women.  Please use gender-neutral constructions "
1423 "in your writing."
1424 msgstr ""
1425
1426 #. type: Content of: <chapter><section><section><title>
1427 #: best-pkging-practices.dbk:1001
1428 msgid "Templates fields definition"
1429 msgstr ""
1430
1431 #. type: Content of: <chapter><section><section><para>
1432 #: best-pkging-practices.dbk:1003
1433 msgid ""
1434 "This part gives some information which is mostly taken from the "
1435 "<citerefentry> <refentrytitle>debconf-devel</refentrytitle> "
1436 "<manvolnum>7</manvolnum> </citerefentry> manual page."
1437 msgstr ""
1438
1439 #. type: Content of: <chapter><section><section><section><title>
1440 #: best-pkging-practices.dbk:1008
1441 msgid "Type"
1442 msgstr ""
1443
1444 #. type: Content of: <chapter><section><section><section><section><title>
1445 #: best-pkging-practices.dbk:1010
1446 msgid "string:"
1447 msgstr ""
1448
1449 #. type: Content of: <chapter><section><section><section><section><para>
1450 #: best-pkging-practices.dbk:1012
1451 msgid "Results in a free-form input field that the user can type any string into."
1452 msgstr ""
1453
1454 #. type: Content of: <chapter><section><section><section><section><title>
1455 #: best-pkging-practices.dbk:1017
1456 msgid "password:"
1457 msgstr ""
1458
1459 #. type: Content of: <chapter><section><section><section><section><para>
1460 #: best-pkging-practices.dbk:1019
1461 msgid ""
1462 "Prompts the user for a password.  Use this with caution; be aware that the "
1463 "password the user enters will be written to debconf's database.  You should "
1464 "probably clean that value out of the database as soon as is possible."
1465 msgstr ""
1466
1467 #. type: Content of: <chapter><section><section><section><section><title>
1468 #: best-pkging-practices.dbk:1026
1469 msgid "boolean:"
1470 msgstr ""
1471
1472 #. type: Content of: <chapter><section><section><section><section><para>
1473 #: best-pkging-practices.dbk:1028
1474 msgid ""
1475 "A true/false choice.  Remember: true/false, <emphasis role=\"strong\">not "
1476 "yes/no</emphasis>..."
1477 msgstr ""
1478
1479 #. type: Content of: <chapter><section><section><section><section><title>
1480 #: best-pkging-practices.dbk:1034
1481 msgid "select:"
1482 msgstr ""
1483
1484 #. type: Content of: <chapter><section><section><section><section><para>
1485 #: best-pkging-practices.dbk:1036
1486 msgid ""
1487 "A choice between one of a number of values.  The choices must be specified "
1488 "in a field named 'Choices'.  Separate the possible values with commas and "
1489 "spaces, like this: <literal>Choices: yes, no, maybe</literal>."
1490 msgstr ""
1491
1492 #. type: Content of: <chapter><section><section><section><section><para>
1493 #: best-pkging-practices.dbk:1041
1494 msgid ""
1495 "If choices are translatable strings, the 'Choices' field may be marked as "
1496 "translatable by using <literal>__Choices</literal>. The double underscore "
1497 "will split out each choice in a separate string."
1498 msgstr ""
1499
1500 #. type: Content of: <chapter><section><section><section><section><para>
1501 #: best-pkging-practices.dbk:1046
1502 msgid ""
1503 "The <command>po-debconf</command> system also offers interesting "
1504 "possibilities to only mark <emphasis role=\"strong\">some</emphasis> choices "
1505 "as translatable.  Example:"
1506 msgstr ""
1507
1508 #. type: Content of: <chapter><section><section><section><section><programlisting>
1509 #: best-pkging-practices.dbk:1051
1510 #, no-wrap
1511 msgid ""
1512 "Template: foo/bar\n"
1513 "Type: Select\n"
1514 "#flag:translate:3\n"
1515 "__Choices: PAL, SECAM, Other\n"
1516 "_Description: TV standard:\n"
1517 " Please choose the TV standard used in your country.\n"
1518 msgstr ""
1519
1520 #. type: Content of: <chapter><section><section><section><section><para>
1521 #: best-pkging-practices.dbk:1059
1522 msgid ""
1523 "In that example, only the 'Other' string is translatable while others are "
1524 "acronyms that should not be translated. The above allows only 'Other' to be "
1525 "included in PO and POT files."
1526 msgstr ""
1527
1528 #. type: Content of: <chapter><section><section><section><section><para>
1529 #: best-pkging-practices.dbk:1064
1530 msgid ""
1531 "The debconf templates flag system offers many such possibilities. The "
1532 "<citerefentry> <refentrytitle>po-debconf</refentrytitle> "
1533 "<manvolnum>7</manvolnum> </citerefentry> manual page lists all these "
1534 "possibilities."
1535 msgstr ""
1536
1537 #. type: Content of: <chapter><section><section><section><section><title>
1538 #: best-pkging-practices.dbk:1072
1539 msgid "multiselect:"
1540 msgstr ""
1541
1542 #. type: Content of: <chapter><section><section><section><section><para>
1543 #: best-pkging-practices.dbk:1074
1544 msgid ""
1545 "Like the select data type, except the user can choose any number of items "
1546 "from the choices list (or chose none of them)."
1547 msgstr ""
1548
1549 #. type: Content of: <chapter><section><section><section><section><title>
1550 #: best-pkging-practices.dbk:1080
1551 msgid "note:"
1552 msgstr ""
1553
1554 #. type: Content of: <chapter><section><section><section><section><para>
1555 #: best-pkging-practices.dbk:1082
1556 msgid ""
1557 "Rather than being a question per se, this datatype indicates a note that can "
1558 "be displayed to the user.  It should be used only for important notes that "
1559 "the user really should see, since debconf will go to great pains to make "
1560 "sure the user sees it; halting the install for them to press a key, and even "
1561 "mailing the note to them in some cases."
1562 msgstr ""
1563
1564 #. type: Content of: <chapter><section><section><section><section><title>
1565 #: best-pkging-practices.dbk:1091
1566 msgid "text:"
1567 msgstr ""
1568
1569 #. type: Content of: <chapter><section><section><section><section><para>
1570 #: best-pkging-practices.dbk:1093
1571 msgid "This type is now considered obsolete: don't use it."
1572 msgstr ""
1573
1574 #. type: Content of: <chapter><section><section><section><section><title>
1575 #: best-pkging-practices.dbk:1098
1576 msgid "error:"
1577 msgstr ""
1578
1579 #. type: Content of: <chapter><section><section><section><section><para>
1580 #: best-pkging-practices.dbk:1100
1581 msgid ""
1582 "This type is designed to handle error messages.  It is mostly similar to the "
1583 "note type.  Frontends may present it differently (for instance, the dialog "
1584 "frontend of cdebconf draws a red screen instead of the usual blue one)."
1585 msgstr ""
1586
1587 #. type: Content of: <chapter><section><section><section><section><para>
1588 #: best-pkging-practices.dbk:1105
1589 msgid ""
1590 "It is recommended to use this type for any message that needs user attention "
1591 "for a correction of any kind."
1592 msgstr ""
1593
1594 #. type: Content of: <chapter><section><section><section><title>
1595 #: best-pkging-practices.dbk:1113
1596 msgid "Description: short and extended description"
1597 msgstr ""
1598
1599 #. type: Content of: <chapter><section><section><section><para>
1600 #: best-pkging-practices.dbk:1115
1601 msgid ""
1602 "Template descriptions have two parts: short and extended.  The short "
1603 "description is in the Description: line of the template."
1604 msgstr ""
1605
1606 #. type: Content of: <chapter><section><section><section><para>
1607 #: best-pkging-practices.dbk:1119
1608 msgid ""
1609 "The short description should be kept short (50 characters or so) so that it "
1610 "may be accomodated by most debconf interfaces.  Keeping it short also helps "
1611 "translators, as usually translations tend to end up being longer than the "
1612 "original."
1613 msgstr ""
1614
1615 #. type: Content of: <chapter><section><section><section><para>
1616 #: best-pkging-practices.dbk:1125
1617 msgid ""
1618 "The short description should be able to stand on its own.  Some interfaces "
1619 "do not show the long description by default, or only if the user explicitely "
1620 "asks for it or even do not show it at all.  Avoid things like What do you "
1621 "want to do?"
1622 msgstr ""
1623
1624 #. type: Content of: <chapter><section><section><section><para>
1625 #: best-pkging-practices.dbk:1131
1626 msgid ""
1627 "The short description does not necessarily have to be a full sentence.  This "
1628 "is part of the keep it short and efficient recommendation."
1629 msgstr ""
1630
1631 #. type: Content of: <chapter><section><section><section><para>
1632 #: best-pkging-practices.dbk:1135
1633 msgid ""
1634 "The extended description should not repeat the short description word for "
1635 "word.  If you can't think up a long description, then first, think some "
1636 "more.  Post to debian-devel.  Ask for help.  Take a writing class! That "
1637 "extended description is important.  If after all that you still can't come "
1638 "up with anything, leave it blank."
1639 msgstr ""
1640
1641 #. type: Content of: <chapter><section><section><section><para>
1642 #: best-pkging-practices.dbk:1142
1643 msgid ""
1644 "The extended description should use complete sentences.  Paragraphs should "
1645 "be kept short for improved readability.  Do not mix two ideas in the same "
1646 "paragraph but rather use another paragraph."
1647 msgstr ""
1648
1649 #. type: Content of: <chapter><section><section><section><para>
1650 #: best-pkging-practices.dbk:1147
1651 msgid ""
1652 "Don't be too verbose.  User tend to ignore too long screens.  20 lines are "
1653 "by experience a border you shouldn't cross, because that means that in the "
1654 "classical dialog interface, people will need to scroll, and lot of people "
1655 "just don't do that."
1656 msgstr ""
1657
1658 #. type: Content of: <chapter><section><section><section><para>
1659 #: best-pkging-practices.dbk:1153
1660 msgid ""
1661 "The extended description should <emphasis role=\"strong\">never</emphasis> "
1662 "include a question."
1663 msgstr ""
1664
1665 #. type: Content of: <chapter><section><section><section><para>
1666 #: best-pkging-practices.dbk:1157
1667 msgid ""
1668 "For specific rules depending on templates type (string, boolean, etc.), "
1669 "please read below."
1670 msgstr ""
1671
1672 #. type: Content of: <chapter><section><section><section><title>
1673 #: best-pkging-practices.dbk:1163
1674 msgid "Choices"
1675 msgstr ""
1676
1677 #. type: Content of: <chapter><section><section><section><para>
1678 #: best-pkging-practices.dbk:1165
1679 msgid ""
1680 "This field should be used for Select and Multiselect types.  It contains the "
1681 "possible choices which will be presented to users.  These choices should be "
1682 "separated by commas."
1683 msgstr ""
1684
1685 #. type: Content of: <chapter><section><section><section><title>
1686 #: best-pkging-practices.dbk:1172
1687 msgid "Default"
1688 msgstr ""
1689
1690 #. type: Content of: <chapter><section><section><section><para>
1691 #: best-pkging-practices.dbk:1174
1692 msgid ""
1693 "This field is optional.  It contains the default answer for string, select "
1694 "and multiselect templates.  For multiselect templates, it may contain a "
1695 "comma-separated list of choices."
1696 msgstr ""
1697
1698 #. type: Content of: <chapter><section><section><title>
1699 #: best-pkging-practices.dbk:1183
1700 msgid "Templates fields specific style guide"
1701 msgstr ""
1702
1703 #. type: Content of: <chapter><section><section><section><title>
1704 #: best-pkging-practices.dbk:1185
1705 msgid "Type field"
1706 msgstr ""
1707
1708 #. type: Content of: <chapter><section><section><section><para>
1709 #: best-pkging-practices.dbk:1187
1710 msgid ""
1711 "No specific indication except: use the appropriate type by referring to the "
1712 "previous section."
1713 msgstr ""
1714
1715 #. type: Content of: <chapter><section><section><section><title>
1716 #: best-pkging-practices.dbk:1193
1717 msgid "Description field"
1718 msgstr ""
1719
1720 #. type: Content of: <chapter><section><section><section><para>
1721 #: best-pkging-practices.dbk:1195
1722 msgid ""
1723 "Below are specific instructions for properly writing the Description (short "
1724 "and extended) depending on the template type."
1725 msgstr ""
1726
1727 #. type: Content of: <chapter><section><section><section><section><title>
1728 #: best-pkging-practices.dbk:1199
1729 msgid "String/password templates"
1730 msgstr ""
1731
1732 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1733 #: best-pkging-practices.dbk:1203
1734 msgid ""
1735 "The short description is a prompt and <emphasis "
1736 "role=\"strong\">not</emphasis> a title.  Avoid question style prompts (IP "
1737 "Address?) in favour of opened prompts (IP address:).  The use of colons is "
1738 "recommended."
1739 msgstr ""
1740
1741 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1742 #: best-pkging-practices.dbk:1210
1743 msgid ""
1744 "The extended description is a complement to the short description.  In the "
1745 "extended part, explain what is being asked, rather than ask the same "
1746 "question again using longer words.  Use complete sentences.  Terse writing "
1747 "style is strongly discouraged."
1748 msgstr ""
1749
1750 #. type: Content of: <chapter><section><section><section><section><title>
1751 #: best-pkging-practices.dbk:1220
1752 msgid "Boolean templates"
1753 msgstr ""
1754
1755 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1756 #: best-pkging-practices.dbk:1224
1757 msgid ""
1758 "The short description should be phrased in the form of a question which "
1759 "should be kept short and should generally end with a question mark.  Terse "
1760 "writing style is permitted and even encouraged if the question is rather "
1761 "long (remember that translations are often longer than original versions)"
1762 msgstr ""
1763
1764 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1765 #: best-pkging-practices.dbk:1232
1766 msgid ""
1767 "Again, please avoid referring to specific interface widgets.  A common "
1768 "mistake for such templates is if you answer Yes-type constructions."
1769 msgstr ""
1770
1771 #. type: Content of: <chapter><section><section><section><section><title>
1772 #: best-pkging-practices.dbk:1240
1773 msgid "Select/Multiselect"
1774 msgstr ""
1775
1776 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1777 #: best-pkging-practices.dbk:1244
1778 msgid ""
1779 "The short description is a prompt and <emphasis "
1780 "role=\"strong\">not</emphasis> a title.  Do <emphasis "
1781 "role=\"strong\">not</emphasis> use useless Please choose...  constructions.  "
1782 "Users are clever enough to figure out they have to choose something...:)"
1783 msgstr ""
1784
1785 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1786 #: best-pkging-practices.dbk:1252
1787 msgid ""
1788 "The extended description will complete the short description.  It may refer "
1789 "to the available choices.  It may also mention that the user may choose more "
1790 "than one of the available choices, if the template is a multiselect one "
1791 "(although the interface often makes this clear)."
1792 msgstr ""
1793
1794 #. type: Content of: <chapter><section><section><section><section><title>
1795 #: best-pkging-practices.dbk:1262
1796 msgid "Notes"
1797 msgstr ""
1798
1799 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1800 #: best-pkging-practices.dbk:1266
1801 msgid "The short description should be considered to be a *title*."
1802 msgstr ""
1803
1804 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1805 #: best-pkging-practices.dbk:1271
1806 msgid ""
1807 "The extended description is what will be displayed as a more detailed "
1808 "explanation of the note.  Phrases, no terse writing style."
1809 msgstr ""
1810
1811 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1812 #: best-pkging-practices.dbk:1277
1813 msgid ""
1814 "<emphasis role=\"strong\">Do not abuse debconf.</emphasis> Notes are the "
1815 "most common way to abuse debconf.  As written in debconf-devel manual page: "
1816 "it's best to use them only for warning about very serious problems.  The "
1817 "NEWS.Debian or README.Debian files are the appropriate location for a lot of "
1818 "notes.  If, by reading this, you consider converting your Note type "
1819 "templates to entries in NEWS/Debian or README.Debian, plus consider keeping "
1820 "existing translations for the future."
1821 msgstr ""
1822
1823 #. type: Content of: <chapter><section><section><section><title>
1824 #: best-pkging-practices.dbk:1292
1825 msgid "Choices field"
1826 msgstr ""
1827
1828 #. type: Content of: <chapter><section><section><section><para>
1829 #: best-pkging-practices.dbk:1294
1830 msgid ""
1831 "If the Choices are likely to change often, please consider using the "
1832 "__Choices trick.  This will split each individual choice into a single "
1833 "string, which will considerably help translators for doing their work."
1834 msgstr ""
1835
1836 #. type: Content of: <chapter><section><section><section><title>
1837 #: best-pkging-practices.dbk:1301 best-pkging-practices.dbk:1339
1838 msgid "Default field"
1839 msgstr ""
1840
1841 #. type: Content of: <chapter><section><section><section><para>
1842 #: best-pkging-practices.dbk:1303
1843 msgid ""
1844 "If the default value, for a select template, is likely to vary depending on "
1845 "the user language (for instance, if the choice is a language choice), please "
1846 "use the _DefaultChoice trick."
1847 msgstr ""
1848
1849 #. type: Content of: <chapter><section><section><section><para>
1850 #: best-pkging-practices.dbk:1308
1851 msgid ""
1852 "This special field allow translators to put the most appropriate choice "
1853 "according to their own language.  It will become the default choice when "
1854 "their language is used while your own mentioned Default Choice will be used "
1855 "when using English."
1856 msgstr ""
1857
1858 #. type: Content of: <chapter><section><section><section><para>
1859 #: best-pkging-practices.dbk:1314
1860 msgid "Example, taken from the geneweb package templates:"
1861 msgstr ""
1862
1863 #. type: Content of: <chapter><section><section><section><screen>
1864 #: best-pkging-practices.dbk:1317
1865 #, no-wrap
1866 msgid ""
1867 "Template: geneweb/lang\n"
1868 "Type: select\n"
1869 "__Choices: Afrikaans (af), Bulgarian (bg), Catalan (ca), Chinese (zh), Czech "
1870 "(cs), Danish (da), Dutch (nl), English (en), Esperanto (eo), Estonian (et), "
1871 "Finnish (fi), French (fr), German (de), Hebrew (he), Icelandic (is), Italian "
1872 "(it), Latvian (lv), Norwegian (no), Polish (pl), Portuguese (pt), Romanian "
1873 "(ro), Russian (ru), Spanish (es), Swedish (sv)\n"
1874 "# This is the default choice. Translators may put their own language here\n"
1875 "# instead of the default.\n"
1876 "# WARNING : you MUST use the ENGLISH FORM of your language\n"
1877 "# For instance, the french translator will need to put French (fr) here.\n"
1878 "_DefaultChoice: English (en)[ translators, please see comment in PO files]\n"
1879 "_Description: Geneweb default language:\n"
1880 msgstr ""
1881
1882 #. type: Content of: <chapter><section><section><section><para>
1883 #: best-pkging-practices.dbk:1328
1884 msgid ""
1885 "Note the use of brackets which allow internal comments in debconf fields.  "
1886 "Also note the use of comments which will show up in files the translators "
1887 "will work with."
1888 msgstr ""
1889
1890 #. type: Content of: <chapter><section><section><section><para>
1891 #: best-pkging-practices.dbk:1333
1892 msgid ""
1893 "The comments are needed as the DefaultChoice trick is a bit confusing: the "
1894 "translators may put their own choice"
1895 msgstr ""
1896
1897 #. type: Content of: <chapter><section><section><section><para>
1898 #: best-pkging-practices.dbk:1341
1899 msgid ""
1900 "Do NOT use empty default field.  If you don't want to use default values, do "
1901 "not use Default at all."
1902 msgstr ""
1903
1904 #. type: Content of: <chapter><section><section><section><para>
1905 #: best-pkging-practices.dbk:1345
1906 msgid ""
1907 "If you use po-debconf (and you <emphasis role=\"strong\">should</emphasis>, "
1908 "see 2.2), consider making this field translatable, if you think it may be "
1909 "translated."
1910 msgstr ""
1911
1912 #. type: Content of: <chapter><section><section><section><para>
1913 #: best-pkging-practices.dbk:1350
1914 msgid ""
1915 "If the default value may vary depending on language/country (for instance "
1916 "the default value for a language choice), consider using the special "
1917 "_DefaultChoice type documented in <citerefentry> "
1918 "<refentrytitle>po-debconf</refentrytitle> <manvolnum>7</manvolnum> "
1919 "</citerefentry>)."
1920 msgstr ""
1921
1922 #. type: Content of: <chapter><section><title>
1923 #: best-pkging-practices.dbk:1362
1924 msgid "Internationalization"
1925 msgstr ""
1926
1927 #. type: Content of: <chapter><section><section><title>
1928 #: best-pkging-practices.dbk:1364
1929 msgid "Handling debconf translations"
1930 msgstr ""
1931
1932 #. type: Content of: <chapter><section><section><para>
1933 #: best-pkging-practices.dbk:1366
1934 msgid ""
1935 "Like porters, translators have a difficult task.  They work on many packages "
1936 "and must collaborate with many different maintainers.  Moreover, most of the "
1937 "time, they are not native English speakers, so you may need to be "
1938 "particularly patient with them."
1939 msgstr ""
1940
1941 #. type: Content of: <chapter><section><section><para>
1942 #: best-pkging-practices.dbk:1372
1943 msgid ""
1944 "The goal of <systemitem role=\"package\">debconf</systemitem> was to make "
1945 "packages configuration easier for maintainers and for users.  Originally, "
1946 "translation of debconf templates was handled with "
1947 "<command>debconf-mergetemplate</command>.  However, that technique is now "
1948 "deprecated; the best way to accomplish <systemitem "
1949 "role=\"package\">debconf</systemitem> internationalization is by using the "
1950 "<systemitem role=\"package\">po-debconf</systemitem> package.  This method "
1951 "is easier both for maintainer and translators; transition scripts are "
1952 "provided."
1953 msgstr ""
1954
1955 #. type: Content of: <chapter><section><section><para>
1956 #: best-pkging-practices.dbk:1382
1957 msgid ""
1958 "Using <systemitem role=\"package\">po-debconf</systemitem>, the translation "
1959 "is stored in <filename>po</filename> files (drawing from "
1960 "<command>gettext</command> translation techniques).  Special template files "
1961 "contain the original messages and mark which fields are translatable.  When "
1962 "you change the value of a translatable field, by calling "
1963 "<command>debconf-updatepo</command>, the translation is marked as needing "
1964 "attention from the translators.  Then, at build time, the "
1965 "<command>dh_installdebconf</command> program takes care of all the needed "
1966 "magic to add the template along with the up-to-date translations into the "
1967 "binary packages.  Refer to the <citerefentry> "
1968 "<refentrytitle>po-debconf</refentrytitle> <manvolnum>7</manvolnum> "
1969 "</citerefentry> manual page for details."
1970 msgstr ""
1971
1972 #. type: Content of: <chapter><section><section><title>
1973 #: best-pkging-practices.dbk:1398
1974 msgid "Internationalized documentation"
1975 msgstr ""
1976
1977 #. type: Content of: <chapter><section><section><para>
1978 #: best-pkging-practices.dbk:1400
1979 msgid ""
1980 "Internationalizing documentation is crucial for users, but a lot of labor.  "
1981 "There's no way to eliminate all that work, but you can make things easier "
1982 "for translators."
1983 msgstr ""
1984
1985 #. type: Content of: <chapter><section><section><para>
1986 #: best-pkging-practices.dbk:1405
1987 msgid ""
1988 "If you maintain documentation of any size, its easier for translators if "
1989 "they have access to a source control system.  That lets translators see the "
1990 "differences between two versions of the documentation, so, for instance, "
1991 "they can see what needs to be retranslated.  It is recommended that the "
1992 "translated documentation maintain a note about what source control revision "
1993 "the translation is based on.  An interesting system is provided by <ulink "
1994 "url=\"&url-i18n-doc-check;\">doc-check</ulink> in the <systemitem "
1995 "role=\"package\">boot-floppies</systemitem> package, which shows an overview "
1996 "of the translation status for any given language, using structured comments "
1997 "for the current revision of the file to be translated and, for a translated "
1998 "file, the revision of the original file the translation is based on.  You "
1999 "might wish to adapt and provide that in your CVS area."
2000 msgstr ""
2001
2002 #. type: Content of: <chapter><section><section><para>
2003 #: best-pkging-practices.dbk:1419
2004 msgid ""
2005 "If you maintain XML or SGML documentation, we suggest that you isolate any "
2006 "language-independent information and define those as entities in a separate "
2007 "file which is included by all the different translations.  This makes it "
2008 "much easier, for instance, to keep URLs up to date across multiple files."
2009 msgstr ""
2010
2011 #. type: Content of: <chapter><section><title>
2012 #: best-pkging-practices.dbk:1429
2013 msgid "Common packaging situations"
2014 msgstr ""
2015
2016 #. type: Content of: <chapter><section><section><title>
2017 #: best-pkging-practices.dbk:1440
2018 msgid "Packages using <command>autoconf</command>/<command>automake</command>"
2019 msgstr ""
2020
2021 #. type: Content of: <chapter><section><section><para>
2022 #: best-pkging-practices.dbk:1442
2023 msgid ""
2024 "Keeping <command>autoconf</command>'s <filename>config.sub</filename> and "
2025 "<filename>config.guess</filename> files up to date is critical for porters, "
2026 "especially on more volatile architectures.  Some very good packaging "
2027 "practices for any package using <command>autoconf</command> and/or "
2028 "<command>automake</command> have been synthesized in &file-bpp-autotools; "
2029 "from the <systemitem role=\"package\">autotools-dev</systemitem> package.  "
2030 "You're strongly encouraged to read this file and to follow the given "
2031 "recommendations."
2032 msgstr ""
2033
2034 #. type: Content of: <chapter><section><section><title>
2035 #: best-pkging-practices.dbk:1454
2036 msgid "Libraries"
2037 msgstr ""
2038
2039 #. type: Content of: <chapter><section><section><para>
2040 #: best-pkging-practices.dbk:1456
2041 msgid ""
2042 "Libraries are always difficult to package for various reasons.  The policy "
2043 "imposes many constraints to ease their maintenance and to make sure upgrades "
2044 "are as simple as possible when a new upstream version comes out.  Breakage "
2045 "in a library can result in dozens of dependent packages breaking."
2046 msgstr ""
2047
2048 #. type: Content of: <chapter><section><section><para>
2049 #: best-pkging-practices.dbk:1462
2050 msgid ""
2051 "Good practices for library packaging have been grouped in <ulink "
2052 "url=\"&url-libpkg-guide;\">the library packaging guide</ulink>."
2053 msgstr ""
2054
2055 #. type: Content of: <chapter><section><section><title>
2056 #: best-pkging-practices.dbk:1469
2057 msgid "Documentation"
2058 msgstr ""
2059
2060 #. type: Content of: <chapter><section><section><para>
2061 #: best-pkging-practices.dbk:1471
2062 msgid ""
2063 "Be sure to follow the <ulink url=\"&url-debian-policy;ch-docs.html\">Policy "
2064 "on documentation</ulink>."
2065 msgstr ""
2066
2067 #. type: Content of: <chapter><section><section><para>
2068 #: best-pkging-practices.dbk:1476
2069 msgid ""
2070 "If your package contains documentation built from XML or SGML, we recommend "
2071 "you not ship the XML or SGML source in the binary package(s).  If users want "
2072 "the source of the documentation, they should retrieve the source package."
2073 msgstr ""
2074
2075 #. type: Content of: <chapter><section><section><para>
2076 #: best-pkging-practices.dbk:1481
2077 msgid ""
2078 "Policy specifies that documentation should be shipped in HTML format.  We "
2079 "also recommend shipping documentation in PDF and plain text format if "
2080 "convenient and if output of reasonable quality is possible.  However, it is "
2081 "generally not appropriate to ship plain text versions of documentation whose "
2082 "source format is HTML."
2083 msgstr ""
2084
2085 #. type: Content of: <chapter><section><section><para>
2086 #: best-pkging-practices.dbk:1488
2087 msgid ""
2088 "Major shipped manuals should register themselves with <systemitem "
2089 "role=\"package\">doc-base</systemitem> on installation.  See the <systemitem "
2090 "role=\"package\">doc-base</systemitem> package documentation for more "
2091 "information."
2092 msgstr ""
2093
2094 #. type: Content of: <chapter><section><section><para>
2095 #: best-pkging-practices.dbk:1494
2096 msgid ""
2097 "Debian policy (section 12.1) directs that manual pages should accompany "
2098 "every program, utility, and function, and suggests them for other objects "
2099 "like configuration files. If the work you are packaging does not have such "
2100 "manual pages, consider writing them for inclusion in your package, and "
2101 "submitting them upstream."
2102 msgstr ""
2103
2104 #. type: Content of: <chapter><section><section><para>
2105 #: best-pkging-practices.dbk:1501
2106 msgid ""
2107 "The manpages do not need to be written directly in the troff format.  "
2108 "Popular source formats are Docbook, POD and reST, which can be converted "
2109 "using <command>xsltproc</command>, <command>pod2man</command> and "
2110 "<command>rst2man</command> respectively. To a lesser extent, the <command> "
2111 "help2man</command>program can also be used to write a stub."
2112 msgstr ""
2113
2114 #. type: Content of: <chapter><section><section><title>
2115 #: best-pkging-practices.dbk:1510
2116 msgid "Specific types of packages"
2117 msgstr ""
2118
2119 #. type: Content of: <chapter><section><section><para>
2120 #: best-pkging-practices.dbk:1512
2121 msgid ""
2122 "Several specific types of packages have special sub-policies and "
2123 "corresponding packaging rules and practices:"
2124 msgstr ""
2125
2126 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2127 #: best-pkging-practices.dbk:1518
2128 msgid ""
2129 "Perl related packages have a <ulink url=\"&url-perl-policy;\">Perl "
2130 "policy</ulink>, some examples of packages following that policy are "
2131 "<systemitem role=\"package\">libdbd-pg-perl</systemitem> (binary perl "
2132 "module) or <systemitem role=\"package\">libmldbm-perl</systemitem> (arch "
2133 "independent perl module)."
2134 msgstr ""
2135
2136 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2137 #: best-pkging-practices.dbk:1527
2138 msgid ""
2139 "Python related packages have their python policy; see &file-python-policy; "
2140 "in the <systemitem role=\"package\">python</systemitem> package."
2141 msgstr ""
2142
2143 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2144 #: best-pkging-practices.dbk:1534
2145 msgid ""
2146 "Emacs related packages have the <ulink url=\"&url-emacs-policy;\">emacs "
2147 "policy</ulink>."
2148 msgstr ""
2149
2150 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2151 #: best-pkging-practices.dbk:1541
2152 msgid ""
2153 "Java related packages have their <ulink url=\"&url-java-policy;\">java "
2154 "policy</ulink>."
2155 msgstr ""
2156
2157 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2158 #: best-pkging-practices.dbk:1548
2159 msgid ""
2160 "Ocaml related packages have their own policy, found in &file-ocaml-policy; "
2161 "from the <systemitem role=\"package\">ocaml</systemitem> package.  A good "
2162 "example is the <systemitem role=\"package\">camlzip</systemitem> source "
2163 "package."
2164 msgstr ""
2165
2166 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2167 #: best-pkging-practices.dbk:1556
2168 msgid ""
2169 "Packages providing XML or SGML DTDs should conform to the recommendations "
2170 "found in the <systemitem role=\"package\">sgml-base-doc</systemitem> "
2171 "package."
2172 msgstr ""
2173
2174 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2175 #: best-pkging-practices.dbk:1562
2176 msgid ""
2177 "Lisp packages should register themselves with <systemitem "
2178 "role=\"package\">common-lisp-controller</systemitem>, about which see "
2179 "&file-lisp-controller;."
2180 msgstr ""
2181
2182 #. type: Content of: <chapter><section><section><title>
2183 #: best-pkging-practices.dbk:1592
2184 msgid "Architecture-independent data"
2185 msgstr ""
2186
2187 #. type: Content of: <chapter><section><section><para>
2188 #: best-pkging-practices.dbk:1594
2189 msgid ""
2190 "It is not uncommon to have a large amount of architecture-independent data "
2191 "packaged with a program.  For example, audio files, a collection of icons, "
2192 "wallpaper patterns, or other graphic files.  If the size of this data is "
2193 "negligible compared to the size of the rest of the package, it's probably "
2194 "best to keep it all in a single package."
2195 msgstr ""
2196
2197 #. type: Content of: <chapter><section><section><para>
2198 #: best-pkging-practices.dbk:1601
2199 msgid ""
2200 "However, if the size of the data is considerable, consider splitting it out "
2201 "into a separate, architecture-independent package (_all.deb).  By doing "
2202 "this, you avoid needless duplication of the same data into eleven or more "
2203 ".debs, one per each architecture.  While this adds some extra overhead into "
2204 "the <filename>Packages</filename> files, it saves a lot of disk space on "
2205 "Debian mirrors.  Separating out architecture-independent data also reduces "
2206 "processing time of <command>lintian</command> (see <xref "
2207 "linkend=\"tools-lint\"/> ) when run over the entire Debian archive."
2208 msgstr ""
2209
2210 #. type: Content of: <chapter><section><section><title>
2211 #: best-pkging-practices.dbk:1613
2212 msgid "Needing a certain locale during build"
2213 msgstr ""
2214
2215 #. type: Content of: <chapter><section><section><para>
2216 #: best-pkging-practices.dbk:1615
2217 msgid ""
2218 "If you need a certain locale during build, you can create a temporary file "
2219 "via this trick:"
2220 msgstr ""
2221
2222 #. type: Content of: <chapter><section><section><para>
2223 #: best-pkging-practices.dbk:1619
2224 msgid ""
2225 "If you set <varname>LOCPATH</varname> to the equivalent of "
2226 "<filename>/usr/lib/locale</filename>, and <varname>LC_ALL</varname> to the "
2227 "name of the locale you generate, you should get what you want without being "
2228 "root.  Something like this:"
2229 msgstr ""
2230
2231 #. type: Content of: <chapter><section><section><screen>
2232 #: best-pkging-practices.dbk:1624
2233 #, no-wrap
2234 msgid ""
2235 "LOCALE_PATH=debian/tmpdir/usr/lib/locale\n"
2236 "LOCALE_NAME=en_IN\n"
2237 "LOCALE_CHARSET=UTF-8\n"
2238 "\n"
2239 "mkdir -p $LOCALE_PATH\n"
2240 "localedef -i $LOCALE_NAME.$LOCALE_CHARSET -f $LOCALE_CHARSET "
2241 "$LOCALE_PATH/$LOCALE_NAME.$LOCALE_CHARSET\n"
2242 "\n"
2243 "# Using the locale\n"
2244 "LOCPATH=$LOCALE_PATH LC_ALL=$LOCALE_NAME.$LOCALE_CHARSET date\n"
2245 msgstr ""
2246
2247 #. type: Content of: <chapter><section><section><title>
2248 #: best-pkging-practices.dbk:1637
2249 msgid "Make transition packages deborphan compliant"
2250 msgstr ""
2251
2252 #. type: Content of: <chapter><section><section><para>
2253 #: best-pkging-practices.dbk:1639
2254 msgid ""
2255 "Deborphan is a program for helping users to detect which packages can safely "
2256 "be removed from the system, i.e.  the ones that have no packages depending "
2257 "on them.  The default operation is to search only within the libs and "
2258 "oldlibs sections, to hunt down unused libraries.  But when passed the right "
2259 "argument, it tries to catch other useless packages."
2260 msgstr ""
2261
2262 #. type: Content of: <chapter><section><section><para>
2263 #: best-pkging-practices.dbk:1646
2264 msgid ""
2265 "For example, with <literal>--guess-dummy</literal>, "
2266 "<command>deborphan</command> tries to search all transitional packages which "
2267 "were needed for upgrade but which can now safely be removed.  For that, it "
2268 "looks for the string dummy or transitional in their short description."
2269 msgstr ""
2270
2271 #. type: Content of: <chapter><section><section><para>
2272 #: best-pkging-practices.dbk:1653
2273 msgid ""
2274 "So, when you are creating such a package, please make sure to add this text "
2275 "to your short description.  If you are looking for examples, just run: "
2276 "<command>apt-cache search .|grep dummy</command> or <command>apt-cache "
2277 "search .|grep transitional</command>."
2278 msgstr ""
2279
2280 #. type: Content of: <chapter><section><section><title>
2281 #: best-pkging-practices.dbk:1661
2282 msgid "Best practices for <filename>orig.tar.gz</filename> files"
2283 msgstr ""
2284
2285 #. type: Content of: <chapter><section><section><para>
2286 #: best-pkging-practices.dbk:1663
2287 msgid ""
2288 "There are two kinds of original source tarballs: Pristine source and "
2289 "repackaged upstream source."
2290 msgstr ""
2291
2292 #. type: Content of: <chapter><section><section><section><title>
2293 #: best-pkging-practices.dbk:1667
2294 msgid "Pristine source"
2295 msgstr ""
2296
2297 #. type: Content of: <chapter><section><section><section><para><footnote><para>
2298 #: best-pkging-practices.dbk:1671
2299 msgid ""
2300 "We cannot prevent upstream authors from changing the tarball they distribute "
2301 "without also incrementing the version number, so there can be no guarantee "
2302 "that a pristine tarball is identical to what upstream "
2303 "<emphasis>currently</emphasis> distributing at any point in time.  All that "
2304 "can be expected is that it is identical to something that upstream once "
2305 "<emphasis>did</emphasis> distribute.  If a difference arises later (say, if "
2306 "upstream notices that he wasn't using maximal compression in his original "
2307 "distribution and then re-<command>gzip</command>s it), that's just too bad.  "
2308 "Since there is no good way to upload a new "
2309 "<literal>.orig.tar.{gz,bz2}</literal> for the same version, there is not "
2310 "even any point in treating this situation as a bug."
2311 msgstr ""
2312
2313 #. type: Content of: <chapter><section><section><section><para>
2314 #: best-pkging-practices.dbk:1669
2315 msgid ""
2316 "The defining characteristic of a pristine source tarball is that the "
2317 "<literal>.orig.tar.{gz,bz2}</literal> file is byte-for-byte identical to a "
2318 "tarball officially distributed by the upstream author.  <placeholder "
2319 "type=\"footnote\" id=\"0\"/> This makes it possible to use checksums to "
2320 "easily verify that all changes between Debian's version and upstream's are "
2321 "contained in the Debian diff.  Also, if the original source is huge, "
2322 "upstream authors and others who already have the upstream tarball can save "
2323 "download time if they want to inspect your packaging in detail."
2324 msgstr ""
2325
2326 #. type: Content of: <chapter><section><section><section><para>
2327 #: best-pkging-practices.dbk:1689
2328 msgid ""
2329 "There is no universally accepted guidelines that upstream authors follow "
2330 "regarding to the directory structure inside their tarball, but "
2331 "<command>dpkg-source</command> is nevertheless able to deal with most "
2332 "upstream tarballs as pristine source.  Its strategy is equivalent to the "
2333 "following:"
2334 msgstr ""
2335
2336 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2337 #: best-pkging-practices.dbk:1697
2338 msgid "It unpacks the tarball in an empty temporary directory by doing"
2339 msgstr ""
2340
2341 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><screen>
2342 #: best-pkging-practices.dbk:1700
2343 #, no-wrap
2344 msgid ""
2345 "zcat path/to/&lt;packagename&gt;_&lt;upstream-version&gt;.orig.tar.gz | tar "
2346 "xf -\n"
2347 msgstr ""
2348
2349 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2350 #: best-pkging-practices.dbk:1705
2351 msgid ""
2352 "If, after this, the temporary directory contains nothing but one directory "
2353 "and no other files, <command>dpkg-source</command> renames that directory to "
2354 "<literal>&lt;packagename&gt;-&lt;upstream-version&gt;(.orig)</literal>.  The "
2355 "name of the top-level directory in the tarball does not matter, and is "
2356 "forgotten."
2357 msgstr ""
2358
2359 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2360 #: best-pkging-practices.dbk:1714
2361 msgid ""
2362 "Otherwise, the upstream tarball must have been packaged without a common "
2363 "top-level directory (shame on the upstream author!).  In this case, "
2364 "<command>dpkg-source</command> renames the temporary directory "
2365 "<emphasis>itself</emphasis> to "
2366 "<literal>&lt;packagename&gt;-&lt;upstream-version&gt;(.orig)</literal>."
2367 msgstr ""
2368
2369 #. type: Content of: <chapter><section><section><section><title>
2370 #: best-pkging-practices.dbk:1725
2371 msgid "Repackaged upstream source"
2372 msgstr ""
2373
2374 #. type: Content of: <chapter><section><section><section><para>
2375 #: best-pkging-practices.dbk:1727
2376 msgid ""
2377 "You <emphasis role=\"strong\">should</emphasis> upload packages with a "
2378 "pristine source tarball if possible, but there are various reasons why it "
2379 "might not be possible.  This is the case if upstream does not distribute the "
2380 "source as gzipped tar at all, or if upstream's tarball contains "
2381 "non-DFSG-free material that you must remove before uploading."
2382 msgstr ""
2383
2384 #. type: Content of: <chapter><section><section><section><para>
2385 #: best-pkging-practices.dbk:1734
2386 msgid ""
2387 "In these cases the developer must construct a suitable "
2388 "<literal>.orig.tar.{gz,bz2} </literal> file himself.  We refer to such a "
2389 "tarball as a repackaged upstream source.  Note that a repackaged upstream "
2390 "source is different from a Debian-native package.  A repackaged source still "
2391 "comes with Debian-specific changes in a separate <literal>.diff.gz</literal> "
2392 "or <literal>.debian.tar.{gz,bz2}</literal> and still has a version number "
2393 "composed of <literal>&lt;upstream-version&gt;</literal> and "
2394 "<literal>&lt;debian-revision&gt;</literal>."
2395 msgstr ""
2396
2397 #. type: Content of: <chapter><section><section><section><para>
2398 #: best-pkging-practices.dbk:1743
2399 msgid ""
2400 "There may be cases where it is desirable to repackage the source even though "
2401 "upstream distributes a <literal>.tar.gz</literal> that could in principle be "
2402 "used in its pristine form.  The most obvious is if "
2403 "<emphasis>significant</emphasis> space savings can be achieved by "
2404 "recompressing the tar archive or by removing genuinely useless cruft from "
2405 "the upstream archive.  Use your own discretion here, but be prepared to "
2406 "defend your decision if you repackage source that could have been pristine."
2407 msgstr ""
2408
2409 #. type: Content of: <chapter><section><section><section><para>
2410 #: best-pkging-practices.dbk:1752
2411 msgid "A repackaged <literal>.orig.tar.{gz,bz2}</literal>"
2412 msgstr ""
2413
2414 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2415 #: best-pkging-practices.dbk:1757
2416 msgid ""
2417 "should be documented in the resulting source package.  Detailed information "
2418 "on how the repackaged source was obtained, and on how this can be reproduced "
2419 "should be provided in <filename>debian/copyright</filename>.  It is also a "
2420 "good idea to provide a <literal>get-orig-source</literal> target in your "
2421 "<filename>debian/rules</filename> file that repeats the process, as "
2422 "described in the Policy Manual, <ulink "
2423 "url=\"&url-debian-policy;ch-source.html#s-debianrules\">Main building "
2424 "script: debian/rules</ulink>."
2425 msgstr ""
2426
2427 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para><footnote><para>
2428 #: best-pkging-practices.dbk:1772
2429 msgid ""
2430 "As a special exception, if the omission of non-free files would lead to the "
2431 "source failing to build without assistance from the Debian diff, it might be "
2432 "appropriate to instead edit the files, omitting only the non-free parts of "
2433 "them, and/or explain the situation in a README.source file in the root of "
2434 "the source tree.  But in that case please also urge the upstream author to "
2435 "make the non-free components easier seperable from the rest of the source."
2436 msgstr ""
2437
2438 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2439 #: best-pkging-practices.dbk:1770
2440 msgid ""
2441 "<emphasis role=\"strong\">should not</emphasis> contain any file that does "
2442 "not come from the upstream author(s), or whose contents has been changed by "
2443 "you.  <placeholder type=\"footnote\" id=\"0\"/>"
2444 msgstr ""
2445
2446 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2447 #: best-pkging-practices.dbk:1783
2448 msgid ""
2449 "<emphasis role=\"strong\">should</emphasis>, except where impossible for "
2450 "legal reasons, preserve the entire building and portablility infrastructure "
2451 "provided by the upstream author.  For example, it is not a sufficient reason "
2452 "for omitting a file that it is used only when building on MS-DOS.  "
2453 "Similarly, a Makefile provided by upstream should not be omitted even if the "
2454 "first thing your <filename>debian/rules</filename> does is to overwrite it "
2455 "by running a configure script."
2456 msgstr ""
2457
2458 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2459 #: best-pkging-practices.dbk:1792
2460 msgid ""
2461 "(<emphasis>Rationale:</emphasis> It is common for Debian users who need to "
2462 "build software for non-Debian platforms to fetch the source from a Debian "
2463 "mirror rather than trying to locate a canonical upstream distribution "
2464 "point)."
2465 msgstr ""
2466
2467 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2468 #: best-pkging-practices.dbk:1799
2469 msgid ""
2470 "<emphasis role=\"strong\">should</emphasis> use "
2471 "<literal>&lt;packagename&gt;-&lt;upstream-version&gt;.orig</literal> as the "
2472 "name of the top-level directory in its tarball.  This makes it possible to "
2473 "distinguish pristine tarballs from repackaged ones."
2474 msgstr ""
2475
2476 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2477 #: best-pkging-practices.dbk:1807
2478 msgid ""
2479 "<emphasis role=\"strong\">should</emphasis> be gzipped or bzipped with "
2480 "maximal compression."
2481 msgstr ""
2482
2483 #. type: Content of: <chapter><section><section><section><title>
2484 #: best-pkging-practices.dbk:1814
2485 msgid "Changing binary files"
2486 msgstr ""
2487
2488 #. type: Content of: <chapter><section><section><section><para>
2489 #: best-pkging-practices.dbk:1816
2490 msgid ""
2491 "Sometimes it is necessary to change binary files contained in the original "
2492 "tarball, or to add binary files that are not in it. This is fully supported "
2493 "when using source packages in “3.0 (quilt)” format, see the "
2494 "<citerefentry><refentrytitle>dpkg-source</refentrytitle><manvolnum>1</manvolnum></citerefentry> "
2495 "manual page for details. When using the older format “1.0”, binary files "
2496 "can't be stored in the <filename>.diff.gz</filename> so you must store an "
2497 "<command>uuencode</command>d (or similar) version of the file(s)  and decode "
2498 "it at build time in <filename>debian/rules</filename> (and move it in its "
2499 "official location)."
2500 msgstr ""
2501
2502 #. type: Content of: <chapter><section><section><title>
2503 #: best-pkging-practices.dbk:1831
2504 msgid "Best practices for debug packages"
2505 msgstr ""
2506
2507 #. type: Content of: <chapter><section><section><para>
2508 #: best-pkging-practices.dbk:1833
2509 msgid ""
2510 "A debug package is a package with a name ending in -dbg, that contains "
2511 "additional information that gdb can use.  Since Debian binaries are stripped "
2512 "by default, debugging information, including function names and line "
2513 "numbers, is otherwise not available when running gdb on Debian binaries.  "
2514 "Debug packages allow users who need this additional debugging information to "
2515 "install it, without bloating a regular system with the information."
2516 msgstr ""
2517
2518 #. type: Content of: <chapter><section><section><para>
2519 #: best-pkging-practices.dbk:1841
2520 msgid ""
2521 "It is up to a package's maintainer whether to create a debug package or "
2522 "not.  Maintainers are encouraged to create debug packages for library "
2523 "packages, since this can aid in debugging many programs linked to a "
2524 "library.  In general, debug packages do not need to be added for all "
2525 "programs; doing so would bloat the archive.  But if a maintainer finds that "
2526 "users often need a debugging version of a program, it can be worthwhile to "
2527 "make a debug package for it.  Programs that are core infrastructure, such as "
2528 "apache and the X server are also good candidates for debug packages."
2529 msgstr ""
2530
2531 #. type: Content of: <chapter><section><section><para>
2532 #: best-pkging-practices.dbk:1851
2533 msgid ""
2534 "Some debug packages may contain an entire special debugging build of a "
2535 "library or other binary, but most of them can save space and build time by "
2536 "instead containing separated debugging symbols that gdb can find and load on "
2537 "the fly when debugging a program or library.  The convention in Debian is to "
2538 "keep these symbols in "
2539 "<filename>/usr/lib/debug/<replaceable>path</replaceable></filename>, where "
2540 "<replaceable>path</replaceable> is the path to the executable or library.  "
2541 "For example, debugging symbols for <filename>/usr/bin/foo</filename> go in "
2542 "<filename>/usr/lib/debug/usr/bin/foo</filename>, and debugging symbols for "
2543 "<filename>/usr/lib/libfoo.so.1</filename> go in "
2544 "<filename>/usr/lib/debug/usr/lib/libfoo.so.1</filename>."
2545 msgstr ""
2546
2547 #. type: Content of: <chapter><section><section><para>
2548 #: best-pkging-practices.dbk:1863
2549 msgid ""
2550 "The debugging symbols can be extracted from an object file using <command> "
2551 "objcopy --only-keep-debug</command>.  Then the object file can be stripped, "
2552 "and <command>objcopy --add-gnu-debuglink</command> used to specify the path "
2553 "to the debugging symbol file.  <citerefentry> "
2554 "<refentrytitle>objcopy</refentrytitle> <manvolnum>1</manvolnum> "
2555 "</citerefentry> explains in detail how this works."
2556 msgstr ""
2557
2558 #. type: Content of: <chapter><section><section><para>
2559 #: best-pkging-practices.dbk:1871
2560 msgid ""
2561 "The <command>dh_strip</command> command in debhelper supports creating debug "
2562 "packages, and can take care of using <command>objcopy</command> to separate "
2563 "out the debugging symbols for you.  If your package uses debhelper, all you "
2564 "need to do is call <command>dh_strip --dbg-package=libfoo-dbg</command>, and "
2565 "add an entry to <filename>debian/control</filename> for the debug package."
2566 msgstr ""
2567
2568 #. type: Content of: <chapter><section><section><para>
2569 #: best-pkging-practices.dbk:1878
2570 msgid ""
2571 "Note that the debug package should depend on the package that it provides "
2572 "debugging symbols for, and this dependency should be versioned.  For "
2573 "example:"
2574 msgstr ""
2575
2576 #. type: Content of: <chapter><section><section><screen>
2577 #: best-pkging-practices.dbk:1882
2578 #, no-wrap
2579 msgid "Depends: libfoo (= ${binary:Version})\n"
2580 msgstr ""