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