chiark / gitweb /
POT updated in order to fit with last changes
[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-05-31 19:21-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 apt-listchanges, before all the rest of the changelogs.  This is the "
839 "preferred means to let the user know about significant changes in a "
840 "package.  It is better than using debconf notes since it is less annoying "
841 "and the user can go back and refer to the <filename>NEWS.Debian</filename> "
842 "file after the install.  And it's better than listing major changes in "
843 "<filename>README.Debian</filename>, since the user can easily miss such "
844 "notes."
845 msgstr ""
846
847 #. type: Content of: <chapter><section><section><para>
848 #: best-pkging-practices.dbk:579
849 msgid ""
850 "The file format is the same as a debian changelog file, but leave off the "
851 "asterisks and describe each news item with a full paragraph when necessary "
852 "rather than the more concise summaries that would go in a changelog.  It's a "
853 "good idea to run your file through <literal>dpkg-parsechangelog</literal> to "
854 "check its formatting as it will not be automatically checked during build as "
855 "the changelog is.  Here is an example of a real "
856 "<filename>NEWS.Debian</filename> file:"
857 msgstr ""
858
859 #. type: Content of: <chapter><section><section><screen>
860 #: best-pkging-practices.dbk:588
861 #, no-wrap
862 msgid ""
863 "cron (3.0pl1-74) unstable; urgency=low\n"
864 "\n"
865 "    The checksecurity script is no longer included with the cron package:\n"
866 "    it now has its own package, checksecurity. If you liked the\n"
867 "    functionality provided with that script, please install the new\n"
868 "    package.\n"
869 "\n"
870 " -- Steve Greenland &lt;stevegr@debian.org&gt;  Sat,  6 Sep 2003 17:15:03 "
871 "-0500\n"
872 msgstr ""
873
874 #. type: Content of: <chapter><section><section><para>
875 #: best-pkging-practices.dbk:598
876 msgid ""
877 "The <filename>NEWS.Debian</filename> file is installed as "
878 "<filename>/usr/share/doc/<replaceable>package</replaceable>/NEWS.Debian.gz</filename>.  "
879 "It is compressed, and always has that name even in Debian native packages.  "
880 "If you use <literal>debhelper</literal>, "
881 "<literal>dh_installchangelogs</literal> will install "
882 "<filename>debian/NEWS</filename> files for you."
883 msgstr ""
884
885 #. type: Content of: <chapter><section><section><para>
886 #: best-pkging-practices.dbk:605
887 msgid ""
888 "Unlike changelog files, you need not update <filename>NEWS.Debian</filename> "
889 "files with every release.  Only update them if you have something "
890 "particularly newsworthy that user should know about.  If you have no news at "
891 "all, there's no need to ship a <filename>NEWS.Debian</filename> file in your "
892 "package.  No news is good news!"
893 msgstr ""
894
895 #. type: Content of: <chapter><section><title>
896 #: best-pkging-practices.dbk:627
897 msgid "Best practices for maintainer scripts"
898 msgstr ""
899
900 #. type: Content of: <chapter><section><para>
901 #: best-pkging-practices.dbk:629
902 msgid ""
903 "Maintainer scripts include the files <filename>debian/postinst</filename>, "
904 "<filename>debian/preinst</filename>, <filename>debian/prerm</filename> and "
905 "<filename>debian/postrm</filename>.  These scripts take care of any package "
906 "installation or deinstallation setup which isn't handled merely by the "
907 "creation or removal of files and directories.  The following instructions "
908 "supplement the <ulink url=\"&url-debian-policy;\">Debian Policy</ulink>."
909 msgstr ""
910
911 #. type: Content of: <chapter><section><para>
912 #: best-pkging-practices.dbk:637
913 msgid ""
914 "Maintainer scripts must be idempotent.  That means that you need to make "
915 "sure nothing bad will happen if the script is called twice where it would "
916 "usually be called once."
917 msgstr ""
918
919 #. type: Content of: <chapter><section><para>
920 #: best-pkging-practices.dbk:642
921 msgid ""
922 "Standard input and output may be redirected (e.g.  into pipes) for logging "
923 "purposes, so don't rely on them being a tty."
924 msgstr ""
925
926 #. type: Content of: <chapter><section><para>
927 #: best-pkging-practices.dbk:646
928 msgid ""
929 "All prompting or interactive configuration should be kept to a minimum.  "
930 "When it is necessary, you should use the <systemitem "
931 "role=\"package\">debconf</systemitem> package for the interface.  Remember "
932 "that prompting in any case can only be in the <literal>configure</literal> "
933 "stage of the <filename>postinst</filename> script."
934 msgstr ""
935
936 #. type: Content of: <chapter><section><para>
937 #: best-pkging-practices.dbk:653
938 msgid ""
939 "Keep the maintainer scripts as simple as possible.  We suggest you use pure "
940 "POSIX shell scripts.  Remember, if you do need any bash features, the "
941 "maintainer script must have a bash shebang line.  POSIX shell or Bash are "
942 "preferred to Perl, since they enable <systemitem "
943 "role=\"package\">debhelper</systemitem> to easily add bits to the scripts."
944 msgstr ""
945
946 #. type: Content of: <chapter><section><para>
947 #: best-pkging-practices.dbk:660
948 msgid ""
949 "If you change your maintainer scripts, be sure to test package removal, "
950 "double installation, and purging.  Be sure that a purged package is "
951 "completely gone, that is, it must remove any files created, directly or "
952 "indirectly, in any maintainer script."
953 msgstr ""
954
955 #. type: Content of: <chapter><section><para>
956 #: best-pkging-practices.dbk:666
957 msgid ""
958 "If you need to check for the existence of a command, you should use "
959 "something like"
960 msgstr ""
961
962 #. type: Content of: <chapter><section><programlisting>
963 #: best-pkging-practices.dbk:669
964 #, no-wrap
965 msgid "if [ -x /usr/sbin/install-docs ]; then ..."
966 msgstr ""
967
968 #. type: Content of: <chapter><section><para>
969 #: best-pkging-practices.dbk:671
970 msgid ""
971 "If you don't wish to hard-code the path of a command in your maintainer "
972 "script, the following POSIX-compliant shell function may help:"
973 msgstr ""
974
975 #. type: Content of: <chapter><section><para>
976 #: best-pkging-practices.dbk:676
977 msgid ""
978 "You can use this function to search <varname>$PATH</varname> for a command "
979 "name, passed as an argument.  It returns true (zero) if the command was "
980 "found, and false if not.  This is really the most portable way, since "
981 "<literal>command -v</literal>, <command>type</command>, and "
982 "<command>which</command> are not POSIX."
983 msgstr ""
984
985 #. type: Content of: <chapter><section><para>
986 #: best-pkging-practices.dbk:683
987 msgid ""
988 "While <command>which</command> is an acceptable alternative, since it is "
989 "from the required <systemitem role=\"package\">debianutils</systemitem> "
990 "package, it's not on the root partition.  That is, it's in "
991 "<filename>/usr/bin</filename> rather than <filename>/bin</filename>, so one "
992 "can't use it in scripts which are run before the <filename>/usr</filename> "
993 "partition is mounted.  Most scripts won't have this problem, though."
994 msgstr ""
995
996 #. type: Content of: <chapter><section><title>
997 #: best-pkging-practices.dbk:693
998 msgid ""
999 "Configuration management with <systemitem "
1000 "role=\"package\">debconf</systemitem>"
1001 msgstr ""
1002
1003 #. type: Content of: <chapter><section><para>
1004 #: best-pkging-practices.dbk:695
1005 msgid ""
1006 "<systemitem role=\"package\">Debconf</systemitem> is a configuration "
1007 "management system which can be used by all the various packaging scripts "
1008 "(<filename>postinst</filename> mainly) to request feedback from the user "
1009 "concerning how to configure the package.  Direct user interactions must now "
1010 "be avoided in favor of <systemitem role=\"package\">debconf</systemitem> "
1011 "interaction.  This will enable non-interactive installations in the future."
1012 msgstr ""
1013
1014 #. type: Content of: <chapter><section><para>
1015 #: best-pkging-practices.dbk:703
1016 msgid ""
1017 "Debconf is a great tool but it is often poorly used.  Many common mistakes "
1018 "are listed in the <citerefentry> "
1019 "<refentrytitle>debconf-devel</refentrytitle> <manvolnum>7</manvolnum> "
1020 "</citerefentry> man page.  It is something that you must read if you decide "
1021 "to use debconf.  Also, we document some best practices here."
1022 msgstr ""
1023
1024 #. type: Content of: <chapter><section><para>
1025 #: best-pkging-practices.dbk:710
1026 msgid ""
1027 "These guidelines include some writing style and typography recommendations, "
1028 "general considerations about debconf usage as well as more specific "
1029 "recommendations for some parts of the distribution (the installation system "
1030 "for instance)."
1031 msgstr ""
1032
1033 #. type: Content of: <chapter><section><section><title>
1034 #: best-pkging-practices.dbk:716
1035 msgid "Do not abuse debconf"
1036 msgstr ""
1037
1038 #. type: Content of: <chapter><section><section><para>
1039 #: best-pkging-practices.dbk:718
1040 msgid ""
1041 "Since debconf appeared in Debian, it has been widely abused and several "
1042 "criticisms received by the Debian distribution come from debconf abuse with "
1043 "the need of answering a wide bunch of questions before getting any little "
1044 "thing installed."
1045 msgstr ""
1046
1047 #. type: Content of: <chapter><section><section><para>
1048 #: best-pkging-practices.dbk:724
1049 msgid ""
1050 "Keep usage notes to what they belong: the <filename>NEWS.Debian</filename>, "
1051 "or <filename>README.Debian</filename> file.  Only use notes for important "
1052 "notes which may directly affect the package usability.  Remember that notes "
1053 "will always block the install until confirmed or bother the user by email."
1054 msgstr ""
1055
1056 #. type: Content of: <chapter><section><section><para>
1057 #: best-pkging-practices.dbk:730
1058 msgid ""
1059 "Carefully choose the questions priorities in maintainer scripts.  See "
1060 "<citerefentry> <refentrytitle>debconf-devel</refentrytitle> "
1061 "<manvolnum>7</manvolnum> </citerefentry> for details about priorities.  Most "
1062 "questions should use medium and low priorities."
1063 msgstr ""
1064
1065 #. type: Content of: <chapter><section><section><title>
1066 #: best-pkging-practices.dbk:738
1067 msgid "General recommendations for authors and translators"
1068 msgstr ""
1069
1070 #. type: Content of: <chapter><section><section><section><title>
1071 #: best-pkging-practices.dbk:740
1072 msgid "Write correct English"
1073 msgstr ""
1074
1075 #. type: Content of: <chapter><section><section><section><para>
1076 #: best-pkging-practices.dbk:742
1077 msgid ""
1078 "Most Debian package maintainers are not native English speakers.  So, "
1079 "writing properly phrased templates may not be easy for them."
1080 msgstr ""
1081
1082 #. type: Content of: <chapter><section><section><section><para>
1083 #: best-pkging-practices.dbk:746
1084 msgid ""
1085 "Please use (and abuse) &email-debian-l10n-english; mailing list.  Have your "
1086 "templates proofread."
1087 msgstr ""
1088
1089 #. type: Content of: <chapter><section><section><section><para>
1090 #: best-pkging-practices.dbk:750
1091 msgid ""
1092 "Badly written templates give a poor image of your package, of your "
1093 "work... or even of Debian itself."
1094 msgstr ""
1095
1096 #. type: Content of: <chapter><section><section><section><para>
1097 #: best-pkging-practices.dbk:754
1098 msgid ""
1099 "Avoid technical jargon as much as possible.  If some terms sound common to "
1100 "you, they may be impossible to understand for others.  If you cannot avoid "
1101 "them, try to explain them (use the extended description).  When doing so, "
1102 "try to balance between verbosity and simplicity."
1103 msgstr ""
1104
1105 #. type: Content of: <chapter><section><section><section><title>
1106 #: best-pkging-practices.dbk:762
1107 msgid "Be kind to translators"
1108 msgstr ""
1109
1110 #. type: Content of: <chapter><section><section><section><para>
1111 #: best-pkging-practices.dbk:764
1112 msgid ""
1113 "Debconf templates may be translated.  Debconf, along with its sister package "
1114 "<command>po-debconf</command> offers a simple framework for getting "
1115 "templates translated by translation teams or even individuals."
1116 msgstr ""
1117
1118 #. type: Content of: <chapter><section><section><section><para>
1119 #: best-pkging-practices.dbk:769
1120 msgid ""
1121 "Please use gettext-based templates.  Install <systemitem "
1122 "role=\"package\">po-debconf</systemitem> on your development system and read "
1123 "its documentation (<command>man po-debconf</command> is a good start)."
1124 msgstr ""
1125
1126 #. type: Content of: <chapter><section><section><section><para>
1127 #: best-pkging-practices.dbk:774
1128 msgid ""
1129 "Avoid changing templates too often.  Changing templates text induces more "
1130 "work to translators which will get their translation fuzzied.  A fuzzy "
1131 "translation is a string for which the original changed since it was "
1132 "translated, therefore requiring some update by a translator to be usable.  "
1133 "When changes are small enough, the original translation is kept in PO files "
1134 "but marked as <literal>fuzzy</literal>."
1135 msgstr ""
1136
1137 #. type: Content of: <chapter><section><section><section><para>
1138 #: best-pkging-practices.dbk:782
1139 msgid ""
1140 "If you plan to do changes to your original templates, please use the "
1141 "notification system provided with the <systemitem "
1142 "role=\"package\">po-debconf</systemitem> package, namely the "
1143 "<command>podebconf-report-po</command>, to contact translators.  Most active "
1144 "translators are very responsive and getting their work included along with "
1145 "your modified templates will save you additional uploads.  If you use "
1146 "gettext-based templates, the translator's name and e-mail addresses are "
1147 "mentioned in the PO files headers and will be used by "
1148 "<command>podebconf-report-po</command>."
1149 msgstr ""
1150
1151 #. type: Content of: <chapter><section><section><section><para>
1152 #: best-pkging-practices.dbk:794
1153 msgid "A recommended use of that utility is:"
1154 msgstr ""
1155
1156 #. type: Content of: <chapter><section><section><section><programlisting>
1157 #: best-pkging-practices.dbk:796
1158 #, no-wrap
1159 msgid ""
1160 "cd debian/po &amp;&amp; podebconf-report-po --call --languageteam "
1161 "--withtranslators --deadline=\"+10 days\""
1162 msgstr ""
1163
1164 #. type: Content of: <chapter><section><section><section><para>
1165 #: best-pkging-practices.dbk:798
1166 msgid ""
1167 "This command will first synchronize the PO and POT files in "
1168 "<filename>debian/po</filename> with the templates files listed in "
1169 "<filename>debian/po/POTFILES.in</filename>.  Then, it will send a call for "
1170 "new translations, in the &email-debian-i18n; mailing list. Finally, it will "
1171 "also send a call for translation updates to the language team (mentioned in "
1172 "the <literal>Language-Team</literal> field of each PO file)  as well as the "
1173 "last translator (mentioned in <literal>Last-translator</literal>)."
1174 msgstr ""
1175
1176 #. type: Content of: <chapter><section><section><section><para>
1177 #: best-pkging-practices.dbk:807
1178 msgid ""
1179 "Giving a deadline to translators is always appreciated, so that they can "
1180 "organize their work. Please remember that some translation teams have a "
1181 "formalized translate/review process and a delay lower than 10 days is "
1182 "considered as unreasonable. A shorter delay puts too much pressure on "
1183 "translation teams and should be kept for very minor changes."
1184 msgstr ""
1185
1186 #. type: Content of: <chapter><section><section><section><para>
1187 #: best-pkging-practices.dbk:814
1188 msgid ""
1189 "If in doubt, you may also contact the translation team for a given language "
1190 "(debian-l10n-xxxxx@&lists-host;), or the &email-debian-i18n; mailing list."
1191 msgstr ""
1192
1193 #. type: Content of: <chapter><section><section><section><title>
1194 #: best-pkging-practices.dbk:821
1195 msgid "Unfuzzy complete translations when correcting typos and spelling"
1196 msgstr ""
1197
1198 #. type: Content of: <chapter><section><section><section><para>
1199 #: best-pkging-practices.dbk:823
1200 msgid ""
1201 "When the text of a debconf template is corrected and you are <emphasis "
1202 "role=\"strong\">sure</emphasis> that the change does <emphasis "
1203 "role=\"strong\">not</emphasis> affect translations, please be kind to "
1204 "translators and <emphasis>unfuzzy</emphasis> their translations."
1205 msgstr ""
1206
1207 #. type: Content of: <chapter><section><section><section><para>
1208 #: best-pkging-practices.dbk:829
1209 msgid ""
1210 "If you don't do so, the whole template will not be translated as long as a "
1211 "translator will send you an update."
1212 msgstr ""
1213
1214 #. type: Content of: <chapter><section><section><section><para>
1215 #: best-pkging-practices.dbk:833
1216 msgid ""
1217 "To <emphasis>unfuzzy</emphasis> translations, you can use two methods. The "
1218 "first method does <emphasis>preventive</emphasis> search and replace actions "
1219 "in the PO files. The latter uses <command>gettext</command> utilities to "
1220 "<emphasis>unfuzzy</emphasis> strings."
1221 msgstr ""
1222
1223 #. type: Content of: <chapter><section><section><section><para>
1224 #: best-pkging-practices.dbk:839
1225 msgid "<emphasis>Preventive unfuzzy</emphasis> method:"
1226 msgstr ""
1227
1228 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1229 #: best-pkging-practices.dbk:844
1230 msgid ""
1231 "Try finding a complete translation file <emphasis "
1232 "role=\"strong\">before</emphasis> the change:"
1233 msgstr ""
1234
1235 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1236 #: best-pkging-practices.dbk:847 best-pkging-practices.dbk:918
1237 #, no-wrap
1238 msgid ""
1239 "for i in debian/po/*po; do echo -n $i: ; msgfmt -o /dev/null --statistics "
1240 "$i; done"
1241 msgstr ""
1242
1243 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1244 #: best-pkging-practices.dbk:849
1245 msgid ""
1246 "The file only showing <emphasis>translated</emphasis> items will be used as "
1247 "the reference file. If there is none (which should not happen if you take "
1248 "care to properly interact with translators), you should use the file with "
1249 "the most translated strings."
1250 msgstr ""
1251
1252 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1253 #: best-pkging-practices.dbk:857
1254 msgid ""
1255 "Identify the needed change. In this example, let's assume the change is "
1256 "about fixing a typo in the word <literal>typo</literal> which was "
1257 "inadvertently written as <literal>tpyo</literal>. Therefore, the change is "
1258 "<command>s/tpyo/typo</command>."
1259 msgstr ""
1260
1261 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1262 #: best-pkging-practices.dbk:865
1263 msgid ""
1264 "Check that this change is only applied to the place where you really intend "
1265 "to make it and <emphasis role=\"strong\">not</emphasis> in any other place "
1266 "where the original string is appropriate. This specifically applies to "
1267 "change in punctuation, for instance."
1268 msgstr ""
1269
1270 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1271 #: best-pkging-practices.dbk:873
1272 msgid ""
1273 "Modify all PO files by using <command>sed</command>. The use of that command "
1274 "is recommended over any text editor to guarantee that the files encoding "
1275 "will not be broken by the edit action:"
1276 msgstr ""
1277
1278 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1279 #: best-pkging-practices.dbk:878
1280 #, no-wrap
1281 msgid ""
1282 "cd debian/po\n"
1283 "for i in *.po; do sed -i 's/tpyo/typo/g' $i; done\n"
1284 msgstr ""
1285
1286 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1287 #: best-pkging-practices.dbk:884
1288 msgid "Change the debconf template file to fix the typo."
1289 msgstr ""
1290
1291 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1292 #: best-pkging-practices.dbk:889
1293 msgid "Run <command>debconf-updatepo</command>."
1294 msgstr ""
1295
1296 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1297 #: best-pkging-practices.dbk:894
1298 msgid ""
1299 "Check the <filename>foo.po</filename> reference file. Its statistics should "
1300 "not be changed:"
1301 msgstr ""
1302
1303 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1304 #: best-pkging-practices.dbk:898
1305 #, no-wrap
1306 msgid "msgfmt -o /dev/null --statistics debian/po/foo.po\n"
1307 msgstr ""
1308
1309 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1310 #: best-pkging-practices.dbk:903
1311 msgid ""
1312 "If the file's statistics changed, you did something wrong. Try again or ask "
1313 "for help on the &email-debian-i18n; mailing list."
1314 msgstr ""
1315
1316 #. type: Content of: <chapter><section><section><section><para>
1317 #: best-pkging-practices.dbk:909
1318 msgid "Gettext utilities method:"
1319 msgstr ""
1320
1321 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1322 #: best-pkging-practices.dbk:914
1323 msgid ""
1324 "Put all incomplete PO files out of the way.  You can check the completeness "
1325 "by using (needs the <systemitem role=\"package\">gettext</systemitem> "
1326 "package installed):"
1327 msgstr ""
1328
1329 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1330 #: best-pkging-practices.dbk:922
1331 msgid ""
1332 "Move all files which report either fuzzy strings to a temporary place.  "
1333 "Files which report no fuzzy strings (only translated and untranslated) will "
1334 "be kept in place."
1335 msgstr ""
1336
1337 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1338 #: best-pkging-practices.dbk:929
1339 msgid ""
1340 "Now <emphasis role=\"strong\">and now only</emphasis>, modify the template "
1341 "for the typos and check again that translation are not impacted (typos, "
1342 "spelling errors, sometimes typographical corrections are usually OK)."
1343 msgstr ""
1344
1345 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1346 #: best-pkging-practices.dbk:936
1347 msgid ""
1348 "Run <command>debconf-updatepo</command>.  This will fuzzy all strings you "
1349 "modified in translations.  You can see this by running the above again."
1350 msgstr ""
1351
1352 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1353 #: best-pkging-practices.dbk:942
1354 msgid "Use the following command:"
1355 msgstr ""
1356
1357 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1358 #: best-pkging-practices.dbk:944
1359 #, no-wrap
1360 msgid "for i in debian/po/*po; do msgattrib --output-file=$i --clear-fuzzy $i; done"
1361 msgstr ""
1362
1363 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1364 #: best-pkging-practices.dbk:948
1365 msgid ""
1366 "Move back to <filename>debian/po</filename> the files which showed fuzzy "
1367 "strings in the first step."
1368 msgstr ""
1369
1370 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1371 #: best-pkging-practices.dbk:953
1372 msgid "Run <command>debconf-updatepo</command> again."
1373 msgstr ""
1374
1375 #. type: Content of: <chapter><section><section><section><title>
1376 #: best-pkging-practices.dbk:960
1377 msgid "Do not make assumptions about interfaces"
1378 msgstr ""
1379
1380 #. type: Content of: <chapter><section><section><section><para>
1381 #: best-pkging-practices.dbk:962
1382 msgid ""
1383 "Templates text should not make reference to widgets belonging to some "
1384 "debconf interfaces.  Sentences like <emphasis>If you answer "
1385 "Yes...</emphasis> have no meaning for users of graphical interfaces which "
1386 "use checkboxes for boolean questions."
1387 msgstr ""
1388
1389 #. type: Content of: <chapter><section><section><section><para>
1390 #: best-pkging-practices.dbk:967
1391 msgid ""
1392 "String templates should also avoid mentioning the default values in their "
1393 "description.  First, because this is redundant with the values seen by the "
1394 "users.  Also, because these default values may be different from the "
1395 "maintainer choices (for instance, when the debconf database was preseeded)."
1396 msgstr ""
1397
1398 #. type: Content of: <chapter><section><section><section><para>
1399 #: best-pkging-practices.dbk:973
1400 msgid ""
1401 "More generally speaking, try to avoid referring to user actions.  Just give "
1402 "facts."
1403 msgstr ""
1404
1405 #. type: Content of: <chapter><section><section><section><title>
1406 #: best-pkging-practices.dbk:979
1407 msgid "Do not use first person"
1408 msgstr ""
1409
1410 #. type: Content of: <chapter><section><section><section><para>
1411 #: best-pkging-practices.dbk:981
1412 msgid ""
1413 "You should avoid the use of first person (<emphasis>I will do "
1414 "this...</emphasis> or <emphasis>We recommend...</emphasis>).  The computer "
1415 "is not a person and the Debconf templates do not speak for the Debian "
1416 "developers.  You should use neutral construction.  Those of you who already "
1417 "wrote scientific publications, just write your templates like you would "
1418 "write a scientific paper.  However, try using active voice if still "
1419 "possible, like <emphasis>Enable this if ...</emphasis> instead of "
1420 "<emphasis>This can be enabled if...</emphasis>."
1421 msgstr ""
1422
1423 #. type: Content of: <chapter><section><section><section><title>
1424 #: best-pkging-practices.dbk:991
1425 msgid "Be gender neutral"
1426 msgstr ""
1427
1428 #. type: Content of: <chapter><section><section><section><para>
1429 #: best-pkging-practices.dbk:993
1430 msgid ""
1431 "The world is made of men and women.  Please use gender-neutral constructions "
1432 "in your writing."
1433 msgstr ""
1434
1435 #. type: Content of: <chapter><section><section><title>
1436 #: best-pkging-practices.dbk:1001
1437 msgid "Templates fields definition"
1438 msgstr ""
1439
1440 #. type: Content of: <chapter><section><section><para>
1441 #: best-pkging-practices.dbk:1003
1442 msgid ""
1443 "This part gives some information which is mostly taken from the "
1444 "<citerefentry> <refentrytitle>debconf-devel</refentrytitle> "
1445 "<manvolnum>7</manvolnum> </citerefentry> manual page."
1446 msgstr ""
1447
1448 #. type: Content of: <chapter><section><section><section><title>
1449 #: best-pkging-practices.dbk:1008
1450 msgid "Type"
1451 msgstr ""
1452
1453 #. type: Content of: <chapter><section><section><section><section><title>
1454 #: best-pkging-practices.dbk:1010
1455 msgid "string"
1456 msgstr ""
1457
1458 #. type: Content of: <chapter><section><section><section><section><para>
1459 #: best-pkging-practices.dbk:1012
1460 msgid "Results in a free-form input field that the user can type any string into."
1461 msgstr ""
1462
1463 #. type: Content of: <chapter><section><section><section><section><title>
1464 #: best-pkging-practices.dbk:1017
1465 msgid "password"
1466 msgstr ""
1467
1468 #. type: Content of: <chapter><section><section><section><section><para>
1469 #: best-pkging-practices.dbk:1019
1470 msgid ""
1471 "Prompts the user for a password.  Use this with caution; be aware that the "
1472 "password the user enters will be written to debconf's database.  You should "
1473 "probably clean that value out of the database as soon as is possible."
1474 msgstr ""
1475
1476 #. type: Content of: <chapter><section><section><section><section><title>
1477 #: best-pkging-practices.dbk:1026
1478 msgid "boolean"
1479 msgstr ""
1480
1481 #. type: Content of: <chapter><section><section><section><section><para>
1482 #: best-pkging-practices.dbk:1028
1483 msgid ""
1484 "A true/false choice.  Remember: true/false, <emphasis role=\"strong\">not "
1485 "yes/no</emphasis>..."
1486 msgstr ""
1487
1488 #. type: Content of: <chapter><section><section><section><section><title>
1489 #: best-pkging-practices.dbk:1034
1490 msgid "select"
1491 msgstr ""
1492
1493 #. type: Content of: <chapter><section><section><section><section><para>
1494 #: best-pkging-practices.dbk:1036
1495 msgid ""
1496 "A choice between one of a number of values.  The choices must be specified "
1497 "in a field named 'Choices'.  Separate the possible values with commas and "
1498 "spaces, like this: <literal>Choices: yes, no, maybe</literal>."
1499 msgstr ""
1500
1501 #. type: Content of: <chapter><section><section><section><section><para>
1502 #: best-pkging-practices.dbk:1041
1503 msgid ""
1504 "If choices are translatable strings, the 'Choices' field may be marked as "
1505 "translatable by using <literal>__Choices</literal>. The double underscore "
1506 "will split out each choice in a separate string."
1507 msgstr ""
1508
1509 #. type: Content of: <chapter><section><section><section><section><para>
1510 #: best-pkging-practices.dbk:1046
1511 msgid ""
1512 "The <command>po-debconf</command> system also offers interesting "
1513 "possibilities to only mark <emphasis role=\"strong\">some</emphasis> choices "
1514 "as translatable.  Example:"
1515 msgstr ""
1516
1517 #. type: Content of: <chapter><section><section><section><section><programlisting>
1518 #: best-pkging-practices.dbk:1051
1519 #, no-wrap
1520 msgid ""
1521 "Template: foo/bar\n"
1522 "Type: Select\n"
1523 "#flag:translate:3\n"
1524 "__Choices: PAL, SECAM, Other\n"
1525 "_Description: TV standard:\n"
1526 " Please choose the TV standard used in your country.\n"
1527 msgstr ""
1528
1529 #. type: Content of: <chapter><section><section><section><section><para>
1530 #: best-pkging-practices.dbk:1059
1531 msgid ""
1532 "In that example, only the 'Other' string is translatable while others are "
1533 "acronyms that should not be translated. The above allows only 'Other' to be "
1534 "included in PO and POT files."
1535 msgstr ""
1536
1537 #. type: Content of: <chapter><section><section><section><section><para>
1538 #: best-pkging-practices.dbk:1064
1539 msgid ""
1540 "The debconf templates flag system offers many such possibilities. The "
1541 "<citerefentry> <refentrytitle>po-debconf</refentrytitle> "
1542 "<manvolnum>7</manvolnum> </citerefentry> manual page lists all these "
1543 "possibilities."
1544 msgstr ""
1545
1546 #. type: Content of: <chapter><section><section><section><section><title>
1547 #: best-pkging-practices.dbk:1072
1548 msgid "multiselect"
1549 msgstr ""
1550
1551 #. type: Content of: <chapter><section><section><section><section><para>
1552 #: best-pkging-practices.dbk:1074
1553 msgid ""
1554 "Like the select data type, except the user can choose any number of items "
1555 "from the choices list (or chose none of them)."
1556 msgstr ""
1557
1558 #. type: Content of: <chapter><section><section><section><section><title>
1559 #: best-pkging-practices.dbk:1080
1560 msgid "note"
1561 msgstr ""
1562
1563 #. type: Content of: <chapter><section><section><section><section><para>
1564 #: best-pkging-practices.dbk:1082
1565 msgid ""
1566 "Rather than being a question per se, this datatype indicates a note that can "
1567 "be displayed to the user.  It should be used only for important notes that "
1568 "the user really should see, since debconf will go to great pains to make "
1569 "sure the user sees it; halting the install for them to press a key, and even "
1570 "mailing the note to them in some cases."
1571 msgstr ""
1572
1573 #. type: Content of: <chapter><section><section><section><section><title>
1574 #: best-pkging-practices.dbk:1091
1575 msgid "text"
1576 msgstr ""
1577
1578 #. type: Content of: <chapter><section><section><section><section><para>
1579 #: best-pkging-practices.dbk:1093
1580 msgid "This type is now considered obsolete: don't use it."
1581 msgstr ""
1582
1583 #. type: Content of: <chapter><section><section><section><section><title>
1584 #: best-pkging-practices.dbk:1098
1585 msgid "error"
1586 msgstr ""
1587
1588 #. type: Content of: <chapter><section><section><section><section><para>
1589 #: best-pkging-practices.dbk:1100
1590 msgid ""
1591 "This type is designed to handle error messages.  It is mostly similar to the "
1592 "note type.  Frontends may present it differently (for instance, the dialog "
1593 "frontend of cdebconf draws a red screen instead of the usual blue one)."
1594 msgstr ""
1595
1596 #. type: Content of: <chapter><section><section><section><section><para>
1597 #: best-pkging-practices.dbk:1105
1598 msgid ""
1599 "It is recommended to use this type for any message that needs user attention "
1600 "for a correction of any kind."
1601 msgstr ""
1602
1603 #. type: Content of: <chapter><section><section><section><title>
1604 #: best-pkging-practices.dbk:1113
1605 msgid "Description: short and extended description"
1606 msgstr ""
1607
1608 #. type: Content of: <chapter><section><section><section><para>
1609 #: best-pkging-practices.dbk:1115
1610 msgid ""
1611 "Template descriptions have two parts: short and extended.  The short "
1612 "description is in the Description: line of the template."
1613 msgstr ""
1614
1615 #. type: Content of: <chapter><section><section><section><para>
1616 #: best-pkging-practices.dbk:1119
1617 msgid ""
1618 "The short description should be kept short (50 characters or so) so that it "
1619 "may be accomodated by most debconf interfaces.  Keeping it short also helps "
1620 "translators, as usually translations tend to end up being longer than the "
1621 "original."
1622 msgstr ""
1623
1624 #. type: Content of: <chapter><section><section><section><para>
1625 #: best-pkging-practices.dbk:1125
1626 msgid ""
1627 "The short description should be able to stand on its own.  Some interfaces "
1628 "do not show the long description by default, or only if the user explicitely "
1629 "asks for it or even do not show it at all.  Avoid things like What do you "
1630 "want to do?"
1631 msgstr ""
1632
1633 #. type: Content of: <chapter><section><section><section><para>
1634 #: best-pkging-practices.dbk:1131
1635 msgid ""
1636 "The short description does not necessarily have to be a full sentence.  This "
1637 "is part of the keep it short and efficient recommendation."
1638 msgstr ""
1639
1640 #. type: Content of: <chapter><section><section><section><para>
1641 #: best-pkging-practices.dbk:1135
1642 msgid ""
1643 "The extended description should not repeat the short description word for "
1644 "word.  If you can't think up a long description, then first, think some "
1645 "more.  Post to debian-devel.  Ask for help.  Take a writing class! That "
1646 "extended description is important.  If after all that you still can't come "
1647 "up with anything, leave it blank."
1648 msgstr ""
1649
1650 #. type: Content of: <chapter><section><section><section><para>
1651 #: best-pkging-practices.dbk:1142
1652 msgid ""
1653 "The extended description should use complete sentences.  Paragraphs should "
1654 "be kept short for improved readability.  Do not mix two ideas in the same "
1655 "paragraph but rather use another paragraph."
1656 msgstr ""
1657
1658 #. type: Content of: <chapter><section><section><section><para>
1659 #: best-pkging-practices.dbk:1147
1660 msgid ""
1661 "Don't be too verbose.  User tend to ignore too long screens.  20 lines are "
1662 "by experience a border you shouldn't cross, because that means that in the "
1663 "classical dialog interface, people will need to scroll, and lot of people "
1664 "just don't do that."
1665 msgstr ""
1666
1667 #. type: Content of: <chapter><section><section><section><para>
1668 #: best-pkging-practices.dbk:1153
1669 msgid ""
1670 "The extended description should <emphasis role=\"strong\">never</emphasis> "
1671 "include a question."
1672 msgstr ""
1673
1674 #. type: Content of: <chapter><section><section><section><para>
1675 #: best-pkging-practices.dbk:1157
1676 msgid ""
1677 "For specific rules depending on templates type (string, boolean, etc.), "
1678 "please read below."
1679 msgstr ""
1680
1681 #. type: Content of: <chapter><section><section><section><title>
1682 #: best-pkging-practices.dbk:1163
1683 msgid "Choices"
1684 msgstr ""
1685
1686 #. type: Content of: <chapter><section><section><section><para>
1687 #: best-pkging-practices.dbk:1165
1688 msgid ""
1689 "This field should be used for select and multiselect types.  It contains the "
1690 "possible choices which will be presented to users.  These choices should be "
1691 "separated by commas."
1692 msgstr ""
1693
1694 #. type: Content of: <chapter><section><section><section><title>
1695 #: best-pkging-practices.dbk:1172
1696 msgid "Default"
1697 msgstr ""
1698
1699 #. type: Content of: <chapter><section><section><section><para>
1700 #: best-pkging-practices.dbk:1174
1701 msgid ""
1702 "This field is optional.  It contains the default answer for string, select "
1703 "and multiselect templates.  For multiselect templates, it may contain a "
1704 "comma-separated list of choices."
1705 msgstr ""
1706
1707 #. type: Content of: <chapter><section><section><title>
1708 #: best-pkging-practices.dbk:1183
1709 msgid "Templates fields specific style guide"
1710 msgstr ""
1711
1712 #. type: Content of: <chapter><section><section><section><title>
1713 #: best-pkging-practices.dbk:1185
1714 msgid "Type field"
1715 msgstr ""
1716
1717 #. type: Content of: <chapter><section><section><section><para>
1718 #: best-pkging-practices.dbk:1187
1719 msgid ""
1720 "No specific indication except: use the appropriate type by referring to the "
1721 "previous section."
1722 msgstr ""
1723
1724 #. type: Content of: <chapter><section><section><section><title>
1725 #: best-pkging-practices.dbk:1193
1726 msgid "Description field"
1727 msgstr ""
1728
1729 #. type: Content of: <chapter><section><section><section><para>
1730 #: best-pkging-practices.dbk:1195
1731 msgid ""
1732 "Below are specific instructions for properly writing the Description (short "
1733 "and extended) depending on the template type."
1734 msgstr ""
1735
1736 #. type: Content of: <chapter><section><section><section><section><title>
1737 #: best-pkging-practices.dbk:1199
1738 msgid "String/password templates"
1739 msgstr ""
1740
1741 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1742 #: best-pkging-practices.dbk:1203
1743 msgid ""
1744 "The short description is a prompt and <emphasis "
1745 "role=\"strong\">not</emphasis> a title.  Avoid question style prompts (IP "
1746 "Address?) in favour of opened prompts (IP address:).  The use of colons is "
1747 "recommended."
1748 msgstr ""
1749
1750 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1751 #: best-pkging-practices.dbk:1210
1752 msgid ""
1753 "The extended description is a complement to the short description.  In the "
1754 "extended part, explain what is being asked, rather than ask the same "
1755 "question again using longer words.  Use complete sentences.  Terse writing "
1756 "style is strongly discouraged."
1757 msgstr ""
1758
1759 #. type: Content of: <chapter><section><section><section><section><title>
1760 #: best-pkging-practices.dbk:1220
1761 msgid "Boolean templates"
1762 msgstr ""
1763
1764 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1765 #: best-pkging-practices.dbk:1224
1766 msgid ""
1767 "The short description should be phrased in the form of a question which "
1768 "should be kept short and should generally end with a question mark.  Terse "
1769 "writing style is permitted and even encouraged if the question is rather "
1770 "long (remember that translations are often longer than original versions)"
1771 msgstr ""
1772
1773 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1774 #: best-pkging-practices.dbk:1232
1775 msgid ""
1776 "Again, please avoid referring to specific interface widgets.  A common "
1777 "mistake for such templates is if you answer Yes-type constructions."
1778 msgstr ""
1779
1780 #. type: Content of: <chapter><section><section><section><section><title>
1781 #: best-pkging-practices.dbk:1240
1782 msgid "Select/Multiselect"
1783 msgstr ""
1784
1785 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1786 #: best-pkging-practices.dbk:1244
1787 msgid ""
1788 "The short description is a prompt and <emphasis "
1789 "role=\"strong\">not</emphasis> a title.  Do <emphasis "
1790 "role=\"strong\">not</emphasis> use useless Please choose...  constructions.  "
1791 "Users are clever enough to figure out they have to choose something...:)"
1792 msgstr ""
1793
1794 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1795 #: best-pkging-practices.dbk:1252
1796 msgid ""
1797 "The extended description will complete the short description.  It may refer "
1798 "to the available choices.  It may also mention that the user may choose more "
1799 "than one of the available choices, if the template is a multiselect one "
1800 "(although the interface often makes this clear)."
1801 msgstr ""
1802
1803 #. type: Content of: <chapter><section><section><section><section><title>
1804 #: best-pkging-practices.dbk:1262
1805 msgid "Notes"
1806 msgstr ""
1807
1808 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1809 #: best-pkging-practices.dbk:1266
1810 msgid ""
1811 "The short description should be considered to be a <emphasis "
1812 "role=\"strong\">title</emphasis>."
1813 msgstr ""
1814
1815 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1816 #: best-pkging-practices.dbk:1271
1817 msgid ""
1818 "The extended description is what will be displayed as a more detailed "
1819 "explanation of the note.  Phrases, no terse writing style."
1820 msgstr ""
1821
1822 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1823 #: best-pkging-practices.dbk:1277
1824 msgid ""
1825 "<emphasis role=\"strong\">Do not abuse debconf.</emphasis> Notes are the "
1826 "most common way to abuse debconf.  As written in debconf-devel manual page: "
1827 "it's best to use them only for warning about very serious problems.  The "
1828 "<filename>NEWS.Debian</filename> or <filename>README.Debian</filename> files "
1829 "are the appropriate location for a lot of notes.  If, by reading this, you "
1830 "consider converting your Note type templates to entries in "
1831 "<filename>NEWS.Debian</filename> or <filename>README.Debian</filename>, plus "
1832 "consider keeping existing translations for the future."
1833 msgstr ""
1834
1835 #. type: Content of: <chapter><section><section><section><title>
1836 #: best-pkging-practices.dbk:1292
1837 msgid "Choices field"
1838 msgstr ""
1839
1840 #. type: Content of: <chapter><section><section><section><para>
1841 #: best-pkging-practices.dbk:1294
1842 msgid ""
1843 "If the Choices are likely to change often, please consider using the "
1844 "__Choices trick.  This will split each individual choice into a single "
1845 "string, which will considerably help translators for doing their work."
1846 msgstr ""
1847
1848 #. type: Content of: <chapter><section><section><section><title>
1849 #: best-pkging-practices.dbk:1301 best-pkging-practices.dbk:1339
1850 msgid "Default field"
1851 msgstr ""
1852
1853 #. type: Content of: <chapter><section><section><section><para>
1854 #: best-pkging-practices.dbk:1303
1855 msgid ""
1856 "If the default value, for a select template, is likely to vary depending on "
1857 "the user language (for instance, if the choice is a language choice), please "
1858 "use the _Default trick."
1859 msgstr ""
1860
1861 #. type: Content of: <chapter><section><section><section><para>
1862 #: best-pkging-practices.dbk:1308
1863 msgid ""
1864 "This special field allow translators to put the most appropriate choice "
1865 "according to their own language.  It will become the default choice when "
1866 "their language is used while your own mentioned Default Choice will be used "
1867 "when using English."
1868 msgstr ""
1869
1870 #. type: Content of: <chapter><section><section><section><para>
1871 #: best-pkging-practices.dbk:1314
1872 msgid "Example, taken from the geneweb package templates:"
1873 msgstr ""
1874
1875 #. type: Content of: <chapter><section><section><section><screen>
1876 #: best-pkging-practices.dbk:1317
1877 #, no-wrap
1878 msgid ""
1879 "Template: geneweb/lang\n"
1880 "Type: select\n"
1881 "__Choices: Afrikaans (af), Bulgarian (bg), Catalan (ca), Chinese (zh), Czech "
1882 "(cs), Danish (da), Dutch (nl), English (en), Esperanto (eo), Estonian (et), "
1883 "Finnish (fi), French (fr), German (de), Hebrew (he), Icelandic (is), Italian "
1884 "(it), Latvian (lv), Norwegian (no), Polish (pl), Portuguese (pt), Romanian "
1885 "(ro), Russian (ru), Spanish (es), Swedish (sv)\n"
1886 "# This is the default choice. Translators may put their own language here\n"
1887 "# instead of the default.\n"
1888 "# WARNING : you MUST use the ENGLISH NAME of your language\n"
1889 "# For instance, the french translator will need to put French (fr) here.\n"
1890 "_Default: English[ translators, please see comment in PO files]\n"
1891 "_Description: Geneweb default language:\n"
1892 msgstr ""
1893
1894 #. type: Content of: <chapter><section><section><section><para>
1895 #: best-pkging-practices.dbk:1328
1896 msgid ""
1897 "Note the use of brackets which allow internal comments in debconf fields.  "
1898 "Also note the use of comments which will show up in files the translators "
1899 "will work with."
1900 msgstr ""
1901
1902 #. type: Content of: <chapter><section><section><section><para>
1903 #: best-pkging-practices.dbk:1333
1904 msgid ""
1905 "The comments are needed as the _Default trick is a bit confusing: the "
1906 "translators may put their own choice"
1907 msgstr ""
1908
1909 #. type: Content of: <chapter><section><section><section><para>
1910 #: best-pkging-practices.dbk:1341
1911 msgid ""
1912 "Do NOT use empty default field.  If you don't want to use default values, do "
1913 "not use Default at all."
1914 msgstr ""
1915
1916 #. type: Content of: <chapter><section><section><section><para>
1917 #: best-pkging-practices.dbk:1345
1918 msgid ""
1919 "If you use po-debconf (and you <emphasis role=\"strong\">should</emphasis>, "
1920 "see <xref linkend=\"s6.5.2.2\"/>), consider making this field translatable, "
1921 "if you think it may be translated."
1922 msgstr ""
1923
1924 #. type: Content of: <chapter><section><section><section><para>
1925 #: best-pkging-practices.dbk:1350
1926 msgid ""
1927 "If the default value may vary depending on language/country (for instance "
1928 "the default value for a language choice), consider using the special "
1929 "_Default type documented in <citerefentry> "
1930 "<refentrytitle>po-debconf</refentrytitle> <manvolnum>7</manvolnum> "
1931 "</citerefentry>)."
1932 msgstr ""
1933
1934 #. type: Content of: <chapter><section><title>
1935 #: best-pkging-practices.dbk:1362
1936 msgid "Internationalization"
1937 msgstr ""
1938
1939 #. type: Content of: <chapter><section><para>
1940 #: best-pkging-practices.dbk:1364
1941 msgid ""
1942 "This section contains global information for developers to make translators' "
1943 "life easier.  More information for translators and developers interrested in "
1944 "internationalization are available in the <ulink "
1945 "url=\"&url-i18n-l10n;\">Internationalisation and localisation in "
1946 "Debian</ulink> documentation."
1947 msgstr ""
1948
1949 #. type: Content of: <chapter><section><section><title>
1950 #: best-pkging-practices.dbk:1371
1951 msgid "Handling debconf translations"
1952 msgstr ""
1953
1954 #. type: Content of: <chapter><section><section><para>
1955 #: best-pkging-practices.dbk:1373
1956 msgid ""
1957 "Like porters, translators have a difficult task.  They work on many packages "
1958 "and must collaborate with many different maintainers.  Moreover, most of the "
1959 "time, they are not native English speakers, so you may need to be "
1960 "particularly patient with them."
1961 msgstr ""
1962
1963 #. type: Content of: <chapter><section><section><para>
1964 #: best-pkging-practices.dbk:1379
1965 msgid ""
1966 "The goal of <systemitem role=\"package\">debconf</systemitem> was to make "
1967 "packages configuration easier for maintainers and for users.  Originally, "
1968 "translation of debconf templates was handled with "
1969 "<command>debconf-mergetemplate</command>.  However, that technique is now "
1970 "deprecated; the best way to accomplish <systemitem "
1971 "role=\"package\">debconf</systemitem> internationalization is by using the "
1972 "<systemitem role=\"package\">po-debconf</systemitem> package.  This method "
1973 "is easier both for maintainer and translators; transition scripts are "
1974 "provided."
1975 msgstr ""
1976
1977 #. type: Content of: <chapter><section><section><para>
1978 #: best-pkging-practices.dbk:1389
1979 msgid ""
1980 "Using <systemitem role=\"package\">po-debconf</systemitem>, the translation "
1981 "is stored in <filename>.po</filename> files (drawing from "
1982 "<command>gettext</command> translation techniques).  Special template files "
1983 "contain the original messages and mark which fields are translatable.  When "
1984 "you change the value of a translatable field, by calling "
1985 "<command>debconf-updatepo</command>, the translation is marked as needing "
1986 "attention from the translators.  Then, at build time, the "
1987 "<command>dh_installdebconf</command> program takes care of all the needed "
1988 "magic to add the template along with the up-to-date translations into the "
1989 "binary packages.  Refer to the <citerefentry> "
1990 "<refentrytitle>po-debconf</refentrytitle> <manvolnum>7</manvolnum> "
1991 "</citerefentry> manual page for details."
1992 msgstr ""
1993
1994 #. type: Content of: <chapter><section><section><title>
1995 #: best-pkging-practices.dbk:1405
1996 msgid "Internationalized documentation"
1997 msgstr ""
1998
1999 #. type: Content of: <chapter><section><section><para>
2000 #: best-pkging-practices.dbk:1407
2001 msgid ""
2002 "Internationalizing documentation is crucial for users, but a lot of labor.  "
2003 "There's no way to eliminate all that work, but you can make things easier "
2004 "for translators."
2005 msgstr ""
2006
2007 #. type: Content of: <chapter><section><section><para>
2008 #: best-pkging-practices.dbk:1412
2009 msgid ""
2010 "If you maintain documentation of any size, it is easier for translators if "
2011 "they have access to a source control system.  That lets translators see the "
2012 "differences between two versions of the documentation, so, for instance, "
2013 "they can see what needs to be retranslated.  It is recommended that the "
2014 "translated documentation maintain a note about what source control revision "
2015 "the translation is based on.  An interesting system is provided by <ulink "
2016 "url=\"&url-i18n-doc-check;\">doc-check</ulink> in the <systemitem "
2017 "role=\"package\">debian-installer</systemitem> package, which shows an "
2018 "overview of the translation status for any given language, using structured "
2019 "comments for the current revision of the file to be translated and, for a "
2020 "translated file, the revision of the original file the translation is based "
2021 "on.  You might wish to adapt and provide that in your VCS area."
2022 msgstr ""
2023
2024 #. type: Content of: <chapter><section><section><para>
2025 #: best-pkging-practices.dbk:1426
2026 msgid ""
2027 "If you maintain XML or SGML documentation, we suggest that you isolate any "
2028 "language-independent information and define those as entities in a separate "
2029 "file which is included by all the different translations.  This makes it "
2030 "much easier, for instance, to keep URLs up to date across multiple files."
2031 msgstr ""
2032
2033 #. type: Content of: <chapter><section><section><para>
2034 #: best-pkging-practices.dbk:1432
2035 msgid ""
2036 "Some tools (e.g. <systemitem role=\"package\">po4a</systemitem>, <systemitem "
2037 "role=\"package\">poxml</systemitem>, or the <systemitem "
2038 "role=\"package\">translate-toolkit</systemitem>) are specialized in "
2039 "extracting the translatable material from different formats.  They produce "
2040 "PO files, a format quite common to translators, which permits to see what "
2041 "needs to be retranslated when the translated document is updated."
2042 msgstr ""
2043
2044 #. type: Content of: <chapter><section><title>
2045 #: best-pkging-practices.dbk:1444
2046 msgid "Common packaging situations"
2047 msgstr ""
2048
2049 #. type: Content of: <chapter><section><section><title>
2050 #: best-pkging-practices.dbk:1455
2051 msgid "Packages using <command>autoconf</command>/<command>automake</command>"
2052 msgstr ""
2053
2054 #. type: Content of: <chapter><section><section><para>
2055 #: best-pkging-practices.dbk:1457
2056 msgid ""
2057 "Keeping <command>autoconf</command>'s <filename>config.sub</filename> and "
2058 "<filename>config.guess</filename> files up to date is critical for porters, "
2059 "especially on more volatile architectures.  Some very good packaging "
2060 "practices for any package using <command>autoconf</command> and/or "
2061 "<command>automake</command> have been synthesized in &file-bpp-autotools; "
2062 "from the <systemitem role=\"package\">autotools-dev</systemitem> package.  "
2063 "You're strongly encouraged to read this file and to follow the given "
2064 "recommendations."
2065 msgstr ""
2066
2067 #. type: Content of: <chapter><section><section><title>
2068 #: best-pkging-practices.dbk:1469
2069 msgid "Libraries"
2070 msgstr ""
2071
2072 #. type: Content of: <chapter><section><section><para>
2073 #: best-pkging-practices.dbk:1471
2074 msgid ""
2075 "Libraries are always difficult to package for various reasons.  The policy "
2076 "imposes many constraints to ease their maintenance and to make sure upgrades "
2077 "are as simple as possible when a new upstream version comes out.  Breakage "
2078 "in a library can result in dozens of dependent packages breaking."
2079 msgstr ""
2080
2081 #. type: Content of: <chapter><section><section><para>
2082 #: best-pkging-practices.dbk:1477
2083 msgid ""
2084 "Good practices for library packaging have been grouped in <ulink "
2085 "url=\"&url-libpkg-guide;\">the library packaging guide</ulink>."
2086 msgstr ""
2087
2088 #. type: Content of: <chapter><section><section><title>
2089 #: best-pkging-practices.dbk:1484
2090 msgid "Documentation"
2091 msgstr ""
2092
2093 #. type: Content of: <chapter><section><section><para>
2094 #: best-pkging-practices.dbk:1486
2095 msgid ""
2096 "Be sure to follow the <ulink url=\"&url-debian-policy;ch-docs.html\">Policy "
2097 "on documentation</ulink>."
2098 msgstr ""
2099
2100 #. type: Content of: <chapter><section><section><para>
2101 #: best-pkging-practices.dbk:1491
2102 msgid ""
2103 "If your package contains documentation built from XML or SGML, we recommend "
2104 "you not ship the XML or SGML source in the binary package(s).  If users want "
2105 "the source of the documentation, they should retrieve the source package."
2106 msgstr ""
2107
2108 #. type: Content of: <chapter><section><section><para>
2109 #: best-pkging-practices.dbk:1496
2110 msgid ""
2111 "Policy specifies that documentation should be shipped in HTML format.  We "
2112 "also recommend shipping documentation in PDF and plain text format if "
2113 "convenient and if output of reasonable quality is possible.  However, it is "
2114 "generally not appropriate to ship plain text versions of documentation whose "
2115 "source format is HTML."
2116 msgstr ""
2117
2118 #. type: Content of: <chapter><section><section><para>
2119 #: best-pkging-practices.dbk:1503
2120 msgid ""
2121 "Major shipped manuals should register themselves with <systemitem "
2122 "role=\"package\">doc-base</systemitem> on installation.  See the <systemitem "
2123 "role=\"package\">doc-base</systemitem> package documentation for more "
2124 "information."
2125 msgstr ""
2126
2127 #. type: Content of: <chapter><section><section><para>
2128 #: best-pkging-practices.dbk:1509
2129 msgid ""
2130 "Debian policy (section 12.1) directs that manual pages should accompany "
2131 "every program, utility, and function, and suggests them for other objects "
2132 "like configuration files. If the work you are packaging does not have such "
2133 "manual pages, consider writing them for inclusion in your package, and "
2134 "submitting them upstream."
2135 msgstr ""
2136
2137 #. type: Content of: <chapter><section><section><para>
2138 #: best-pkging-practices.dbk:1516
2139 msgid ""
2140 "The manpages do not need to be written directly in the troff format.  "
2141 "Popular source formats are Docbook, POD and reST, which can be converted "
2142 "using <command>xsltproc</command>, <command>pod2man</command> and "
2143 "<command>rst2man</command> respectively. To a lesser extent, the "
2144 "<command>help2man</command> program can also be used to write a stub."
2145 msgstr ""
2146
2147 #. type: Content of: <chapter><section><section><title>
2148 #: best-pkging-practices.dbk:1525
2149 msgid "Specific types of packages"
2150 msgstr ""
2151
2152 #. type: Content of: <chapter><section><section><para>
2153 #: best-pkging-practices.dbk:1527
2154 msgid ""
2155 "Several specific types of packages have special sub-policies and "
2156 "corresponding packaging rules and practices:"
2157 msgstr ""
2158
2159 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2160 #: best-pkging-practices.dbk:1533
2161 msgid ""
2162 "Perl related packages have a <ulink url=\"&url-perl-policy;\">Perl "
2163 "policy</ulink>, some examples of packages following that policy are "
2164 "<systemitem role=\"package\">libdbd-pg-perl</systemitem> (binary perl "
2165 "module) or <systemitem role=\"package\">libmldbm-perl</systemitem> (arch "
2166 "independent perl module)."
2167 msgstr ""
2168
2169 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2170 #: best-pkging-practices.dbk:1542
2171 msgid ""
2172 "Python related packages have their python policy; see &file-python-policy; "
2173 "in the <systemitem role=\"package\">python</systemitem> package."
2174 msgstr ""
2175
2176 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2177 #: best-pkging-practices.dbk:1549
2178 msgid ""
2179 "Emacs related packages have the <ulink url=\"&url-emacs-policy;\">emacs "
2180 "policy</ulink>."
2181 msgstr ""
2182
2183 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2184 #: best-pkging-practices.dbk:1556
2185 msgid ""
2186 "Java related packages have their <ulink url=\"&url-java-policy;\">java "
2187 "policy</ulink>."
2188 msgstr ""
2189
2190 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2191 #: best-pkging-practices.dbk:1563
2192 msgid ""
2193 "Ocaml related packages have their own policy, found in &file-ocaml-policy; "
2194 "from the <systemitem role=\"package\">ocaml</systemitem> package.  A good "
2195 "example is the <systemitem role=\"package\">camlzip</systemitem> source "
2196 "package."
2197 msgstr ""
2198
2199 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2200 #: best-pkging-practices.dbk:1571
2201 msgid ""
2202 "Packages providing XML or SGML DTDs should conform to the recommendations "
2203 "found in the <systemitem role=\"package\">sgml-base-doc</systemitem> "
2204 "package."
2205 msgstr ""
2206
2207 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2208 #: best-pkging-practices.dbk:1577
2209 msgid ""
2210 "Lisp packages should register themselves with <systemitem "
2211 "role=\"package\">common-lisp-controller</systemitem>, about which see "
2212 "&file-lisp-controller;."
2213 msgstr ""
2214
2215 #. type: Content of: <chapter><section><section><title>
2216 #: best-pkging-practices.dbk:1607
2217 msgid "Architecture-independent data"
2218 msgstr ""
2219
2220 #. type: Content of: <chapter><section><section><para>
2221 #: best-pkging-practices.dbk:1609
2222 msgid ""
2223 "It is not uncommon to have a large amount of architecture-independent data "
2224 "packaged with a program.  For example, audio files, a collection of icons, "
2225 "wallpaper patterns, or other graphic files.  If the size of this data is "
2226 "negligible compared to the size of the rest of the package, it's probably "
2227 "best to keep it all in a single package."
2228 msgstr ""
2229
2230 #. type: Content of: <chapter><section><section><para>
2231 #: best-pkging-practices.dbk:1616
2232 msgid ""
2233 "However, if the size of the data is considerable, consider splitting it out "
2234 "into a separate, architecture-independent package "
2235 "(<filename>_all.deb</filename>).  By doing this, you avoid needless "
2236 "duplication of the same data into eleven or more .debs, one per each "
2237 "architecture.  While this adds some extra overhead into the "
2238 "<filename>Packages</filename> files, it saves a lot of disk space on Debian "
2239 "mirrors.  Separating out architecture-independent data also reduces "
2240 "processing time of <command>lintian</command> (see <xref "
2241 "linkend=\"tools-lint\"/>) when run over the entire Debian archive."
2242 msgstr ""
2243
2244 #. type: Content of: <chapter><section><section><title>
2245 #: best-pkging-practices.dbk:1628
2246 msgid "Needing a certain locale during build"
2247 msgstr ""
2248
2249 #. type: Content of: <chapter><section><section><para>
2250 #: best-pkging-practices.dbk:1630
2251 msgid ""
2252 "If you need a certain locale during build, you can create a temporary file "
2253 "via this trick:"
2254 msgstr ""
2255
2256 #. type: Content of: <chapter><section><section><para>
2257 #: best-pkging-practices.dbk:1634
2258 msgid ""
2259 "If you set <varname>LOCPATH</varname> to the equivalent of "
2260 "<filename>/usr/lib/locale</filename>, and <varname>LC_ALL</varname> to the "
2261 "name of the locale you generate, you should get what you want without being "
2262 "root.  Something like this:"
2263 msgstr ""
2264
2265 #. type: Content of: <chapter><section><section><screen>
2266 #: best-pkging-practices.dbk:1639
2267 #, no-wrap
2268 msgid ""
2269 "LOCALE_PATH=debian/tmpdir/usr/lib/locale\n"
2270 "LOCALE_NAME=en_IN\n"
2271 "LOCALE_CHARSET=UTF-8\n"
2272 "\n"
2273 "mkdir -p $LOCALE_PATH\n"
2274 "localedef -i $LOCALE_NAME.$LOCALE_CHARSET -f $LOCALE_CHARSET "
2275 "$LOCALE_PATH/$LOCALE_NAME.$LOCALE_CHARSET\n"
2276 "\n"
2277 "# Using the locale\n"
2278 "LOCPATH=$LOCALE_PATH LC_ALL=$LOCALE_NAME.$LOCALE_CHARSET date\n"
2279 msgstr ""
2280
2281 #. type: Content of: <chapter><section><section><title>
2282 #: best-pkging-practices.dbk:1652
2283 msgid "Make transition packages deborphan compliant"
2284 msgstr ""
2285
2286 #. type: Content of: <chapter><section><section><para>
2287 #: best-pkging-practices.dbk:1654
2288 msgid ""
2289 "Deborphan is a program for helping users to detect which packages can safely "
2290 "be removed from the system, i.e.  the ones that have no packages depending "
2291 "on them.  The default operation is to search only within the libs and "
2292 "oldlibs sections, to hunt down unused libraries.  But when passed the right "
2293 "argument, it tries to catch other useless packages."
2294 msgstr ""
2295
2296 #. type: Content of: <chapter><section><section><para>
2297 #: best-pkging-practices.dbk:1661
2298 msgid ""
2299 "For example, with <literal>--guess-dummy</literal>, "
2300 "<command>deborphan</command> tries to search all transitional packages which "
2301 "were needed for upgrade but which can now safely be removed.  For that, it "
2302 "looks for the string dummy or transitional in their short description."
2303 msgstr ""
2304
2305 #. type: Content of: <chapter><section><section><para>
2306 #: best-pkging-practices.dbk:1668
2307 msgid ""
2308 "So, when you are creating such a package, please make sure to add this text "
2309 "to your short description.  If you are looking for examples, just run: "
2310 "<command>apt-cache search .|grep dummy</command> or <command>apt-cache "
2311 "search .|grep transitional</command>."
2312 msgstr ""
2313
2314 #. type: Content of: <chapter><section><section><title>
2315 #: best-pkging-practices.dbk:1676
2316 msgid "Best practices for <filename>.orig.tar.{gz,bz2,lzma}</filename> files"
2317 msgstr ""
2318
2319 #. type: Content of: <chapter><section><section><para>
2320 #: best-pkging-practices.dbk:1678
2321 msgid ""
2322 "There are two kinds of original source tarballs: Pristine source and "
2323 "repackaged upstream source."
2324 msgstr ""
2325
2326 #. type: Content of: <chapter><section><section><section><title>
2327 #: best-pkging-practices.dbk:1682
2328 msgid "Pristine source"
2329 msgstr ""
2330
2331 #. type: Content of: <chapter><section><section><section><para><footnote><para>
2332 #: best-pkging-practices.dbk:1686
2333 msgid ""
2334 "We cannot prevent upstream authors from changing the tarball they distribute "
2335 "without also incrementing the version number, so there can be no guarantee "
2336 "that a pristine tarball is identical to what upstream "
2337 "<emphasis>currently</emphasis> distributing at any point in time.  All that "
2338 "can be expected is that it is identical to something that upstream once "
2339 "<emphasis>did</emphasis> distribute.  If a difference arises later (say, if "
2340 "upstream notices that he wasn't using maximal compression in his original "
2341 "distribution and then re-<command>gzip</command>s it), that's just too bad.  "
2342 "Since there is no good way to upload a new "
2343 "<filename>.orig.tar.{gz,bz2,lzma}</filename> for the same version, there is "
2344 "not even any point in treating this situation as a bug."
2345 msgstr ""
2346
2347 #. type: Content of: <chapter><section><section><section><para>
2348 #: best-pkging-practices.dbk:1684
2349 msgid ""
2350 "The defining characteristic of a pristine source tarball is that the "
2351 "<filename>.orig.tar.{gz,bz2,lzma}</filename> file is byte-for-byte identical "
2352 "to a tarball officially distributed by the upstream author.<placeholder "
2353 "type=\"footnote\" id=\"0\"/> This makes it possible to use checksums to "
2354 "easily verify that all changes between Debian's version and upstream's are "
2355 "contained in the Debian diff.  Also, if the original source is huge, "
2356 "upstream authors and others who already have the upstream tarball can save "
2357 "download time if they want to inspect your packaging in detail."
2358 msgstr ""
2359
2360 #. type: Content of: <chapter><section><section><section><para>
2361 #: best-pkging-practices.dbk:1704
2362 msgid ""
2363 "There is no universally accepted guidelines that upstream authors follow "
2364 "regarding to the directory structure inside their tarball, but "
2365 "<command>dpkg-source</command> is nevertheless able to deal with most "
2366 "upstream tarballs as pristine source.  Its strategy is equivalent to the "
2367 "following:"
2368 msgstr ""
2369
2370 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2371 #: best-pkging-practices.dbk:1712
2372 msgid "It unpacks the tarball in an empty temporary directory by doing"
2373 msgstr ""
2374
2375 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><screen>
2376 #: best-pkging-practices.dbk:1715
2377 #, no-wrap
2378 msgid ""
2379 "zcat "
2380 "path/to/<replaceable>packagename</replaceable>_<replaceable>upstream-version</replaceable>.orig.tar.gz "
2381 "| tar xf -\n"
2382 msgstr ""
2383
2384 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2385 #: best-pkging-practices.dbk:1720
2386 msgid ""
2387 "If, after this, the temporary directory contains nothing but one directory "
2388 "and no other files, <command>dpkg-source</command> renames that directory to "
2389 "<filename><replaceable>packagename</replaceable>-<replaceable>upstream-version</replaceable>(.orig)</filename>.  "
2390 "The name of the top-level directory in the tarball does not matter, and is "
2391 "forgotten."
2392 msgstr ""
2393
2394 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2395 #: best-pkging-practices.dbk:1729
2396 msgid ""
2397 "Otherwise, the upstream tarball must have been packaged without a common "
2398 "top-level directory (shame on the upstream author!).  In this case, "
2399 "<command>dpkg-source</command> renames the temporary directory "
2400 "<emphasis>itself</emphasis> to "
2401 "<filename><replaceable>packagename</replaceable>-<replaceable>upstream-version</replaceable>(.orig)</filename>."
2402 msgstr ""
2403
2404 #. type: Content of: <chapter><section><section><section><title>
2405 #: best-pkging-practices.dbk:1740
2406 msgid "Repackaged upstream source"
2407 msgstr ""
2408
2409 #. type: Content of: <chapter><section><section><section><para>
2410 #: best-pkging-practices.dbk:1742
2411 msgid ""
2412 "You <emphasis role=\"strong\">should</emphasis> upload packages with a "
2413 "pristine source tarball if possible, but there are various reasons why it "
2414 "might not be possible.  This is the case if upstream does not distribute the "
2415 "source as gzipped tar at all, or if upstream's tarball contains "
2416 "non-DFSG-free material that you must remove before uploading."
2417 msgstr ""
2418
2419 #. type: Content of: <chapter><section><section><section><para>
2420 #: best-pkging-practices.dbk:1749
2421 msgid ""
2422 "In these cases the developer must construct a suitable "
2423 "<filename>.orig.tar.{gz,bz2,lzma}</filename> file himself.  We refer to such "
2424 "a tarball as a repackaged upstream source.  Note that a repackaged upstream "
2425 "source is different from a Debian-native package.  A repackaged source still "
2426 "comes with Debian-specific changes in a separate "
2427 "<filename>.diff.gz</filename> or "
2428 "<filename>.debian.tar.{gz,bz2,lzma}</filename> and still has a version "
2429 "number composed of <replaceable>upstream-version</replaceable> and "
2430 "<replaceable>debian-version</replaceable>."
2431 msgstr ""
2432
2433 #. type: Content of: <chapter><section><section><section><para>
2434 #: best-pkging-practices.dbk:1758
2435 msgid ""
2436 "There may be cases where it is desirable to repackage the source even though "
2437 "upstream distributes a <filename>.tar.{gz,bz2,lzma}</filename> that could in "
2438 "principle be used in its pristine form.  The most obvious is if "
2439 "<emphasis>significant</emphasis> space savings can be achieved by "
2440 "recompressing the tar archive or by removing genuinely useless cruft from "
2441 "the upstream archive.  Use your own discretion here, but be prepared to "
2442 "defend your decision if you repackage source that could have been pristine."
2443 msgstr ""
2444
2445 #. type: Content of: <chapter><section><section><section><para>
2446 #: best-pkging-practices.dbk:1767
2447 msgid "A repackaged <filename>.orig.tar.{gz,bz2,lzma}</filename>"
2448 msgstr ""
2449
2450 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2451 #: best-pkging-practices.dbk:1772
2452 msgid ""
2453 "<emphasis role=\"strong\">should</emphasis> be documented in the resulting "
2454 "source package.  Detailed information on how the repackaged source was "
2455 "obtained, and on how this can be reproduced should be provided in "
2456 "<filename>debian/copyright</filename>.  It is also a good idea to provide a "
2457 "<literal>get-orig-source</literal> target in your "
2458 "<filename>debian/rules</filename> file that repeats the process, as "
2459 "described in the Policy Manual, <ulink "
2460 "url=\"&url-debian-policy;ch-source.html#s-debianrules\">Main building "
2461 "script: <filename>debian/rules</filename></ulink>."
2462 msgstr ""
2463
2464 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para><footnote><para>
2465 #: best-pkging-practices.dbk:1787
2466 msgid ""
2467 "As a special exception, if the omission of non-free files would lead to the "
2468 "source failing to build without assistance from the Debian diff, it might be "
2469 "appropriate to instead edit the files, omitting only the non-free parts of "
2470 "them, and/or explain the situation in a <filename>README.source</filename> "
2471 "file in the root of the source tree.  But in that case please also urge the "
2472 "upstream author to make the non-free components easier separable from the "
2473 "rest of the source."
2474 msgstr ""
2475
2476 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2477 #: best-pkging-practices.dbk:1785
2478 msgid ""
2479 "<emphasis role=\"strong\">should not</emphasis> contain any file that does "
2480 "not come from the upstream author(s), or whose contents has been changed by "
2481 "you.<placeholder type=\"footnote\" id=\"0\"/>"
2482 msgstr ""
2483
2484 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2485 #: best-pkging-practices.dbk:1798
2486 msgid ""
2487 "<emphasis role=\"strong\">should</emphasis>, except where impossible for "
2488 "legal reasons, preserve the entire building and portablility infrastructure "
2489 "provided by the upstream author.  For example, it is not a sufficient reason "
2490 "for omitting a file that it is used only when building on MS-DOS.  "
2491 "Similarly, a <filename>Makefile</filename> provided by upstream should not "
2492 "be omitted even if the first thing your <filename>debian/rules</filename> "
2493 "does is to overwrite it by running a configure script."
2494 msgstr ""
2495
2496 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2497 #: best-pkging-practices.dbk:1807
2498 msgid ""
2499 "(<emphasis>Rationale:</emphasis> It is common for Debian users who need to "
2500 "build software for non-Debian platforms to fetch the source from a Debian "
2501 "mirror rather than trying to locate a canonical upstream distribution "
2502 "point)."
2503 msgstr ""
2504
2505 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2506 #: best-pkging-practices.dbk:1814
2507 msgid ""
2508 "<emphasis role=\"strong\">should</emphasis> use "
2509 "<filename><replaceable>packagename</replaceable>-<replaceable>upstream-version</replaceable>.orig</filename> "
2510 "as the name of the top-level directory in its tarball.  This makes it "
2511 "possible to distinguish pristine tarballs from repackaged ones."
2512 msgstr ""
2513
2514 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2515 #: best-pkging-practices.dbk:1822
2516 msgid ""
2517 "<emphasis role=\"strong\">should</emphasis> be gzipped or bzipped with "
2518 "maximal compression."
2519 msgstr ""
2520
2521 #. type: Content of: <chapter><section><section><section><title>
2522 #: best-pkging-practices.dbk:1829
2523 msgid "Changing binary files"
2524 msgstr ""
2525
2526 #. type: Content of: <chapter><section><section><section><para>
2527 #: best-pkging-practices.dbk:1831
2528 msgid ""
2529 "Sometimes it is necessary to change binary files contained in the original "
2530 "tarball, or to add binary files that are not in it. This is fully supported "
2531 "when using source packages in “3.0 (quilt)” format, see the "
2532 "<citerefentry><refentrytitle>dpkg-source</refentrytitle><manvolnum>1</manvolnum></citerefentry> "
2533 "manual page for details. When using the older format “1.0”, binary files "
2534 "can't be stored in the <filename>.diff.gz</filename> so you must store an "
2535 "<command>uuencode</command>d (or similar) version of the file(s)  and decode "
2536 "it at build time in <filename>debian/rules</filename> (and move it in its "
2537 "official location)."
2538 msgstr ""
2539
2540 #. type: Content of: <chapter><section><section><title>
2541 #: best-pkging-practices.dbk:1846
2542 msgid "Best practices for debug packages"
2543 msgstr ""
2544
2545 #. type: Content of: <chapter><section><section><para>
2546 #: best-pkging-practices.dbk:1848
2547 msgid ""
2548 "A debug package is a package with a name ending in -dbg, that contains "
2549 "additional information that <command>gdb</command> can use.  Since Debian "
2550 "binaries are stripped by default, debugging information, including function "
2551 "names and line numbers, is otherwise not available when running "
2552 "<command>gdb</command> on Debian binaries.  Debug packages allow users who "
2553 "need this additional debugging information to install it, without bloating a "
2554 "regular system with the information."
2555 msgstr ""
2556
2557 #. type: Content of: <chapter><section><section><para>
2558 #: best-pkging-practices.dbk:1856
2559 msgid ""
2560 "It is up to a package's maintainer whether to create a debug package or "
2561 "not.  Maintainers are encouraged to create debug packages for library "
2562 "packages, since this can aid in debugging many programs linked to a "
2563 "library.  In general, debug packages do not need to be added for all "
2564 "programs; doing so would bloat the archive.  But if a maintainer finds that "
2565 "users often need a debugging version of a program, it can be worthwhile to "
2566 "make a debug package for it.  Programs that are core infrastructure, such as "
2567 "apache and the X server are also good candidates for debug packages."
2568 msgstr ""
2569
2570 #. type: Content of: <chapter><section><section><para>
2571 #: best-pkging-practices.dbk:1866
2572 msgid ""
2573 "Some debug packages may contain an entire special debugging build of a "
2574 "library or other binary, but most of them can save space and build time by "
2575 "instead containing separated debugging symbols that <command>gdb</command> "
2576 "can find and load on the fly when debugging a program or library.  The "
2577 "convention in Debian is to keep these symbols in "
2578 "<filename>/usr/lib/debug/<replaceable>path</replaceable></filename>, where "
2579 "<replaceable>path</replaceable> is the path to the executable or library.  "
2580 "For example, debugging symbols for <filename>/usr/bin/foo</filename> go in "
2581 "<filename>/usr/lib/debug/usr/bin/foo</filename>, and debugging symbols for "
2582 "<filename>/usr/lib/libfoo.so.1</filename> go in "
2583 "<filename>/usr/lib/debug/usr/lib/libfoo.so.1</filename>."
2584 msgstr ""
2585
2586 #. type: Content of: <chapter><section><section><para>
2587 #: best-pkging-practices.dbk:1878
2588 msgid ""
2589 "The debugging symbols can be extracted from an object file using "
2590 "<command>objcopy --only-keep-debug</command>.  Then the object file can be "
2591 "stripped, and <command>objcopy --add-gnu-debuglink</command> used to specify "
2592 "the path to the debugging symbol file.  <citerefentry> "
2593 "<refentrytitle>objcopy</refentrytitle> <manvolnum>1</manvolnum> "
2594 "</citerefentry> explains in detail how this works."
2595 msgstr ""
2596
2597 #. type: Content of: <chapter><section><section><para>
2598 #: best-pkging-practices.dbk:1886
2599 msgid ""
2600 "The <command>dh_strip</command> command in <systemitem "
2601 "role=\"package\">debhelper</systemitem> supports creating debug packages, "
2602 "and can take care of using <command>objcopy</command> to separate out the "
2603 "debugging symbols for you.  If your package uses <systemitem "
2604 "role=\"package\">debhelper</systemitem>, all you need to do is call "
2605 "<command>dh_strip --dbg-package=libfoo-dbg</command>, and add an entry to "
2606 "<filename>debian/control</filename> for the debug package."
2607 msgstr ""
2608
2609 #. type: Content of: <chapter><section><section><para>
2610 #: best-pkging-practices.dbk:1893
2611 msgid ""
2612 "Note that the debug package should depend on the package that it provides "
2613 "debugging symbols for, and this dependency should be versioned.  For "
2614 "example:"
2615 msgstr ""
2616
2617 #. type: Content of: <chapter><section><section><screen>
2618 #: best-pkging-practices.dbk:1897
2619 #, no-wrap
2620 msgid "Depends: libfoo (= ${binary:Version})\n"
2621 msgstr ""