chiark / gitweb /
7072c6eb931b95fbf0fa37e5ae61fdfe991686b1
[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.4.1\n"
7 "POT-Creation-Date: 2009-09-06 02:31+0900\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 "Vcs-Browser"
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 "Vcs-*"
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 #. type: Content of: <chapter><section><section><section><screen>
630 #: best-pkging-practices.dbk:406
631 #, fuzzy, no-wrap
632 msgid ""
633 "  Source: vim\n"
634 "  Section: editors\n"
635 "  Priority: optional\n"
636 "  &lt;snip&gt;\n"
637 "  Vcs-Svn: svn://svn.debian.org/svn/pkg-vim/trunk/packages/vim\n"
638 "  Vcs-Browser: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim\n"
639 "  Homepage: http://www.vim.org\n"
640 msgstr ""
641 "\n"
642 "  Source: vim\n"
643 "  Section: editors\n"
644 "  Priority: optional\n"
645 "  &lt;snip&gt;\n"
646 "  Vcs-Svn: svn://svn.debian.org/svn/pkg-vim/trunk/packages/vim\n"
647 "  Vcs-Browser: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim\n"
648 "  Homepage: http://www.vim.org\n"
649
650 # type: Content of: <chapter><section><title>
651 #. type: Content of: <chapter><section><title>
652 #: best-pkging-practices.dbk:421
653 msgid "Best practices for <filename>debian/changelog</filename>"
654 msgstr ""
655
656 # type: Content of: <chapter><section><para>
657 #. type: Content of: <chapter><section><para>
658 #: best-pkging-practices.dbk:423
659 msgid ""
660 "The following practices supplement the <ulink url=\"&url-debian-policy;ch-"
661 "docs.html#s-changelogs\">Policy on changelog files</ulink>."
662 msgstr ""
663
664 # type: Content of: <chapter><section><section><title>
665 #. type: Content of: <chapter><section><section><title>
666 #: best-pkging-practices.dbk:428
667 msgid "Writing useful changelog entries"
668 msgstr ""
669
670 # type: Content of: <chapter><section><section><para>
671 #. type: Content of: <chapter><section><section><para>
672 #: best-pkging-practices.dbk:430
673 msgid ""
674 "The changelog entry for a package revision documents changes in that "
675 "revision, and only them.  Concentrate on describing significant and user-"
676 "visible changes that were made since the last version."
677 msgstr ""
678
679 # type: Content of: <chapter><section><section><para>
680 #. type: Content of: <chapter><section><section><para>
681 #: best-pkging-practices.dbk:435
682 msgid ""
683 "Focus on <emphasis>what</emphasis> was changed — who, how and when are "
684 "usually less important.  Having said that, remember to politely attribute "
685 "people who have provided notable help in making the package (e.g., those who "
686 "have sent in patches)."
687 msgstr ""
688
689 # type: Content of: <chapter><section><section><para>
690 #. type: Content of: <chapter><section><section><para>
691 #: best-pkging-practices.dbk:441
692 msgid ""
693 "There's no need to elaborate the trivial and obvious changes.  You can also "
694 "aggregate several changes in one entry.  On the other hand, don't be overly "
695 "terse if you have undertaken a major change.  Be especially clear if there "
696 "are changes that affect the behaviour of the program.  For further "
697 "explanations, use the <filename>README.Debian</filename> file."
698 msgstr ""
699
700 # type: Content of: <chapter><section><section><para>
701 #. type: Content of: <chapter><section><section><para>
702 #: best-pkging-practices.dbk:448
703 msgid ""
704 "Use common English so that the majority of readers can comprehend it.  Avoid "
705 "abbreviations, tech-speak and jargon when explaining changes that close "
706 "bugs, especially for bugs filed by users that did not strike you as "
707 "particularly technically savvy.  Be polite, don't swear."
708 msgstr ""
709
710 # type: Content of: <chapter><section><section><para>
711 #. type: Content of: <chapter><section><section><para>
712 #: best-pkging-practices.dbk:454
713 msgid ""
714 "It is sometimes desirable to prefix changelog entries with the names of the "
715 "files that were changed.  However, there's no need to explicitly list each "
716 "and every last one of the changed files, especially if the change was small "
717 "or repetitive.  You may use wildcards."
718 msgstr ""
719
720 # type: Content of: <chapter><section><section><para>
721 #. type: Content of: <chapter><section><section><para>
722 #: best-pkging-practices.dbk:460
723 msgid ""
724 "When referring to bugs, don't assume anything.  Say what the problem was, "
725 "how it was fixed, and append the closes: #nnnnn string.  See <xref linkend="
726 "\"upload-bugfix\"/> for more information."
727 msgstr ""
728
729 # type: Content of: <chapter><section><section><title>
730 #. type: Content of: <chapter><section><section><title>
731 #: best-pkging-practices.dbk:467
732 msgid "Common misconceptions about changelog entries"
733 msgstr ""
734
735 # type: Content of: <chapter><section><section><para>
736 #. type: Content of: <chapter><section><section><para>
737 #: best-pkging-practices.dbk:469
738 msgid ""
739 "The changelog entries should <emphasis role=\"strong\">not</emphasis> "
740 "document generic packaging issues (Hey, if you're looking for foo.conf, it's "
741 "in /etc/blah/.), since administrators and users are supposed to be at least "
742 "remotely acquainted with how such things are generally arranged on Debian "
743 "systems.  Do, however, mention if you change the location of a configuration "
744 "file."
745 msgstr ""
746
747 # type: Content of: <chapter><section><section><para>
748 #. type: Content of: <chapter><section><section><para>
749 #: best-pkging-practices.dbk:477
750 msgid ""
751 "The only bugs closed with a changelog entry should be those that are "
752 "actually fixed in the same package revision.  Closing unrelated bugs in the "
753 "changelog is bad practice.  See <xref linkend=\"upload-bugfix\"/> ."
754 msgstr ""
755
756 # type: Content of: <chapter><section><section><para>
757 #. type: Content of: <chapter><section><section><para>
758 #: best-pkging-practices.dbk:482
759 msgid ""
760 "The changelog entries should <emphasis role=\"strong\">not</emphasis> be "
761 "used for random discussion with bug reporters (I don't see segfaults when "
762 "starting foo with option bar; send in more info), general statements on "
763 "life, the universe and everything (sorry this upload took me so long, but I "
764 "caught the flu), or pleas for help (the bug list on this package is huge, "
765 "please lend me a hand).  Such things usually won't be noticed by their "
766 "target audience, but may annoy people who wish to read information about "
767 "actual changes in the package.  See <xref linkend=\"bug-answering\"/> for "
768 "more information on how to use the bug tracking system."
769 msgstr ""
770
771 # type: Content of: <chapter><section><section><para>
772 #. type: Content of: <chapter><section><section><para>
773 #: best-pkging-practices.dbk:493
774 msgid ""
775 "It is an old tradition to acknowledge bugs fixed in non-maintainer uploads "
776 "in the first changelog entry of the proper maintainer upload.  As we have "
777 "version tracking now, it is enough to keep the NMUed changelog entries and "
778 "just mention this fact in your own changelog entry."
779 msgstr ""
780
781 # type: Content of: <chapter><section><section><title>
782 #. type: Content of: <chapter><section><section><title>
783 #: best-pkging-practices.dbk:501
784 msgid "Common errors in changelog entries"
785 msgstr ""
786
787 # type: Content of: <chapter><section><section><para>
788 #. type: Content of: <chapter><section><section><para>
789 #: best-pkging-practices.dbk:503
790 msgid ""
791 "The following examples demonstrate some common errors or examples of bad "
792 "style in changelog entries."
793 msgstr ""
794
795 # type: Content of: <chapter><section><section><screen>
796 #. type: Content of: <chapter><section><section><screen>
797 #: best-pkging-practices.dbk:507
798 #, fuzzy, no-wrap
799 msgid "  * Fixed all outstanding bugs.\n"
800 msgstr ""
801 "\n"
802 "  * Fixed all outstanding bugs.\n"
803
804 # type: Content of: <chapter><section><section><para>
805 #. type: Content of: <chapter><section><section><para>
806 #: best-pkging-practices.dbk:510
807 msgid "This doesn't tell readers anything too useful, obviously."
808 msgstr ""
809
810 # type: Content of: <chapter><section><section><screen>
811 #. type: Content of: <chapter><section><section><screen>
812 #: best-pkging-practices.dbk:513
813 #, fuzzy, no-wrap
814 msgid "  * Applied patch from Jane Random.\n"
815 msgstr ""
816 "\n"
817 "  * Applied patch from Jane Random.\n"
818
819 # type: Content of: <chapter><section><section><para>
820 #. type: Content of: <chapter><section><section><para>
821 #: best-pkging-practices.dbk:516
822 msgid "What was the patch about?"
823 msgstr ""
824
825 # type: Content of: <chapter><section><section><screen>
826 #. type: Content of: <chapter><section><section><screen>
827 #: best-pkging-practices.dbk:519
828 #, fuzzy, no-wrap
829 msgid "  * Late night install target overhaul.\n"
830 msgstr ""
831 "\n"
832 "  * Late night install target overhaul.\n"
833
834 # type: Content of: <chapter><section><section><para>
835 #. type: Content of: <chapter><section><section><para>
836 #: best-pkging-practices.dbk:522
837 msgid ""
838 "Overhaul which accomplished what? Is the mention of late night supposed to "
839 "remind us that we shouldn't trust that code?"
840 msgstr ""
841
842 # type: Content of: <chapter><section><section><screen>
843 #. type: Content of: <chapter><section><section><screen>
844 #: best-pkging-practices.dbk:526
845 #, fuzzy, no-wrap
846 msgid "  * Fix vsync FU w/ ancient CRTs.\n"
847 msgstr ""
848 "\n"
849 "  * Fix vsync FU w/ ancient CRTs.\n"
850
851 # type: Content of: <chapter><section><section><para>
852 #. type: Content of: <chapter><section><section><para>
853 #: best-pkging-practices.dbk:529
854 msgid ""
855 "Too many acronyms, and it's not overly clear what the, uh, fsckup (oops, a "
856 "curse word!) was actually about, or how it was fixed."
857 msgstr ""
858
859 # type: Content of: <chapter><section><section><screen>
860 #. type: Content of: <chapter><section><section><screen>
861 #: best-pkging-practices.dbk:533
862 #, fuzzy, no-wrap
863 msgid "  * This is not a bug, closes: #nnnnnn.\n"
864 msgstr ""
865 "\n"
866 "  * This is not a bug, closes: #nnnnnn.\n"
867
868 # type: Content of: <chapter><section><section><para>
869 #. type: Content of: <chapter><section><section><para>
870 #: best-pkging-practices.dbk:536
871 msgid ""
872 "First of all, there's absolutely no need to upload the package to convey "
873 "this information; instead, use the bug tracking system.  Secondly, there's "
874 "no explanation as to why the report is not a bug."
875 msgstr ""
876
877 # type: Content of: <chapter><section><section><screen>
878 #. type: Content of: <chapter><section><section><screen>
879 #: best-pkging-practices.dbk:541
880 #, fuzzy, no-wrap
881 msgid "  * Has been fixed for ages, but I forgot to close; closes: #54321.\n"
882 msgstr ""
883 "\n"
884 "  * Has been fixed for ages, but I forgot to close; closes: #54321.\n"
885
886 # type: Content of: <chapter><section><section><para>
887 #. type: Content of: <chapter><section><section><para>
888 #: best-pkging-practices.dbk:544
889 msgid ""
890 "If for some reason you didn't mention the bug number in a previous changelog "
891 "entry, there's no problem, just close the bug normally in the BTS.  There's "
892 "no need to touch the changelog file, presuming the description of the fix is "
893 "already in (this applies to the fixes by the upstream authors/maintainers as "
894 "well, you don't have to track bugs that they fixed ages ago in your "
895 "changelog)."
896 msgstr ""
897
898 # type: Content of: <chapter><section><section><screen>
899 #. type: Content of: <chapter><section><section><screen>
900 #: best-pkging-practices.dbk:551
901 #, fuzzy, no-wrap
902 msgid "  * Closes: #12345, #12346, #15432\n"
903 msgstr ""
904 "\n"
905 "  * Closes: #12345, #12346, #15432\n"
906
907 # type: Content of: <chapter><section><section><para>
908 #. type: Content of: <chapter><section><section><para>
909 #: best-pkging-practices.dbk:554
910 msgid ""
911 "Where's the description? If you can't think of a descriptive message, start "
912 "by inserting the title of each different bug."
913 msgstr ""
914
915 # type: Content of: <chapter><section><section><title>
916 #. type: Content of: <chapter><section><section><title>
917 #: best-pkging-practices.dbk:560
918 msgid "Supplementing changelogs with NEWS.Debian files"
919 msgstr ""
920
921 # type: Content of: <chapter><section><section><para>
922 #. type: Content of: <chapter><section><section><para>
923 #: best-pkging-practices.dbk:562
924 msgid ""
925 "Important news about changes in a package can also be put in <filename> NEWS."
926 "Debian</filename> files.  The news will be displayed by tools like apt-"
927 "listchanges, before all the rest of the changelogs.  This is the preferred "
928 "means to let the user know about significant changes in a package.  It is "
929 "better than using debconf notes since it is less annoying and the user can "
930 "go back and refer to the <filename> NEWS.Debian</filename> file after the "
931 "install.  And it's better than listing major changes in <filename>README."
932 "Debian</filename>, since the user can easily miss such notes."
933 msgstr ""
934
935 # type: Content of: <chapter><section><section><para>
936 #. type: Content of: <chapter><section><section><para>
937 #: best-pkging-practices.dbk:573
938 msgid ""
939 "The file format is the same as a debian changelog file, but leave off the "
940 "asterisks and describe each news item with a full paragraph when necessary "
941 "rather than the more concise summaries that would go in a changelog.  It's a "
942 "good idea to run your file through <literal>dpkg-parsechangelog</literal> to "
943 "check its formatting as it will not be automatically checked during build as "
944 "the changelog is.  Here is an example of a real <filename>NEWS.Debian </"
945 "filename> file:"
946 msgstr ""
947
948 # type: Content of: <chapter><section><section><screen>
949 #. type: Content of: <chapter><section><section><screen>
950 #: best-pkging-practices.dbk:582
951 #, fuzzy, no-wrap
952 msgid ""
953 "cron (3.0pl1-74) unstable; urgency=low\n"
954 "\n"
955 "    The checksecurity script is no longer included with the cron package:\n"
956 "    it now has its own package, checksecurity. If you liked the\n"
957 "    functionality provided with that script, please install the new\n"
958 "    package.\n"
959 "\n"
960 " -- Steve Greenland &lt;stevegr@debian.org&gt;  Sat,  6 Sep 2003 17:15:03 -0500\n"
961 msgstr ""
962 "\n"
963 "cron (3.0pl1-74) unstable; urgency=low\n"
964 "\n"
965 "    The checksecurity script is no longer included with the cron package:\n"
966 "    it now has its own package, checksecurity. If you liked the\n"
967 "    functionality provided with that script, please install the new\n"
968 "    package.\n"
969 "\n"
970 " -- Steve Greenland &lt;stevegr@debian.org&gt;  Sat,  6 Sep 2003 17:15:03 -0500\n"
971
972 # type: Content of: <chapter><section><section><para>
973 #. type: Content of: <chapter><section><section><para>
974 #: best-pkging-practices.dbk:592
975 msgid ""
976 "The <filename>NEWS.Debian</filename> file is installed as <filename> /usr/"
977 "share/doc/<replaceable>package</replaceable>/NEWS.Debian.gz</filename>.  It "
978 "is compressed, and always has that name even in Debian native packages.  If "
979 "you use <literal>debhelper</literal>, <literal>dh_installchangelogs </"
980 "literal> will install <filename>debian/NEWS</filename> files for you."
981 msgstr ""
982
983 # type: Content of: <chapter><section><section><para>
984 #. type: Content of: <chapter><section><section><para>
985 #: best-pkging-practices.dbk:599
986 msgid ""
987 "Unlike changelog files, you need not update <filename>NEWS.Debian</filename> "
988 "files with every release.  Only update them if you have something "
989 "particularly newsworthy that user should know about.  If you have no news at "
990 "all, there's no need to ship a <filename>NEWS.Debian</filename> file in your "
991 "package.  No news is good news!"
992 msgstr ""
993
994 # type: Content of: <chapter><section><title>
995 #. type: Content of: <chapter><section><title>
996 #: best-pkging-practices.dbk:621
997 msgid "Best practices for maintainer scripts"
998 msgstr ""
999
1000 # type: Content of: <chapter><section><para>
1001 #. type: Content of: <chapter><section><para>
1002 #: best-pkging-practices.dbk:623
1003 msgid ""
1004 "Maintainer scripts include the files <filename>debian/postinst</filename>, "
1005 "<filename>debian/preinst</filename>, <filename>debian/prerm</filename> and "
1006 "<filename>debian/postrm</filename>.  These scripts take care of any package "
1007 "installation or deinstallation setup which isn't handled merely by the "
1008 "creation or removal of files and directories.  The following instructions "
1009 "supplement the <ulink url=\"&url-debian-policy;\">Debian Policy</ulink>."
1010 msgstr ""
1011
1012 # type: Content of: <chapter><section><para>
1013 #. type: Content of: <chapter><section><para>
1014 #: best-pkging-practices.dbk:631
1015 msgid ""
1016 "Maintainer scripts must be idempotent.  That means that you need to make "
1017 "sure nothing bad will happen if the script is called twice where it would "
1018 "usually be called once."
1019 msgstr ""
1020
1021 # type: Content of: <chapter><section><para>
1022 #. type: Content of: <chapter><section><para>
1023 #: best-pkging-practices.dbk:636
1024 msgid ""
1025 "Standard input and output may be redirected (e.g.  into pipes) for logging "
1026 "purposes, so don't rely on them being a tty."
1027 msgstr ""
1028
1029 # type: Content of: <chapter><section><para>
1030 #. type: Content of: <chapter><section><para>
1031 #: best-pkging-practices.dbk:640
1032 msgid ""
1033 "All prompting or interactive configuration should be kept to a minimum.  "
1034 "When it is necessary, you should use the <systemitem role=\"package"
1035 "\">debconf</systemitem> package for the interface.  Remember that prompting "
1036 "in any case can only be in the <literal>configure</literal> stage of the "
1037 "<filename>postinst</filename> script."
1038 msgstr ""
1039
1040 # type: Content of: <chapter><section><para>
1041 #. type: Content of: <chapter><section><para>
1042 #: best-pkging-practices.dbk:647
1043 msgid ""
1044 "Keep the maintainer scripts as simple as possible.  We suggest you use pure "
1045 "POSIX shell scripts.  Remember, if you do need any bash features, the "
1046 "maintainer script must have a bash shebang line.  POSIX shell or Bash are "
1047 "preferred to Perl, since they enable <systemitem role=\"package\">debhelper</"
1048 "systemitem> to easily add bits to the scripts."
1049 msgstr ""
1050
1051 # type: Content of: <chapter><section><para>
1052 #. type: Content of: <chapter><section><para>
1053 #: best-pkging-practices.dbk:654
1054 msgid ""
1055 "If you change your maintainer scripts, be sure to test package removal, "
1056 "double installation, and purging.  Be sure that a purged package is "
1057 "completely gone, that is, it must remove any files created, directly or "
1058 "indirectly, in any maintainer script."
1059 msgstr ""
1060
1061 # type: Content of: <chapter><section><para>
1062 #. type: Content of: <chapter><section><para>
1063 #: best-pkging-practices.dbk:660
1064 msgid ""
1065 "If you need to check for the existence of a command, you should use "
1066 "something like"
1067 msgstr ""
1068
1069 # type: Content of: <chapter><section><programlisting>
1070 #. type: Content of: <chapter><section><programlisting>
1071 #: best-pkging-practices.dbk:663
1072 #, no-wrap
1073 msgid "if [ -x /usr/sbin/install-docs ]; then ..."
1074 msgstr "if [ -x /usr/sbin/install-docs ]; then ..."
1075
1076 # type: Content of: <chapter><section><para>
1077 #. type: Content of: <chapter><section><para>
1078 #: best-pkging-practices.dbk:665
1079 msgid ""
1080 "If you don't wish to hard-code the path of a command in your maintainer "
1081 "script, the following POSIX-compliant shell function may help:"
1082 msgstr ""
1083
1084 # type: Content of: <chapter><section><para>
1085 #. type: Content of: <chapter><section><para>
1086 #: best-pkging-practices.dbk:670
1087 msgid ""
1088 "You can use this function to search <literal>$PATH</literal> for a command "
1089 "name, passed as an argument.  It returns true (zero) if the command was "
1090 "found, and false if not.  This is really the most portable way, since "
1091 "<literal>command -v</literal>, <command>type</command>, and <command>which</"
1092 "command> are not POSIX."
1093 msgstr ""
1094
1095 # type: Content of: <chapter><section><para>
1096 #. type: Content of: <chapter><section><para>
1097 #: best-pkging-practices.dbk:677
1098 msgid ""
1099 "While <command>which</command> is an acceptable alternative, since it is "
1100 "from the required <systemitem role=\"package\">debianutils</systemitem> "
1101 "package, it's not on the root partition.  That is, it's in <filename>/usr/"
1102 "bin</filename> rather than <filename>/bin</filename>, so one can't use it in "
1103 "scripts which are run before the <filename>/usr</filename> partition is "
1104 "mounted.  Most scripts won't have this problem, though."
1105 msgstr ""
1106
1107 # type: Content of: <chapter><section><title>
1108 #. type: Content of: <chapter><section><title>
1109 #: best-pkging-practices.dbk:687
1110 msgid ""
1111 "Configuration management with <systemitem role=\"package\">debconf</"
1112 "systemitem>"
1113 msgstr ""
1114
1115 # type: Content of: <chapter><section><para>
1116 #. type: Content of: <chapter><section><para>
1117 #: best-pkging-practices.dbk:689
1118 msgid ""
1119 "<systemitem role=\"package\">Debconf</systemitem> is a configuration "
1120 "management system which can be used by all the various packaging scripts "
1121 "(<filename>postinst</filename> mainly) to request feedback from the user "
1122 "concerning how to configure the package.  Direct user interactions must now "
1123 "be avoided in favor of <systemitem role=\"package\">debconf</systemitem> "
1124 "interaction.  This will enable non-interactive installations in the future."
1125 msgstr ""
1126
1127 # type: Content of: <chapter><section><para>
1128 #. type: Content of: <chapter><section><para>
1129 #: best-pkging-practices.dbk:697
1130 msgid ""
1131 "Debconf is a great tool but it is often poorly used.  Many common mistakes "
1132 "are listed in the <citerefentry> <refentrytitle>debconf-devel</"
1133 "refentrytitle> <manvolnum>7</manvolnum> </citerefentry> man page.  It is "
1134 "something that you must read if you decide to use debconf.  Also, we "
1135 "document some best practices here."
1136 msgstr ""
1137
1138 # type: Content of: <chapter><section><para>
1139 #. type: Content of: <chapter><section><para>
1140 #: best-pkging-practices.dbk:704
1141 msgid ""
1142 "These guidelines include some writing style and typography recommendations, "
1143 "general considerations about debconf usage as well as more specific "
1144 "recommendations for some parts of the distribution (the installation system "
1145 "for instance)."
1146 msgstr ""
1147
1148 # type: Content of: <chapter><section><section><title>
1149 #. type: Content of: <chapter><section><section><title>
1150 #: best-pkging-practices.dbk:710
1151 msgid "Do not abuse debconf"
1152 msgstr ""
1153
1154 # type: Content of: <chapter><section><section><para>
1155 #. type: Content of: <chapter><section><section><para>
1156 #: best-pkging-practices.dbk:712
1157 msgid ""
1158 "Since debconf appeared in Debian, it has been widely abused and several "
1159 "criticisms received by the Debian distribution come from debconf abuse with "
1160 "the need of answering a wide bunch of questions before getting any little "
1161 "thing installed."
1162 msgstr ""
1163
1164 # type: Content of: <chapter><section><section><para>
1165 #. type: Content of: <chapter><section><section><para>
1166 #: best-pkging-practices.dbk:718
1167 msgid ""
1168 "Keep usage notes to what they belong: the NEWS.Debian, or README.Debian "
1169 "file.  Only use notes for important notes which may directly affect the "
1170 "package usability.  Remember that notes will always block the install until "
1171 "confirmed or bother the user by email."
1172 msgstr ""
1173
1174 # type: Content of: <chapter><section><section><para>
1175 #. type: Content of: <chapter><section><section><para>
1176 #: best-pkging-practices.dbk:724
1177 msgid ""
1178 "Carefully choose the questions priorities in maintainer scripts.  See "
1179 "<citerefentry> <refentrytitle>debconf-devel</refentrytitle> <manvolnum>7</"
1180 "manvolnum> </citerefentry> for details about priorities.  Most questions "
1181 "should use medium and low priorities."
1182 msgstr ""
1183
1184 # type: Content of: <chapter><section><section><title>
1185 #. type: Content of: <chapter><section><section><title>
1186 #: best-pkging-practices.dbk:732
1187 msgid "General recommendations for authors and translators"
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:734
1193 msgid "Write correct English"
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:736
1199 msgid ""
1200 "Most Debian package maintainers are not native English speakers.  So, "
1201 "writing properly phrased templates may not be easy for them."
1202 msgstr ""
1203
1204 # type: Content of: <chapter><section><section><section><para>
1205 #. type: Content of: <chapter><section><section><section><para>
1206 #: best-pkging-practices.dbk:740
1207 msgid ""
1208 "Please use (and abuse) &email-debian-l10n-english; mailing list.  Have your "
1209 "templates proofread."
1210 msgstr ""
1211
1212 # type: Content of: <chapter><section><section><section><para>
1213 #. type: Content of: <chapter><section><section><section><para>
1214 #: best-pkging-practices.dbk:744
1215 msgid ""
1216 "Badly written templates give a poor image of your package, of your work...or "
1217 "even of Debian itself."
1218 msgstr ""
1219
1220 # type: Content of: <chapter><section><section><section><para>
1221 #. type: Content of: <chapter><section><section><section><para>
1222 #: best-pkging-practices.dbk:748
1223 msgid ""
1224 "Avoid technical jargon as much as possible.  If some terms sound common to "
1225 "you, they may be impossible to understand for others.  If you cannot avoid "
1226 "them, try to explain them (use the extended description).  When doing so, "
1227 "try to balance between verbosity and simplicity."
1228 msgstr ""
1229
1230 # type: Content of: <chapter><section><section><section><title>
1231 #. type: Content of: <chapter><section><section><section><title>
1232 #: best-pkging-practices.dbk:756
1233 msgid "Be kind to translators"
1234 msgstr ""
1235
1236 # type: Content of: <chapter><section><section><section><para>
1237 #. type: Content of: <chapter><section><section><section><para>
1238 #: best-pkging-practices.dbk:758
1239 msgid ""
1240 "Debconf templates may be translated.  Debconf, along with its sister package "
1241 "<command>po-debconf</command> offers a simple framework for getting "
1242 "templates translated by translation teams or even individuals."
1243 msgstr ""
1244
1245 # type: Content of: <chapter><section><section><section><para>
1246 #. type: Content of: <chapter><section><section><section><para>
1247 #: best-pkging-practices.dbk:763
1248 msgid ""
1249 "Please use gettext-based templates.  Install <systemitem role=\"package\">po-"
1250 "debconf</systemitem> on your development system and read its documentation "
1251 "(<literal>man po-debconf</literal> is a good start)."
1252 msgstr ""
1253
1254 #. type: Content of: <chapter><section><section><section><para>
1255 #: best-pkging-practices.dbk:768
1256 msgid ""
1257 "Avoid changing templates too often.  Changing templates text induces more "
1258 "work to translators which will get their translation fuzzied.  A fuzzy "
1259 "translation is a string for which the original changed since it was "
1260 "translated, therefore requiring some update by a translator to be usable.  "
1261 "When changes are small enough, the original translation is kept in PO files "
1262 "but marked as <literal>fuzzy</literal>."
1263 msgstr ""
1264
1265 #. type: Content of: <chapter><section><section><section><para>
1266 #: best-pkging-practices.dbk:776
1267 msgid ""
1268 "If you plan to do changes to your original templates, please use the "
1269 "notification system provided with the <systemitem role=\"package\">po-"
1270 "debconf</systemitem> package, namely the <command> podebconf-report-po</"
1271 "command>, to contact translators.  Most active translators are very "
1272 "responsive and getting their work included along with your modified "
1273 "templates will save you additional uploads.  If you use gettext-based "
1274 "templates, the translator's name and e-mail addresses are mentioned in the "
1275 "PO files headers and will be used by <command> podebconf-report-po</command>."
1276 msgstr ""
1277
1278 #. type: Content of: <chapter><section><section><section><para>
1279 #: best-pkging-practices.dbk:788
1280 msgid "A recommended use of that utility is:"
1281 msgstr ""
1282
1283 #. type: Content of: <chapter><section><section><section><programlisting>
1284 #: best-pkging-practices.dbk:790
1285 #, no-wrap
1286 msgid "cd debian/po &amp;&amp; podebconf-report-po --languageteam --withtranslators --call --deadline=\"+10 days\""
1287 msgstr ""
1288
1289 #. type: Content of: <chapter><section><section><section><para>
1290 #: best-pkging-practices.dbk:792
1291 msgid ""
1292 "This command will first synchronize the PO and POT files in debian/po with "
1293 "the templates files listed in <filename>debian/po/POTFILES.in</filename>.  "
1294 "Then, it will send a call for translation updates to the language team "
1295 "(mentioned in the <literal>Language-Team</literal> field of each PO file)  "
1296 "as well as the last translator (mentioned in <literal>Last-translator</"
1297 "literal>). Finally, it will also send a call for new translations, in the "
1298 "&email-debian-i18n; mailing list."
1299 msgstr ""
1300
1301 #. type: Content of: <chapter><section><section><section><para>
1302 #: best-pkging-practices.dbk:801
1303 msgid ""
1304 "Giving a deadline to translators is always appreciated, so that they can "
1305 "organize their work. Please remember that some translation teams have a "
1306 "formalized translate/review process and a delay lower than 10 days is "
1307 "considered as unreasonable. A shorter delay puts too much pressure on "
1308 "translation teams and should be kept for very minor changes."
1309 msgstr ""
1310
1311 # type: Content of: <chapter><section><section><section><para>
1312 #. type: Content of: <chapter><section><section><section><para>
1313 #: best-pkging-practices.dbk:808
1314 msgid ""
1315 "If in doubt, you may also contact the translation team for a given language "
1316 "(debian-l10n-xxxxx@&lists-host;), or the &email-debian-i18n; mailing list."
1317 msgstr ""
1318
1319 # type: Content of: <chapter><section><section><section><title>
1320 #. type: Content of: <chapter><section><section><section><title>
1321 #: best-pkging-practices.dbk:815
1322 msgid "Unfuzzy complete translations when correcting typos and spelling"
1323 msgstr ""
1324
1325 #. type: Content of: <chapter><section><section><section><para>
1326 #: best-pkging-practices.dbk:817
1327 msgid ""
1328 "When the text of a debconf template is corrected and you are <emphasis role="
1329 "\"strong\">sure</emphasis> that the change does <emphasis role=\"strong"
1330 "\">not</emphasis> affect translations, please be kind to translators and "
1331 "<emphasis>unfuzzy</emphasis> their translations."
1332 msgstr ""
1333
1334 # type: Content of: <chapter><section><section><section><para>
1335 #. type: Content of: <chapter><section><section><section><para>
1336 #: best-pkging-practices.dbk:823
1337 msgid ""
1338 "If you don't do so, the whole template will not be translated as long as a "
1339 "translator will send you an update."
1340 msgstr ""
1341
1342 #. type: Content of: <chapter><section><section><section><para>
1343 #: best-pkging-practices.dbk:827
1344 msgid ""
1345 "To <emphasis>unfuzzy</emphasis> translations, you can use two methods. The "
1346 "first method does <emphasis>preventive</emphasis> search and replace actions "
1347 "in the PO files. The latter uses <command>gettext</command> utilities to "
1348 "<emphasis>unfuzzy</emphasis> strings."
1349 msgstr ""
1350
1351 #. type: Content of: <chapter><section><section><section><para>
1352 #: best-pkging-practices.dbk:833
1353 msgid "<emphasis>Preventive unfuzzy</emphasis> method:"
1354 msgstr ""
1355
1356 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1357 #: best-pkging-practices.dbk:838
1358 msgid ""
1359 "Try finding a complete translation file <emphasis role=\"strong\"> before</"
1360 "emphasis> the change:"
1361 msgstr ""
1362
1363 # type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1364 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1365 #: best-pkging-practices.dbk:841 best-pkging-practices.dbk:911
1366 #, no-wrap
1367 msgid ""
1368 "for i in debian/po/*po; do echo -n $i: ; msgfmt -o /dev/null\n"
1369 "--statistics $i; done"
1370 msgstr ""
1371
1372 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1373 #: best-pkging-practices.dbk:844
1374 msgid ""
1375 "The file only showing <emphasis>translated</emphasis> items will be used as "
1376 "the reference file. If there is none (which should not happen if you take "
1377 "care to properly interact with translators), you should use the file with "
1378 "the most translated strings."
1379 msgstr ""
1380
1381 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1382 #: best-pkging-practices.dbk:852
1383 msgid ""
1384 "Identify the needed change. In this example, let's assume the change is "
1385 "about fixing a typo in the word <literal>typo</literal> which was "
1386 "inadvertently written as <literal>tpyo</literal>. Therefore, the change is "
1387 "<command>s/tpyo/typo</command>."
1388 msgstr ""
1389
1390 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1391 #: best-pkging-practices.dbk:860
1392 msgid ""
1393 "Check that this change is only applied to the place where you really intend "
1394 "to make it and <emphasis role=\"strong\">not</emphasis> in any other place "
1395 "where the original string is appropriate. This specifically applies to "
1396 "change in punctuation, for instance."
1397 msgstr ""
1398
1399 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1400 #: best-pkging-practices.dbk:868
1401 msgid ""
1402 "Modify all PO files by using <command>sed</command>. The use of that command "
1403 "is recommended over any text editor to guarantee that the files encoding "
1404 "will not be broken by the edit action."
1405 msgstr ""
1406
1407 # type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1408 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1409 #: best-pkging-practices.dbk:873
1410 #, fuzzy, no-wrap
1411 msgid ""
1412 "cd debian/po\n"
1413 "for i in *.po; do sed -i 's/tpyo/typo/g' $i; done\n"
1414 msgstr ""
1415 "\n"
1416 "cd debian/po\n"
1417 "for i in *.po; do sed -i 's/tpyo/typo/g' $i; done\n"
1418
1419 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1420 #: best-pkging-practices.dbk:879
1421 msgid "Change the debconf template file to fix the typo."
1422 msgstr ""
1423
1424 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1425 #: best-pkging-practices.dbk:884
1426 msgid "Run <command>debconf-updatepo</command>"
1427 msgstr ""
1428
1429 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1430 #: best-pkging-practices.dbk:889
1431 msgid ""
1432 "Check the <filename>foo.po</filename> reference file. Its statistics should "
1433 "not be changed:"
1434 msgstr ""
1435
1436 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1437 #: best-pkging-practices.dbk:893
1438 #, no-wrap
1439 msgid "msgfmt -o /dev/null --statistics debian/po/foo.po\n"
1440 msgstr ""
1441
1442 #. type: Content of: <chapter><section><section><section><para>
1443 #: best-pkging-practices.dbk:902
1444 msgid "Gettext utilities method:"
1445 msgstr ""
1446
1447 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1448 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1449 #: best-pkging-practices.dbk:907
1450 msgid ""
1451 "Put all incomplete PO files out of the way.  You can check the completeness "
1452 "by using (needs the <systemitem role=\"package\">gettext</systemitem> "
1453 "package installed):"
1454 msgstr ""
1455
1456 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1457 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1458 #: best-pkging-practices.dbk:916
1459 msgid ""
1460 "move all files which report either fuzzy strings to a temporary place.  "
1461 "Files which report no fuzzy strings (only translated and untranslated) will "
1462 "be kept in place."
1463 msgstr ""
1464
1465 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1466 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1467 #: best-pkging-practices.dbk:923
1468 msgid ""
1469 "now <emphasis role=\"strong\">and now only</emphasis>, modify the template "
1470 "for the typos and check again that translation are not impacted (typos, "
1471 "spelling errors, sometimes typographical corrections are usually OK)"
1472 msgstr ""
1473
1474 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1475 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1476 #: best-pkging-practices.dbk:930
1477 msgid ""
1478 "run <command>debconf-updatepo</command>.  This will fuzzy all strings you "
1479 "modified in translations.  You can see this by running the above again"
1480 msgstr ""
1481
1482 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1483 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1484 #: best-pkging-practices.dbk:936
1485 msgid "use the following command:"
1486 msgstr ""
1487
1488 # type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1489 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><programlisting>
1490 #: best-pkging-practices.dbk:938
1491 #, no-wrap
1492 msgid "for i in debian/po/*po; do msgattrib --output-file=$i --clear-fuzzy $i; done"
1493 msgstr ""
1494
1495 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1496 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1497 #: best-pkging-practices.dbk:942
1498 msgid ""
1499 "move back to debian/po the files which showed fuzzy strings in the first step"
1500 msgstr ""
1501
1502 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1503 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
1504 #: best-pkging-practices.dbk:947
1505 msgid "run <command>debconf-updatepo</command> again"
1506 msgstr ""
1507
1508 # type: Content of: <chapter><section><section><section><title>
1509 #. type: Content of: <chapter><section><section><section><title>
1510 #: best-pkging-practices.dbk:954
1511 msgid "Do not make assumptions about interfaces"
1512 msgstr ""
1513
1514 #. type: Content of: <chapter><section><section><section><para>
1515 #: best-pkging-practices.dbk:956
1516 msgid ""
1517 "Templates text should not make reference to widgets belonging to some "
1518 "debconf interfaces.  Sentences like <emphasis>If you answer Yes...</"
1519 "emphasis> have no meaning for users of graphical interfaces which use "
1520 "checkboxes for boolean questions."
1521 msgstr ""
1522
1523 # type: Content of: <chapter><section><section><section><para>
1524 #. type: Content of: <chapter><section><section><section><para>
1525 #: best-pkging-practices.dbk:961
1526 msgid ""
1527 "String templates should also avoid mentioning the default values in their "
1528 "description.  First, because this is redundant with the values seen by the "
1529 "users.  Also, because these default values may be different from the "
1530 "maintainer choices (for instance, when the debconf database was preseeded)."
1531 msgstr ""
1532
1533 # type: Content of: <chapter><section><section><section><para>
1534 #. type: Content of: <chapter><section><section><section><para>
1535 #: best-pkging-practices.dbk:967
1536 msgid ""
1537 "More generally speaking, try to avoid referring to user actions.  Just give "
1538 "facts."
1539 msgstr ""
1540
1541 # type: Content of: <chapter><section><section><section><title>
1542 #. type: Content of: <chapter><section><section><section><title>
1543 #: best-pkging-practices.dbk:973
1544 msgid "Do not use first person"
1545 msgstr ""
1546
1547 #. type: Content of: <chapter><section><section><section><para>
1548 #: best-pkging-practices.dbk:975
1549 msgid ""
1550 "You should avoid the use of first person (<emphasis>I will do this...</"
1551 "emphasis> or <emphasis>We recommend...</emphasis>).  The computer is not a "
1552 "person and the Debconf templates do not speak for the Debian developers.  "
1553 "You should use neutral construction.  Those of you who already wrote "
1554 "scientific publications, just write your templates like you would write a "
1555 "scientific paper.  However, try using active voice if still possible, like "
1556 "<emphasis>Enable this if ...</emphasis> instead of <emphasis>This can be "
1557 "enabled if...</emphasis>."
1558 msgstr ""
1559
1560 # type: Content of: <chapter><section><section><section><title>
1561 #. type: Content of: <chapter><section><section><section><title>
1562 #: best-pkging-practices.dbk:985
1563 msgid "Be gender neutral"
1564 msgstr ""
1565
1566 # type: Content of: <chapter><section><section><section><para>
1567 #. type: Content of: <chapter><section><section><section><para>
1568 #: best-pkging-practices.dbk:987
1569 msgid ""
1570 "The world is made of men and women.  Please use gender-neutral constructions "
1571 "in your writing."
1572 msgstr ""
1573
1574 # type: Content of: <chapter><section><section><title>
1575 #. type: Content of: <chapter><section><section><title>
1576 #: best-pkging-practices.dbk:995
1577 msgid "Templates fields definition"
1578 msgstr ""
1579
1580 # type: Content of: <chapter><section><section><para>
1581 #. type: Content of: <chapter><section><section><para>
1582 #: best-pkging-practices.dbk:997
1583 msgid ""
1584 "This part gives some information which is mostly taken from the "
1585 "<citerefentry> <refentrytitle>debconf-devel</refentrytitle> <manvolnum>7</"
1586 "manvolnum> </citerefentry> manual page."
1587 msgstr ""
1588
1589 # type: Content of: <chapter><section><section><section><title>
1590 #. type: Content of: <chapter><section><section><section><title>
1591 #: best-pkging-practices.dbk:1002
1592 msgid "Type"
1593 msgstr ""
1594
1595 # type: Content of: <chapter><section><section><section><section><title>
1596 #. type: Content of: <chapter><section><section><section><section><title>
1597 #: best-pkging-practices.dbk:1004
1598 msgid "string:"
1599 msgstr ""
1600
1601 # type: Content of: <chapter><section><section><section><section><para>
1602 #. type: Content of: <chapter><section><section><section><section><para>
1603 #: best-pkging-practices.dbk:1006
1604 msgid ""
1605 "Results in a free-form input field that the user can type any string into."
1606 msgstr ""
1607
1608 # type: Content of: <chapter><section><section><section><section><title>
1609 #. type: Content of: <chapter><section><section><section><section><title>
1610 #: best-pkging-practices.dbk:1011
1611 msgid "password:"
1612 msgstr ""
1613
1614 # type: Content of: <chapter><section><section><section><section><para>
1615 #. type: Content of: <chapter><section><section><section><section><para>
1616 #: best-pkging-practices.dbk:1013
1617 msgid ""
1618 "Prompts the user for a password.  Use this with caution; be aware that the "
1619 "password the user enters will be written to debconf's database.  You should "
1620 "probably clean that value out of the database as soon as is possible."
1621 msgstr ""
1622
1623 # type: Content of: <chapter><section><section><section><section><title>
1624 #. type: Content of: <chapter><section><section><section><section><title>
1625 #: best-pkging-practices.dbk:1020
1626 msgid "boolean:"
1627 msgstr ""
1628
1629 # type: Content of: <chapter><section><section><section><section><para>
1630 #. type: Content of: <chapter><section><section><section><section><para>
1631 #: best-pkging-practices.dbk:1022
1632 msgid ""
1633 "A true/false choice.  Remember: true/false, <emphasis role=\"strong\">not "
1634 "yes/no</emphasis>..."
1635 msgstr ""
1636
1637 # type: Content of: <chapter><section><section><section><section><title>
1638 #. type: Content of: <chapter><section><section><section><section><title>
1639 #: best-pkging-practices.dbk:1028
1640 msgid "select:"
1641 msgstr ""
1642
1643 #. type: Content of: <chapter><section><section><section><section><para>
1644 #: best-pkging-practices.dbk:1030
1645 msgid ""
1646 "A choice between one of a number of values.  The choices must be specified "
1647 "in a field named 'Choices'.  Separate the possible values with commas and "
1648 "spaces, like this: <literal>Choices: yes, no, maybe</literal>."
1649 msgstr ""
1650
1651 #. type: Content of: <chapter><section><section><section><section><para>
1652 #: best-pkging-practices.dbk:1035
1653 msgid ""
1654 "If choices are translatable strings, the 'Choices' field may be marked as "
1655 "translatable by using <literal>__Choices</literal>. The double underscore "
1656 "will split out each choice in a separate string."
1657 msgstr ""
1658
1659 #. type: Content of: <chapter><section><section><section><section><para>
1660 #: best-pkging-practices.dbk:1040
1661 msgid ""
1662 "The <command>po-debconf</command> system also offers interesting "
1663 "possibilities to only mark <emphasis role=\"strong\">some</emphasis> choices "
1664 "as translatable.  Example:"
1665 msgstr ""
1666
1667 #. type: Content of: <chapter><section><section><section><section><programlisting>
1668 #: best-pkging-practices.dbk:1045
1669 #, no-wrap
1670 msgid ""
1671 "Template: foo/bar\n"
1672 "Type: Select\n"
1673 "#flag:translate:3\n"
1674 "__Choices: PAL, SECAM, Other\n"
1675 "_Description: TV standard:\n"
1676 " Please choose the TV standard used in your country.\n"
1677 msgstr ""
1678
1679 #. type: Content of: <chapter><section><section><section><section><para>
1680 #: best-pkging-practices.dbk:1053
1681 msgid ""
1682 "In that example, only the 'Other' string is translatable while others are "
1683 "acronyms that should not be translated. The above allows only 'Other' to be "
1684 "included in PO and POT files."
1685 msgstr ""
1686
1687 #. type: Content of: <chapter><section><section><section><section><para>
1688 #: best-pkging-practices.dbk:1058
1689 msgid ""
1690 "The debconf templates flag system offers many such possibilities. The "
1691 "<citerefentry> <refentrytitle>po-debconf</refentrytitle> <manvolnum>7</"
1692 "manvolnum> </citerefentry> manual page lists all these possibilities."
1693 msgstr ""
1694
1695 # type: Content of: <chapter><section><section><section><section><title>
1696 #. type: Content of: <chapter><section><section><section><section><title>
1697 #: best-pkging-practices.dbk:1066
1698 msgid "multiselect:"
1699 msgstr ""
1700
1701 # type: Content of: <chapter><section><section><section><section><para>
1702 #. type: Content of: <chapter><section><section><section><section><para>
1703 #: best-pkging-practices.dbk:1068
1704 msgid ""
1705 "Like the select data type, except the user can choose any number of items "
1706 "from the choices list (or chose none of them)."
1707 msgstr ""
1708
1709 # type: Content of: <chapter><section><section><section><section><title>
1710 #. type: Content of: <chapter><section><section><section><section><title>
1711 #: best-pkging-practices.dbk:1074
1712 msgid "note:"
1713 msgstr ""
1714
1715 # type: Content of: <chapter><section><section><section><section><para>
1716 #. type: Content of: <chapter><section><section><section><section><para>
1717 #: best-pkging-practices.dbk:1076
1718 msgid ""
1719 "Rather than being a question per se, this datatype indicates a note that can "
1720 "be displayed to the user.  It should be used only for important notes that "
1721 "the user really should see, since debconf will go to great pains to make "
1722 "sure the user sees it; halting the install for them to press a key, and even "
1723 "mailing the note to them in some cases."
1724 msgstr ""
1725
1726 # type: Content of: <chapter><section><section><section><section><title>
1727 #. type: Content of: <chapter><section><section><section><section><title>
1728 #: best-pkging-practices.dbk:1085
1729 msgid "text:"
1730 msgstr ""
1731
1732 # type: Content of: <chapter><section><section><section><section><para>
1733 #. type: Content of: <chapter><section><section><section><section><para>
1734 #: best-pkging-practices.dbk:1087
1735 msgid "This type is now considered obsolete: don't use it."
1736 msgstr ""
1737
1738 # type: Content of: <chapter><section><section><section><section><title>
1739 #. type: Content of: <chapter><section><section><section><section><title>
1740 #: best-pkging-practices.dbk:1092
1741 msgid "error:"
1742 msgstr ""
1743
1744 # type: Content of: <chapter><section><section><section><section><para>
1745 #. type: Content of: <chapter><section><section><section><section><para>
1746 #: best-pkging-practices.dbk:1094
1747 msgid ""
1748 "This type is designed to handle error messages.  It is mostly similar to the "
1749 "note type.  Frontends may present it differently (for instance, the dialog "
1750 "frontend of cdebconf draws a red screen instead of the usual blue one)."
1751 msgstr ""
1752
1753 # type: Content of: <chapter><section><section><section><section><para>
1754 #. type: Content of: <chapter><section><section><section><section><para>
1755 #: best-pkging-practices.dbk:1099
1756 msgid ""
1757 "It is recommended to use this type for any message that needs user attention "
1758 "for a correction of any kind."
1759 msgstr ""
1760
1761 # type: Content of: <chapter><section><section><section><title>
1762 #. type: Content of: <chapter><section><section><section><title>
1763 #: best-pkging-practices.dbk:1107
1764 msgid "Description: short and extended description"
1765 msgstr ""
1766
1767 # type: Content of: <chapter><section><section><section><para>
1768 #. type: Content of: <chapter><section><section><section><para>
1769 #: best-pkging-practices.dbk:1109
1770 msgid ""
1771 "Template descriptions have two parts: short and extended.  The short "
1772 "description is in the Description: line of the template."
1773 msgstr ""
1774
1775 # type: Content of: <chapter><section><section><section><para>
1776 #. type: Content of: <chapter><section><section><section><para>
1777 #: best-pkging-practices.dbk:1113
1778 msgid ""
1779 "The short description should be kept short (50 characters or so) so that it "
1780 "may be accomodated by most debconf interfaces.  Keeping it short also helps "
1781 "translators, as usually translations tend to end up being longer than the "
1782 "original."
1783 msgstr ""
1784
1785 # type: Content of: <chapter><section><section><section><para>
1786 #. type: Content of: <chapter><section><section><section><para>
1787 #: best-pkging-practices.dbk:1119
1788 msgid ""
1789 "The short description should be able to stand on its own.  Some interfaces "
1790 "do not show the long description by default, or only if the user explicitely "
1791 "asks for it or even do not show it at all.  Avoid things like What do you "
1792 "want to do?"
1793 msgstr ""
1794
1795 # type: Content of: <chapter><section><section><section><para>
1796 #. type: Content of: <chapter><section><section><section><para>
1797 #: best-pkging-practices.dbk:1125
1798 msgid ""
1799 "The short description does not necessarily have to be a full sentence.  This "
1800 "is part of the keep it short and efficient recommendation."
1801 msgstr ""
1802
1803 # type: Content of: <chapter><section><section><section><para>
1804 #. type: Content of: <chapter><section><section><section><para>
1805 #: best-pkging-practices.dbk:1129
1806 msgid ""
1807 "The extended description should not repeat the short description word for "
1808 "word.  If you can't think up a long description, then first, think some "
1809 "more.  Post to debian-devel.  Ask for help.  Take a writing class! That "
1810 "extended description is important.  If after all that you still can't come "
1811 "up with anything, leave it blank."
1812 msgstr ""
1813
1814 # type: Content of: <chapter><section><section><section><para>
1815 #. type: Content of: <chapter><section><section><section><para>
1816 #: best-pkging-practices.dbk:1136
1817 msgid ""
1818 "The extended description should use complete sentences.  Paragraphs should "
1819 "be kept short for improved readability.  Do not mix two ideas in the same "
1820 "paragraph but rather use another paragraph."
1821 msgstr ""
1822
1823 # type: Content of: <chapter><section><section><section><para>
1824 #. type: Content of: <chapter><section><section><section><para>
1825 #: best-pkging-practices.dbk:1141
1826 msgid ""
1827 "Don't be too verbose.  User tend to ignore too long screens.  20 lines are "
1828 "by experience a border you shouldn't cross, because that means that in the "
1829 "classical dialog interface, people will need to scroll, and lot of people "
1830 "just don't do that."
1831 msgstr ""
1832
1833 # type: Content of: <chapter><section><section><section><para>
1834 #. type: Content of: <chapter><section><section><section><para>
1835 #: best-pkging-practices.dbk:1147
1836 msgid ""
1837 "The extended description should <emphasis role=\"strong\">never</emphasis> "
1838 "include a question."
1839 msgstr ""
1840
1841 # type: Content of: <chapter><section><section><section><para>
1842 #. type: Content of: <chapter><section><section><section><para>
1843 #: best-pkging-practices.dbk:1151
1844 msgid ""
1845 "For specific rules depending on templates type (string, boolean, etc.), "
1846 "please read below."
1847 msgstr ""
1848
1849 # type: Content of: <chapter><section><section><section><title>
1850 #. type: Content of: <chapter><section><section><section><title>
1851 #: best-pkging-practices.dbk:1157
1852 msgid "Choices"
1853 msgstr ""
1854
1855 # type: Content of: <chapter><section><section><section><para>
1856 #. type: Content of: <chapter><section><section><section><para>
1857 #: best-pkging-practices.dbk:1159
1858 msgid ""
1859 "This field should be used for Select and Multiselect types.  It contains the "
1860 "possible choices which will be presented to users.  These choices should be "
1861 "separated by commas."
1862 msgstr ""
1863
1864 # type: Content of: <chapter><section><section><section><title>
1865 #. type: Content of: <chapter><section><section><section><title>
1866 #: best-pkging-practices.dbk:1166
1867 msgid "Default"
1868 msgstr ""
1869
1870 # type: Content of: <chapter><section><section><section><para>
1871 #. type: Content of: <chapter><section><section><section><para>
1872 #: best-pkging-practices.dbk:1168
1873 msgid ""
1874 "This field is optional.  It contains the default answer for string, select "
1875 "and multiselect templates.  For multiselect templates, it may contain a "
1876 "comma-separated list of choices."
1877 msgstr ""
1878
1879 # type: Content of: <chapter><section><section><title>
1880 #. type: Content of: <chapter><section><section><title>
1881 #: best-pkging-practices.dbk:1177
1882 msgid "Templates fields specific style guide"
1883 msgstr ""
1884
1885 # type: Content of: <chapter><section><section><section><title>
1886 #. type: Content of: <chapter><section><section><section><title>
1887 #: best-pkging-practices.dbk:1179
1888 msgid "Type field"
1889 msgstr ""
1890
1891 # type: Content of: <chapter><section><section><section><para>
1892 #. type: Content of: <chapter><section><section><section><para>
1893 #: best-pkging-practices.dbk:1181
1894 msgid ""
1895 "No specific indication except: use the appropriate type by referring to the "
1896 "previous section."
1897 msgstr ""
1898
1899 # type: Content of: <chapter><section><section><section><title>
1900 #. type: Content of: <chapter><section><section><section><title>
1901 #: best-pkging-practices.dbk:1187
1902 msgid "Description field"
1903 msgstr ""
1904
1905 # type: Content of: <chapter><section><section><section><para>
1906 #. type: Content of: <chapter><section><section><section><para>
1907 #: best-pkging-practices.dbk:1189
1908 msgid ""
1909 "Below are specific instructions for properly writing the Description (short "
1910 "and extended) depending on the template type."
1911 msgstr ""
1912
1913 # type: Content of: <chapter><section><section><section><section><title>
1914 #. type: Content of: <chapter><section><section><section><section><title>
1915 #: best-pkging-practices.dbk:1193
1916 msgid "String/password templates"
1917 msgstr ""
1918
1919 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1920 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1921 #: best-pkging-practices.dbk:1197
1922 msgid ""
1923 "The short description is a prompt and <emphasis role=\"strong\">not</"
1924 "emphasis> a title.  Avoid question style prompts (IP Address?) in favour of "
1925 "opened prompts (IP address:).  The use of colons is recommended."
1926 msgstr ""
1927
1928 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1929 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1930 #: best-pkging-practices.dbk:1204
1931 msgid ""
1932 "The extended description is a complement to the short description.  In the "
1933 "extended part, explain what is being asked, rather than ask the same "
1934 "question again using longer words.  Use complete sentences.  Terse writing "
1935 "style is strongly discouraged."
1936 msgstr ""
1937
1938 # type: Content of: <chapter><section><section><section><section><title>
1939 #. type: Content of: <chapter><section><section><section><section><title>
1940 #: best-pkging-practices.dbk:1214
1941 msgid "Boolean templates"
1942 msgstr ""
1943
1944 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1945 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1946 #: best-pkging-practices.dbk:1218
1947 msgid ""
1948 "The short description should be phrased in the form of a question which "
1949 "should be kept short and should generally end with a question mark.  Terse "
1950 "writing style is permitted and even encouraged if the question is rather "
1951 "long (remember that translations are often longer than original versions)"
1952 msgstr ""
1953
1954 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1955 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1956 #: best-pkging-practices.dbk:1226
1957 msgid ""
1958 "Again, please avoid referring to specific interface widgets.  A common "
1959 "mistake for such templates is if you answer Yes-type constructions."
1960 msgstr ""
1961
1962 # type: Content of: <chapter><section><section><section><section><title>
1963 #. type: Content of: <chapter><section><section><section><section><title>
1964 #: best-pkging-practices.dbk:1234
1965 msgid "Select/Multiselect"
1966 msgstr ""
1967
1968 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1969 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1970 #: best-pkging-practices.dbk:1238
1971 msgid ""
1972 "The short description is a prompt and <emphasis role=\"strong\">not</"
1973 "emphasis> a title.  Do <emphasis role=\"strong\">not</emphasis> use useless "
1974 "Please choose...  constructions.  Users are clever enough to figure out they "
1975 "have to choose something...:)"
1976 msgstr ""
1977
1978 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1979 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1980 #: best-pkging-practices.dbk:1246
1981 msgid ""
1982 "The extended description will complete the short description.  It may refer "
1983 "to the available choices.  It may also mention that the user may choose more "
1984 "than one of the available choices, if the template is a multiselect one "
1985 "(although the interface often makes this clear)."
1986 msgstr ""
1987
1988 # type: Content of: <chapter><section><section><section><section><title>
1989 #. type: Content of: <chapter><section><section><section><section><title>
1990 #: best-pkging-practices.dbk:1256
1991 msgid "Notes"
1992 msgstr ""
1993
1994 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1995 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
1996 #: best-pkging-practices.dbk:1260
1997 msgid "The short description should be considered to be a *title*."
1998 msgstr ""
1999
2000 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
2001 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
2002 #: best-pkging-practices.dbk:1265
2003 msgid ""
2004 "The extended description is what will be displayed as a more detailed "
2005 "explanation of the note.  Phrases, no terse writing style."
2006 msgstr ""
2007
2008 # type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
2009 #. type: Content of: <chapter><section><section><section><section><itemizedlist><listitem><para>
2010 #: best-pkging-practices.dbk:1271
2011 msgid ""
2012 "<emphasis role=\"strong\">Do not abuse debconf.</emphasis> Notes are the "
2013 "most common way to abuse debconf.  As written in debconf-devel manual page: "
2014 "it's best to use them only for warning about very serious problems.  The "
2015 "NEWS.Debian or README.Debian files are the appropriate location for a lot of "
2016 "notes.  If, by reading this, you consider converting your Note type "
2017 "templates to entries in NEWS/Debian or README.Debian, plus consider keeping "
2018 "existing translations for the future."
2019 msgstr ""
2020
2021 # type: Content of: <chapter><section><section><section><title>
2022 #. type: Content of: <chapter><section><section><section><title>
2023 #: best-pkging-practices.dbk:1286
2024 msgid "Choices field"
2025 msgstr ""
2026
2027 # type: Content of: <chapter><section><section><section><para>
2028 #. type: Content of: <chapter><section><section><section><para>
2029 #: best-pkging-practices.dbk:1288
2030 msgid ""
2031 "If the Choices are likely to change often, please consider using the "
2032 "__Choices trick.  This will split each individual choice into a single "
2033 "string, which will considerably help translators for doing their work."
2034 msgstr ""
2035
2036 # type: Content of: <chapter><section><section><section><title>
2037 #. type: Content of: <chapter><section><section><section><title>
2038 #: best-pkging-practices.dbk:1295 best-pkging-practices.dbk:1333
2039 msgid "Default field"
2040 msgstr ""
2041
2042 # type: Content of: <chapter><section><section><section><para>
2043 #. type: Content of: <chapter><section><section><section><para>
2044 #: best-pkging-practices.dbk:1297
2045 msgid ""
2046 "If the default value, for a select template, is likely to vary depending on "
2047 "the user language (for instance, if the choice is a language choice), please "
2048 "use the _DefaultChoice trick."
2049 msgstr ""
2050
2051 #. type: Content of: <chapter><section><section><section><para>
2052 #: best-pkging-practices.dbk:1302
2053 msgid ""
2054 "This special field allow translators to put the most appropriate choice "
2055 "according to their own language.  It will become the default choice when "
2056 "their language is used while your own mentioned Default Choice will be used "
2057 "when using English."
2058 msgstr ""
2059
2060 # type: Content of: <chapter><section><section><section><para>
2061 #. type: Content of: <chapter><section><section><section><para>
2062 #: best-pkging-practices.dbk:1308
2063 msgid "Example, taken from the geneweb package templates:"
2064 msgstr ""
2065
2066 #. type: Content of: <chapter><section><section><section><screen>
2067 #: best-pkging-practices.dbk:1311
2068 #, no-wrap
2069 msgid ""
2070 "Template: geneweb/lang\n"
2071 "Type: select\n"
2072 "__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"
2073 "# This is the default choice. Translators may put their own language here\n"
2074 "# instead of the default.\n"
2075 "# WARNING : you MUST use the ENGLISH FORM of your language\n"
2076 "# For instance, the french translator will need to put French (fr) here.\n"
2077 "_DefaultChoice: English (en)[ translators, please see comment in PO files]\n"
2078 "_Description: Geneweb default language:\n"
2079 msgstr ""
2080
2081 # type: Content of: <chapter><section><section><section><para>
2082 #. type: Content of: <chapter><section><section><section><para>
2083 #: best-pkging-practices.dbk:1322
2084 msgid ""
2085 "Note the use of brackets which allow internal comments in debconf fields.  "
2086 "Also note the use of comments which will show up in files the translators "
2087 "will work with."
2088 msgstr ""
2089
2090 # type: Content of: <chapter><section><section><section><para>
2091 #. type: Content of: <chapter><section><section><section><para>
2092 #: best-pkging-practices.dbk:1327
2093 msgid ""
2094 "The comments are needed as the DefaultChoice trick is a bit confusing: the "
2095 "translators may put their own choice"
2096 msgstr ""
2097
2098 # type: Content of: <chapter><section><section><section><para>
2099 #. type: Content of: <chapter><section><section><section><para>
2100 #: best-pkging-practices.dbk:1335
2101 msgid ""
2102 "Do NOT use empty default field.  If you don't want to use default values, do "
2103 "not use Default at all."
2104 msgstr ""
2105
2106 # type: Content of: <chapter><section><section><section><para>
2107 #. type: Content of: <chapter><section><section><section><para>
2108 #: best-pkging-practices.dbk:1339
2109 msgid ""
2110 "If you use po-debconf (and you <emphasis role=\"strong\">should</emphasis>, "
2111 "see 2.2), consider making this field translatable, if you think it may be "
2112 "translated."
2113 msgstr ""
2114
2115 # type: Content of: <chapter><section><section><section><para>
2116 #. type: Content of: <chapter><section><section><section><para>
2117 #: best-pkging-practices.dbk:1344
2118 msgid ""
2119 "If the default value may vary depending on language/country (for instance "
2120 "the default value for a language choice), consider using the special "
2121 "_DefaultChoice type documented in <citerefentry> <refentrytitle>po-debconf</"
2122 "refentrytitle> <manvolnum>7</manvolnum> </citerefentry>)."
2123 msgstr ""
2124
2125 # type: Content of: <chapter><section><title>
2126 #. type: Content of: <chapter><section><title>
2127 #: best-pkging-practices.dbk:1356
2128 msgid "Internationalization"
2129 msgstr ""
2130
2131 # type: Content of: <chapter><section><section><title>
2132 #. type: Content of: <chapter><section><section><title>
2133 #: best-pkging-practices.dbk:1358
2134 msgid "Handling debconf translations"
2135 msgstr ""
2136
2137 # type: Content of: <chapter><section><section><para>
2138 #. type: Content of: <chapter><section><section><para>
2139 #: best-pkging-practices.dbk:1360
2140 msgid ""
2141 "Like porters, translators have a difficult task.  They work on many packages "
2142 "and must collaborate with many different maintainers.  Moreover, most of the "
2143 "time, they are not native English speakers, so you may need to be "
2144 "particularly patient with them."
2145 msgstr ""
2146
2147 # type: Content of: <chapter><section><section><para>
2148 #. type: Content of: <chapter><section><section><para>
2149 #: best-pkging-practices.dbk:1366
2150 msgid ""
2151 "The goal of <systemitem role=\"package\">debconf</systemitem> was to make "
2152 "packages configuration easier for maintainers and for users.  Originally, "
2153 "translation of debconf templates was handled with <command>debconf-"
2154 "mergetemplate</command>.  However, that technique is now deprecated; the "
2155 "best way to accomplish <systemitem role=\"package\">debconf</systemitem> "
2156 "internationalization is by using the <systemitem role=\"package\">po-"
2157 "debconf</systemitem> package.  This method is easier both for maintainer and "
2158 "translators; transition scripts are provided."
2159 msgstr ""
2160
2161 # type: Content of: <chapter><section><section><para>
2162 #. type: Content of: <chapter><section><section><para>
2163 #: best-pkging-practices.dbk:1376
2164 msgid ""
2165 "Using <systemitem role=\"package\">po-debconf</systemitem>, the translation "
2166 "is stored in <filename>po</filename> files (drawing from <command>gettext</"
2167 "command> translation techniques).  Special template files contain the "
2168 "original messages and mark which fields are translatable.  When you change "
2169 "the value of a translatable field, by calling <command>debconf-updatepo</"
2170 "command>, the translation is marked as needing attention from the "
2171 "translators.  Then, at build time, the <command>dh_installdebconf</command> "
2172 "program takes care of all the needed magic to add the template along with "
2173 "the up-to-date translations into the binary packages.  Refer to the "
2174 "<citerefentry> <refentrytitle>po-debconf</refentrytitle> <manvolnum>7</"
2175 "manvolnum> </citerefentry> manual page for details."
2176 msgstr ""
2177
2178 # type: Content of: <chapter><section><section><title>
2179 #. type: Content of: <chapter><section><section><title>
2180 #: best-pkging-practices.dbk:1392
2181 msgid "Internationalized documentation"
2182 msgstr ""
2183
2184 # type: Content of: <chapter><section><section><para>
2185 #. type: Content of: <chapter><section><section><para>
2186 #: best-pkging-practices.dbk:1394
2187 msgid ""
2188 "Internationalizing documentation is crucial for users, but a lot of labor.  "
2189 "There's no way to eliminate all that work, but you can make things easier "
2190 "for translators."
2191 msgstr ""
2192
2193 # type: Content of: <chapter><section><section><para>
2194 #. type: Content of: <chapter><section><section><para>
2195 #: best-pkging-practices.dbk:1399
2196 msgid ""
2197 "If you maintain documentation of any size, its easier for translators if "
2198 "they have access to a source control system.  That lets translators see the "
2199 "differences between two versions of the documentation, so, for instance, "
2200 "they can see what needs to be retranslated.  It is recommended that the "
2201 "translated documentation maintain a note about what source control revision "
2202 "the translation is based on.  An interesting system is provided by <ulink "
2203 "url=\"&url-i18n-doc-check;\">doc-check</ulink> in the <systemitem role="
2204 "\"package\">boot-floppies</systemitem> package, which shows an overview of "
2205 "the translation status for any given language, using structured comments for "
2206 "the current revision of the file to be translated and, for a translated "
2207 "file, the revision of the original file the translation is based on.  You "
2208 "might wish to adapt and provide that in your CVS area."
2209 msgstr ""
2210
2211 # type: Content of: <chapter><section><section><para>
2212 #. type: Content of: <chapter><section><section><para>
2213 #: best-pkging-practices.dbk:1413
2214 msgid ""
2215 "If you maintain XML or SGML documentation, we suggest that you isolate any "
2216 "language-independent information and define those as entities in a separate "
2217 "file which is included by all the different translations.  This makes it "
2218 "much easier, for instance, to keep URLs up to date across multiple files."
2219 msgstr ""
2220
2221 # type: Content of: <chapter><section><title>
2222 #. type: Content of: <chapter><section><title>
2223 #: best-pkging-practices.dbk:1423
2224 msgid "Common packaging situations"
2225 msgstr ""
2226
2227 # type: Content of: <chapter><section><section><title>
2228 #. type: Content of: <chapter><section><section><title>
2229 #: best-pkging-practices.dbk:1434
2230 msgid "Packages using <command>autoconf</command>/<command>automake</command>"
2231 msgstr ""
2232
2233 # type: Content of: <chapter><section><section><para>
2234 #. type: Content of: <chapter><section><section><para>
2235 #: best-pkging-practices.dbk:1436
2236 msgid ""
2237 "Keeping <command>autoconf</command>'s <filename>config.sub</filename> and "
2238 "<filename>config.guess</filename> files up to date is critical for porters, "
2239 "especially on more volatile architectures.  Some very good packaging "
2240 "practices for any package using <command>autoconf</command> and/or "
2241 "<command>automake</command> have been synthesized in &file-bpp-autotools; "
2242 "from the <systemitem role=\"package\">autotools-dev</systemitem> package.  "
2243 "You're strongly encouraged to read this file and to follow the given "
2244 "recommendations."
2245 msgstr ""
2246
2247 # type: Content of: <chapter><section><section><title>
2248 #. type: Content of: <chapter><section><section><title>
2249 #: best-pkging-practices.dbk:1448
2250 msgid "Libraries"
2251 msgstr ""
2252
2253 # type: Content of: <chapter><section><section><para>
2254 #. type: Content of: <chapter><section><section><para>
2255 #: best-pkging-practices.dbk:1450
2256 msgid ""
2257 "Libraries are always difficult to package for various reasons.  The policy "
2258 "imposes many constraints to ease their maintenance and to make sure upgrades "
2259 "are as simple as possible when a new upstream version comes out.  Breakage "
2260 "in a library can result in dozens of dependent packages breaking."
2261 msgstr ""
2262
2263 # type: Content of: <chapter><section><section><para>
2264 #. type: Content of: <chapter><section><section><para>
2265 #: best-pkging-practices.dbk:1456
2266 msgid ""
2267 "Good practices for library packaging have been grouped in <ulink url=\"&url-"
2268 "libpkg-guide;\">the library packaging guide</ulink>."
2269 msgstr ""
2270
2271 # type: Content of: <chapter><section><section><title>
2272 #. type: Content of: <chapter><section><section><title>
2273 #: best-pkging-practices.dbk:1463
2274 msgid "Documentation"
2275 msgstr ""
2276
2277 # type: Content of: <chapter><section><section><para>
2278 #. type: Content of: <chapter><section><section><para>
2279 #: best-pkging-practices.dbk:1465
2280 msgid ""
2281 "Be sure to follow the <ulink url=\"&url-debian-policy;ch-docs.html\">Policy "
2282 "on documentation</ulink>."
2283 msgstr ""
2284
2285 # type: Content of: <chapter><section><section><para>
2286 #. type: Content of: <chapter><section><section><para>
2287 #: best-pkging-practices.dbk:1470
2288 msgid ""
2289 "If your package contains documentation built from XML or SGML, we recommend "
2290 "you not ship the XML or SGML source in the binary package(s).  If users want "
2291 "the source of the documentation, they should retrieve the source package."
2292 msgstr ""
2293
2294 # type: Content of: <chapter><section><section><para>
2295 #. type: Content of: <chapter><section><section><para>
2296 #: best-pkging-practices.dbk:1475
2297 msgid ""
2298 "Policy specifies that documentation should be shipped in HTML format.  We "
2299 "also recommend shipping documentation in PDF and plain text format if "
2300 "convenient and if output of reasonable quality is possible.  However, it is "
2301 "generally not appropriate to ship plain text versions of documentation whose "
2302 "source format is HTML."
2303 msgstr ""
2304
2305 # type: Content of: <chapter><section><section><para>
2306 #. type: Content of: <chapter><section><section><para>
2307 #: best-pkging-practices.dbk:1482
2308 msgid ""
2309 "Major shipped manuals should register themselves with <systemitem role="
2310 "\"package\">doc-base</systemitem> on installation.  See the <systemitem role="
2311 "\"package\">doc-base</systemitem> package documentation for more information."
2312 msgstr ""
2313
2314 # type: Content of: <chapter><section><section><title>
2315 #. type: Content of: <chapter><section><section><title>
2316 #: best-pkging-practices.dbk:1490
2317 msgid "Specific types of packages"
2318 msgstr ""
2319
2320 # type: Content of: <chapter><section><section><para>
2321 #. type: Content of: <chapter><section><section><para>
2322 #: best-pkging-practices.dbk:1492
2323 msgid ""
2324 "Several specific types of packages have special sub-policies and "
2325 "corresponding packaging rules and practices:"
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:1498
2331 msgid ""
2332 "Perl related packages have a <ulink url=\"&url-perl-policy;\">Perl policy</"
2333 "ulink>, some examples of packages following that policy are <systemitem role="
2334 "\"package\">libdbd-pg-perl</systemitem> (binary perl module) or <systemitem "
2335 "role=\"package\">libmldbm-perl</systemitem> (arch independent perl module)."
2336 msgstr ""
2337
2338 # type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2339 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2340 #: best-pkging-practices.dbk:1507
2341 msgid ""
2342 "Python related packages have their python policy; see &file-python-policy; "
2343 "in the <systemitem role=\"package\">python</systemitem> package."
2344 msgstr ""
2345
2346 # type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2347 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2348 #: best-pkging-practices.dbk:1514
2349 msgid ""
2350 "Emacs related packages have the <ulink url=\"&url-emacs-policy;\">emacs "
2351 "policy</ulink>."
2352 msgstr ""
2353
2354 # type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2355 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2356 #: best-pkging-practices.dbk:1521
2357 msgid ""
2358 "Java related packages have their <ulink url=\"&url-java-policy;\">java "
2359 "policy</ulink>."
2360 msgstr ""
2361
2362 # type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2363 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2364 #: best-pkging-practices.dbk:1528
2365 msgid ""
2366 "Ocaml related packages have their own policy, found in &file-ocaml-policy; "
2367 "from the <systemitem role=\"package\">ocaml</systemitem> package.  A good "
2368 "example is the <systemitem role=\"package\">camlzip</systemitem> source "
2369 "package."
2370 msgstr ""
2371
2372 # type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2373 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2374 #: best-pkging-practices.dbk:1536
2375 msgid ""
2376 "Packages providing XML or SGML DTDs should conform to the recommendations "
2377 "found in the <systemitem role=\"package\">sgml-base-doc</systemitem> package."
2378 msgstr ""
2379
2380 # type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2381 #. type: Content of: <chapter><section><section><itemizedlist><listitem><para>
2382 #: best-pkging-practices.dbk:1542
2383 msgid ""
2384 "Lisp packages should register themselves with <systemitem role=\"package"
2385 "\">common-lisp-controller</systemitem>, about which see &file-lisp-"
2386 "controller;."
2387 msgstr ""
2388
2389 # type: Content of: <chapter><section><section><title>
2390 #. type: Content of: <chapter><section><section><title>
2391 #: best-pkging-practices.dbk:1572
2392 msgid "Architecture-independent data"
2393 msgstr "アーキテクチャ非依存のデータ"
2394
2395 # type: Content of: <chapter><section><section><para>
2396 #. type: Content of: <chapter><section><section><para>
2397 #: best-pkging-practices.dbk:1574
2398 msgid ""
2399 "It is not uncommon to have a large amount of architecture-independent data "
2400 "packaged with a program.  For example, audio files, a collection of icons, "
2401 "wallpaper patterns, or other graphic files.  If the size of this data is "
2402 "negligible compared to the size of the rest of the package, it's probably "
2403 "best to keep it all in a single package."
2404 msgstr ""
2405
2406 # type: Content of: <chapter><section><section><para>
2407 #. type: Content of: <chapter><section><section><para>
2408 #: best-pkging-practices.dbk:1581
2409 msgid ""
2410 "However, if the size of the data is considerable, consider splitting it out "
2411 "into a separate, architecture-independent package (_all.deb).  By doing "
2412 "this, you avoid needless duplication of the same data into eleven or more ."
2413 "debs, one per each architecture.  While this adds some extra overhead into "
2414 "the <filename>Packages</filename> files, it saves a lot of disk space on "
2415 "Debian mirrors.  Separating out architecture-independent data also reduces "
2416 "processing time of <command>lintian</command> (see <xref linkend=\"tools-lint"
2417 "\"/> ) when run over the entire Debian archive."
2418 msgstr ""
2419
2420 # type: Content of: <chapter><section><section><title>
2421 #. type: Content of: <chapter><section><section><title>
2422 #: best-pkging-practices.dbk:1593
2423 msgid "Needing a certain locale during build"
2424 msgstr ""
2425
2426 # type: Content of: <chapter><section><section><para>
2427 #. type: Content of: <chapter><section><section><para>
2428 #: best-pkging-practices.dbk:1595
2429 msgid ""
2430 "If you need a certain locale during build, you can create a temporary file "
2431 "via this trick:"
2432 msgstr ""
2433
2434 # type: Content of: <chapter><section><section><para>
2435 #. type: Content of: <chapter><section><section><para>
2436 #: best-pkging-practices.dbk:1599
2437 msgid ""
2438 "If you set <varname>LOCPATH</varname> to the equivalent of <filename>/usr/"
2439 "lib/locale</filename>, and <varname>LC_ALL</varname> to the name of the "
2440 "locale you generate, you should get what you want without being root.  "
2441 "Something like this:"
2442 msgstr ""
2443
2444 # type: Content of: <chapter><section><section><screen>
2445 #. type: Content of: <chapter><section><section><screen>
2446 #: best-pkging-practices.dbk:1604
2447 #, fuzzy, no-wrap
2448 msgid ""
2449 "LOCALE_PATH=debian/tmpdir/usr/lib/locale\n"
2450 "LOCALE_NAME=en_IN\n"
2451 "LOCALE_CHARSET=UTF-8\n"
2452 "\n"
2453 "mkdir -p $LOCALE_PATH\n"
2454 "localedef -i $LOCALE_NAME.$LOCALE_CHARSET -f $LOCALE_CHARSET $LOCALE_PATH/$LOCALE_NAME.$LOCALE_CHARSET\n"
2455 "\n"
2456 "# Using the locale\n"
2457 "LOCPATH=$LOCALE_PATH LC_ALL=$LOCALE_NAME.$LOCALE_CHARSET date\n"
2458 msgstr ""
2459 "\n"
2460 "LOCALE_PATH=debian/tmpdir/usr/lib/locale\n"
2461 "LOCALE_NAME=en_IN\n"
2462 "LOCALE_CHARSET=UTF-8\n"
2463 "\n"
2464 "mkdir -p $LOCALE_PATH\n"
2465 "localedef -i $LOCALE_NAME.$LOCALE_CHARSET -f $LOCALE_CHARSET $LOCALE_PATH/$LOCALE_NAME.$LOCALE_CHARSET\n"
2466 "\n"
2467 "# locale を使う\n"
2468 "LOCPATH=$LOCALE_PATH LC_ALL=$LOCALE_NAME.$LOCALE_CHARSET date\n"
2469
2470 # type: Content of: <chapter><section><section><title>
2471 #. type: Content of: <chapter><section><section><title>
2472 #: best-pkging-practices.dbk:1617
2473 msgid "Make transition packages deborphan compliant"
2474 msgstr ""
2475
2476 # type: Content of: <chapter><section><section><para>
2477 #. type: Content of: <chapter><section><section><para>
2478 #: best-pkging-practices.dbk:1619
2479 msgid ""
2480 "Deborphan is a program for helping users to detect which packages can safely "
2481 "be removed from the system, i.e.  the ones that have no packages depending "
2482 "on them.  The default operation is to search only within the libs and "
2483 "oldlibs sections, to hunt down unused libraries.  But when passed the right "
2484 "argument, it tries to catch other useless packages."
2485 msgstr ""
2486
2487 # type: Content of: <chapter><section><section><para>
2488 #. type: Content of: <chapter><section><section><para>
2489 #: best-pkging-practices.dbk:1626
2490 msgid ""
2491 "For example, with <literal>--guess-dummy</literal>, <command>deborphan</"
2492 "command> tries to search all transitional packages which were needed for "
2493 "upgrade but which can now safely be removed.  For that, it looks for the "
2494 "string dummy or transitional in their short description."
2495 msgstr ""
2496
2497 # type: Content of: <chapter><section><section><para>
2498 #. type: Content of: <chapter><section><section><para>
2499 #: best-pkging-practices.dbk:1633
2500 msgid ""
2501 "So, when you are creating such a package, please make sure to add this text "
2502 "to your short description.  If you are looking for examples, just run: "
2503 "<command>apt-cache search .|grep dummy</command> or <command>apt-cache "
2504 "search .|grep transitional</command>."
2505 msgstr ""
2506
2507 # type: Content of: <chapter><section><section><title>
2508 #. type: Content of: <chapter><section><section><title>
2509 #: best-pkging-practices.dbk:1641
2510 msgid "Best practices for <filename>orig.tar.gz</filename> files"
2511 msgstr ""
2512
2513 # type: Content of: <chapter><section><section><para>
2514 #. type: Content of: <chapter><section><section><para>
2515 #: best-pkging-practices.dbk:1643
2516 msgid ""
2517 "There are two kinds of original source tarballs: Pristine source and "
2518 "repackaged upstream source."
2519 msgstr ""
2520
2521 # type: Content of: <chapter><section><section><section><title>
2522 #. type: Content of: <chapter><section><section><section><title>
2523 #: best-pkging-practices.dbk:1647
2524 msgid "Pristine source"
2525 msgstr ""
2526
2527 #. type: Content of: <chapter><section><section><section><para><footnote><para>
2528 #: best-pkging-practices.dbk:1651
2529 msgid ""
2530 "We cannot prevent upstream authors from changing the tarball they distribute "
2531 "without also incrementing the version number, so there can be no guarantee "
2532 "that a pristine tarball is identical to what upstream <emphasis>currently</"
2533 "emphasis> distributing at any point in time.  All that can be expected is "
2534 "that it is identical to something that upstream once <emphasis>did</"
2535 "emphasis> distribute.  If a difference arises later (say, if upstream "
2536 "notices that he wasn't using maximal compression in his original "
2537 "distribution and then re-<command>gzip</command>s it), that's just too bad.  "
2538 "Since there is no good way to upload a new <literal>.orig.tar.gz</literal> "
2539 "for the same version, there is not even any point in treating this situation "
2540 "as a bug."
2541 msgstr ""
2542
2543 #. type: Content of: <chapter><section><section><section><para>
2544 #: best-pkging-practices.dbk:1649
2545 msgid ""
2546 "The defining characteristic of a pristine source tarball is that the "
2547 "<literal>.orig.tar.gz</literal> file is byte-for-byte identical to a tarball "
2548 "officially distributed by the upstream author.  <placeholder type=\"footnote"
2549 "\" id=\"0\"/> This makes it possible to use checksums to easily verify that "
2550 "all changes between Debian's version and upstream's are contained in the "
2551 "Debian diff.  Also, if the original source is huge, upstream authors and "
2552 "others who already have the upstream tarball can save download time if they "
2553 "want to inspect your packaging in detail."
2554 msgstr ""
2555
2556 # type: Content of: <chapter><section><section><section><para>
2557 #. type: Content of: <chapter><section><section><section><para>
2558 #: best-pkging-practices.dbk:1669
2559 msgid ""
2560 "There is no universally accepted guidelines that upstream authors follow "
2561 "regarding to the directory structure inside their tarball, but <command>dpkg-"
2562 "source</command> is nevertheless able to deal with most upstream tarballs as "
2563 "pristine source.  Its strategy is equivalent to the following:"
2564 msgstr ""
2565
2566 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2567 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2568 #: best-pkging-practices.dbk:1677
2569 msgid "It unpacks the tarball in an empty temporary directory by doing"
2570 msgstr ""
2571
2572 # type: Content of: <chapter><section><section><section><orderedlist><listitem><screen>
2573 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><screen>
2574 #: best-pkging-practices.dbk:1680
2575 #, fuzzy, no-wrap
2576 msgid "zcat path/to/&lt;packagename&gt;_&lt;upstream-version&gt;.orig.tar.gz | tar xf -\n"
2577 msgstr ""
2578 "\n"
2579 "zcat path/to/&lt;packagename&gt;_&lt;upstream-version&gt;.orig.tar.gz | tar xf -\n"
2580
2581 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2582 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2583 #: best-pkging-practices.dbk:1685
2584 msgid ""
2585 "If, after this, the temporary directory contains nothing but one directory "
2586 "and no other files, <command>dpkg-source</command> renames that directory to "
2587 "<literal>&lt;packagename&gt;-&lt;upstream-version&gt;(.orig)</literal>.  The "
2588 "name of the top-level directory in the tarball does not matter, and is "
2589 "forgotten."
2590 msgstr ""
2591
2592 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2593 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2594 #: best-pkging-practices.dbk:1694
2595 msgid ""
2596 "Otherwise, the upstream tarball must have been packaged without a common top-"
2597 "level directory (shame on the upstream author!).  In this case, "
2598 "<command>dpkg-source</command> renames the temporary directory "
2599 "<emphasis>itself</emphasis> to <literal>&lt;packagename&gt;-&lt;upstream-"
2600 "version&gt;(.orig)</literal>."
2601 msgstr ""
2602
2603 # type: Content of: <chapter><section><section><section><title>
2604 #. type: Content of: <chapter><section><section><section><title>
2605 #: best-pkging-practices.dbk:1705
2606 msgid "Repackaged upstream source"
2607 msgstr "upstream のソースをパッケージしなおす"
2608
2609 # type: Content of: <chapter><section><section><section><para>
2610 #. type: Content of: <chapter><section><section><section><para>
2611 #: best-pkging-practices.dbk:1707
2612 msgid ""
2613 "You <emphasis role=\"strong\">should</emphasis> upload packages with a "
2614 "pristine source tarball if possible, but there are various reasons why it "
2615 "might not be possible.  This is the case if upstream does not distribute the "
2616 "source as gzipped tar at all, or if upstream's tarball contains non-DFSG-"
2617 "free material that you must remove before uploading."
2618 msgstr ""
2619
2620 # type: Content of: <chapter><section><section><section><para>
2621 #. type: Content of: <chapter><section><section><section><para>
2622 #: best-pkging-practices.dbk:1714
2623 msgid ""
2624 "In these cases the developer must construct a suitable <literal>.orig.tar.gz "
2625 "</literal> file himself.  We refer to such a tarball as a repackaged "
2626 "upstream source.  Note that a repackaged upstream source is different from a "
2627 "Debian-native package.  A repackaged source still comes with Debian-specific "
2628 "changes in a separate <literal>.diff.gz</literal> and still has a version "
2629 "number composed of <literal>&lt;upstream-version&gt;</literal> and "
2630 "<literal>&lt;debian-revision&gt;</literal>."
2631 msgstr ""
2632
2633 # type: Content of: <chapter><section><section><section><para>
2634 #. type: Content of: <chapter><section><section><section><para>
2635 #: best-pkging-practices.dbk:1723
2636 msgid ""
2637 "There may be cases where it is desirable to repackage the source even though "
2638 "upstream distributes a <literal>.tar.gz</literal> that could in principle be "
2639 "used in its pristine form.  The most obvious is if <emphasis>significant</"
2640 "emphasis> space savings can be achieved by recompressing the tar archive or "
2641 "by removing genuinely useless cruft from the upstream archive.  Use your own "
2642 "discretion here, but be prepared to defend your decision if you repackage "
2643 "source that could have been pristine."
2644 msgstr ""
2645
2646 # type: Content of: <chapter><section><section><section><para>
2647 #. type: Content of: <chapter><section><section><section><para>
2648 #: best-pkging-practices.dbk:1732
2649 msgid "A repackaged <literal>.orig.tar.gz</literal>"
2650 msgstr ""
2651
2652 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2653 #: best-pkging-practices.dbk:1737
2654 msgid ""
2655 "<emphasis role=\"strong\">must</emphasis> be documented in the resulting "
2656 "source package.  Detailed information on how the repackaged source was "
2657 "obtained, and on how this can be reproduced must be provided in "
2658 "<filename>debian/copyright</filename>.  It is also a good idea to provide a "
2659 "<literal>get-orig-source</literal> target in your <filename>debian/rules</"
2660 "filename> file that repeats the process, as described in the Policy Manual, "
2661 "<ulink url=\"&url-debian-policy;ch-source.html#s-debianrules\">Main building "
2662 "script: debian/rules</ulink>."
2663 msgstr ""
2664
2665 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para><footnote><para>
2666 #: best-pkging-practices.dbk:1752
2667 msgid ""
2668 "As a special exception, if the omission of non-free files would lead to the "
2669 "source failing to build without assistance from the Debian diff, it might be "
2670 "appropriate to instead edit the files, omitting only the non-free parts of "
2671 "them, and/or explain the situation in a README.source file in the root of "
2672 "the source tree.  But in that case please also urge the upstream author to "
2673 "make the non-free components easier seperable from the rest of the source."
2674 msgstr ""
2675
2676 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2677 #: best-pkging-practices.dbk:1750
2678 msgid ""
2679 "<emphasis role=\"strong\">should not</emphasis> contain any file that does "
2680 "not come from the upstream author(s), or whose contents has been changed by "
2681 "you.  <placeholder type=\"footnote\" id=\"0\"/>"
2682 msgstr ""
2683
2684 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2685 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2686 #: best-pkging-practices.dbk:1763
2687 msgid ""
2688 "<emphasis role=\"strong\">should</emphasis>, except where impossible for "
2689 "legal reasons, preserve the entire building and portablility infrastructure "
2690 "provided by the upstream author.  For example, it is not a sufficient reason "
2691 "for omitting a file that it is used only when building on MS-DOS.  "
2692 "Similarly, a Makefile provided by upstream should not be omitted even if the "
2693 "first thing your <filename>debian/rules</filename> does is to overwrite it "
2694 "by running a configure script."
2695 msgstr ""
2696
2697 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2698 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2699 #: best-pkging-practices.dbk:1772
2700 msgid ""
2701 "(<emphasis>Rationale:</emphasis> It is common for Debian users who need to "
2702 "build software for non-Debian platforms to fetch the source from a Debian "
2703 "mirror rather than trying to locate a canonical upstream distribution point)."
2704 msgstr ""
2705
2706 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2707 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2708 #: best-pkging-practices.dbk:1779
2709 msgid ""
2710 "<emphasis role=\"strong\">should</emphasis> use <literal>&lt;packagename&gt;-"
2711 "&lt;upstream-version&gt;.orig</literal> as the name of the top-level "
2712 "directory in its tarball.  This makes it possible to distinguish pristine "
2713 "tarballs from repackaged ones."
2714 msgstr ""
2715
2716 # type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2717 #. type: Content of: <chapter><section><section><section><orderedlist><listitem><para>
2718 #: best-pkging-practices.dbk:1787
2719 msgid ""
2720 "<emphasis role=\"strong\">should</emphasis> be gzipped with maximal "
2721 "compression."
2722 msgstr ""
2723
2724 # type: Content of: <chapter><section><section><section><para>
2725 #. type: Content of: <chapter><section><section><section><para>
2726 #: best-pkging-practices.dbk:1792
2727 msgid ""
2728 "The canonical way to meet the latter two points is to let <literal>dpkg-"
2729 "source -b</literal> construct the repackaged tarball from an unpacked "
2730 "directory."
2731 msgstr ""
2732
2733 # type: Content of: <chapter><section><section><section><title>
2734 #. type: Content of: <chapter><section><section><section><title>
2735 #: best-pkging-practices.dbk:1798
2736 msgid "Changing binary files in <literal>diff.gz</literal>"
2737 msgstr ""
2738
2739 # type: Content of: <chapter><section><section><section><para><footnote><para>
2740 #. type: Content of: <chapter><section><section><section><para><footnote><para>
2741 #: best-pkging-practices.dbk:1807
2742 msgid ""
2743 "The file should have a name that makes it clear which binary file it "
2744 "encodes.  Usually, some postfix indicating the encoding should be appended "
2745 "to the original filename.  Note that you don't need to depend on <systemitem "
2746 "role=\"package\">sharutils</systemitem> to get the <command>uudecode</"
2747 "command> program if you use <command>perl</command>'s <literal>pack</"
2748 "literal> function.  The code could look like"
2749 msgstr ""
2750
2751 #. type: Content of: <chapter><section><section><section><para><footnote>
2752 #: best-pkging-practices.dbk:1815
2753 msgid "&example-uu;"
2754 msgstr ""
2755
2756 #. type: Content of: <chapter><section><section><section><para>
2757 #: best-pkging-practices.dbk:1800
2758 msgid ""
2759 "Sometimes it is necessary to change binary files contained in the original "
2760 "tarball, or to add binary files that are not in it.  If this is done by "
2761 "simply copying the files into the debianized source tree, <command>dpkg-"
2762 "source</command> will not be able to handle this.  On the other hand, "
2763 "according to the guidelines given above, you cannot include such a changed "
2764 "binary file in a repackaged <filename>orig.tar.gz</filename>.  Instead, "
2765 "include the file in the <filename>debian</filename> directory in "
2766 "<command>uuencode</command>d (or similar) form <placeholder type=\"footnote"
2767 "\" id=\"0\"/>.  The file would then be decoded and copied to its place "
2768 "during the build process.  Thus the change will be visible quite easy."
2769 msgstr ""
2770
2771 # type: Content of: <chapter><section><section><section><para>
2772 #. type: Content of: <chapter><section><section><section><para>
2773 #: best-pkging-practices.dbk:1821
2774 msgid ""
2775 "Some packages use <command>dbs</command> to manage patches to their upstream "
2776 "source, and always create a new <literal>orig.tar.gz</literal> file that "
2777 "contains the real <literal>orig.tar.gz</literal> in its toplevel directory.  "
2778 "This is questionable with respect to the preference for pristine source.  On "
2779 "the other hand, it is easy to modify or add binary files in this case: Just "
2780 "put them into the newly created <literal>orig.tar.gz</literal> file, besides "
2781 "the real one, and copy them to the right place during the build process."
2782 msgstr ""
2783
2784 # type: Content of: <chapter><section><section><title>
2785 #. type: Content of: <chapter><section><section><title>
2786 #: best-pkging-practices.dbk:1834
2787 msgid "Best practices for debug packages"
2788 msgstr ""
2789
2790 # type: Content of: <chapter><section><section><para>
2791 #. type: Content of: <chapter><section><section><para>
2792 #: best-pkging-practices.dbk:1836
2793 msgid ""
2794 "A debug package is a package with a name ending in -dbg, that contains "
2795 "additional information that gdb can use.  Since Debian binaries are stripped "
2796 "by default, debugging information, including function names and line "
2797 "numbers, is otherwise not available when running gdb on Debian binaries.  "
2798 "Debug packages allow users who need this additional debugging information to "
2799 "install it, without bloating a regular system with the information."
2800 msgstr ""
2801
2802 # type: Content of: <chapter><section><section><para>
2803 #. type: Content of: <chapter><section><section><para>
2804 #: best-pkging-practices.dbk:1844
2805 msgid ""
2806 "It is up to a package's maintainer whether to create a debug package or "
2807 "not.  Maintainers are encouraged to create debug packages for library "
2808 "packages, since this can aid in debugging many programs linked to a "
2809 "library.  In general, debug packages do not need to be added for all "
2810 "programs; doing so would bloat the archive.  But if a maintainer finds that "
2811 "users often need a debugging version of a program, it can be worthwhile to "
2812 "make a debug package for it.  Programs that are core infrastructure, such as "
2813 "apache and the X server are also good candidates for debug packages."
2814 msgstr ""
2815
2816 # type: Content of: <chapter><section><section><para>
2817 #. type: Content of: <chapter><section><section><para>
2818 #: best-pkging-practices.dbk:1854
2819 msgid ""
2820 "Some debug packages may contain an entire special debugging build of a "
2821 "library or other binary, but most of them can save space and build time by "
2822 "instead containing separated debugging symbols that gdb can find and load on "
2823 "the fly when debugging a program or library.  The convention in Debian is to "
2824 "keep these symbols in <filename>/usr/lib/debug/<replaceable>path</"
2825 "replaceable></filename>, where <replaceable>path</replaceable> is the path "
2826 "to the executable or library.  For example, debugging symbols for <filename>/"
2827 "usr/bin/foo</filename> go in <filename>/usr/lib/debug/usr/bin/foo</"
2828 "filename>, and debugging symbols for <filename>/usr/lib/libfoo.so.1</"
2829 "filename> go in <filename>/usr/lib/debug/usr/lib/libfoo.so.1</filename>."
2830 msgstr ""
2831
2832 # type: Content of: <chapter><section><section><para>
2833 #. type: Content of: <chapter><section><section><para>
2834 #: best-pkging-practices.dbk:1866
2835 msgid ""
2836 "The debugging symbols can be extracted from an object file using <command> "
2837 "objcopy --only-keep-debug</command>.  Then the object file can be stripped, "
2838 "and <command>objcopy --add-gnu-debuglink</command> used to specify the path "
2839 "to the debugging symbol file.  <citerefentry> <refentrytitle>objcopy</"
2840 "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> explains in detail "
2841 "how this works."
2842 msgstr ""
2843
2844 # type: Content of: <chapter><section><section><para>
2845 #. type: Content of: <chapter><section><section><para>
2846 #: best-pkging-practices.dbk:1874
2847 msgid ""
2848 "The <command>dh_strip</command> command in debhelper supports creating debug "
2849 "packages, and can take care of using <command>objcopy</command> to separate "
2850 "out the debugging symbols for you.  If your package uses debhelper, all you "
2851 "need to do is call <command>dh_strip --dbg-package=libfoo-dbg</command>, and "
2852 "add an entry to <filename>debian/control</filename> for the debug package."
2853 msgstr ""
2854
2855 #. type: Content of: <chapter><section><section><para>
2856 #: best-pkging-practices.dbk:1881
2857 msgid ""
2858 "Note that the debug package should depend on the package that it provides "
2859 "debugging symbols for, and this dependency should be versioned.  For example:"
2860 msgstr ""
2861
2862 # type: Content of: <chapter><section><section><screen>
2863 #. type: Content of: <chapter><section><section><screen>
2864 #: best-pkging-practices.dbk:1885
2865 #, fuzzy, no-wrap
2866 msgid "Depends: libfoo (= ${binary:Version})\n"
2867 msgstr ""
2868 "\n"
2869 "Depends: libfoo (= ${binary:Version})\n"