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