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