| 10 |
Abstract: This document provides an overview of the TDeb format, TDeb |
Abstract: This document provides an overview of the TDeb format, TDeb |
| 11 |
design and usage. This specification should be considered as a work in |
design and usage. This specification should be considered as a work in |
| 12 |
progress. |
progress. |
| 13 |
Source: http://svn.debian.org/viewsvn/dep/web/deps/dep4.mdwn?revision=45&view=markup |
Source: http://svn.debian.org/viewsvn/dep/web/deps/dep4.mdwn?view=markup |
| 14 |
|
Version 0.0.3 |
| 15 |
|
|
| 16 |
[[!toc levels=2]] |
[[!toc levels=2]] |
| 17 |
|
|
| 36 |
3. Translators should have a common interface for getting updates into |
3. Translators should have a common interface for getting updates into |
| 37 |
Debian (possibly with automated TDeb generation after i18n team review). |
Debian (possibly with automated TDeb generation after i18n team review). |
| 38 |
|
|
|
## Version 0.0.2 |
|
|
|
|
| 39 |
## Copyright © 2008 |
## Copyright © 2008 |
| 40 |
|
|
| 41 |
* Neil Williams <email>codehelp@debian.org</email>, |
* Neil Williams <email>codehelp@debian.org</email>, |
| 59 |
|
|
| 60 |
## Summary |
## Summary |
| 61 |
The tdeb binary package format is a variation of the deb binary |
The tdeb binary package format is a variation of the deb binary |
| 62 |
package format. It has the same structure as deb, but the (single) data member |
package format. It has the same structure as deb, but the (single) data |
| 63 |
is replaced by bzip2-compressed members for each LOCALE_ROOT supported. |
member is replaced by bzip2-compressed members for each LOCALE_ROOT |
| 64 |
|
supported. |
| 65 |
|
|
| 66 |
|
## Locale-root members |
| 67 |
|
|
| 68 |
|
The new locale root data members are designed to support easier |
| 69 |
|
management of the translations, including allowing |
| 70 |
|
users to only install the translations that are needed for one |
| 71 |
|
particular installation. |
| 72 |
|
|
| 73 |
|
e.g. a standard .deb contains debian-binary, control.tar.gz and |
| 74 |
|
data.tar.gz whereas a typical TDeb could contain: |
| 75 |
|
|
| 76 |
|
$ ar -t ../pilot-qof-tdeb_0.1.7-1_all.tdeb |
| 77 |
|
debian-binary |
| 78 |
|
control.tar.gz |
| 79 |
|
t.de.tar.bz2 |
| 80 |
|
t.en.tar.bz2 |
| 81 |
|
t.fr.tar.bz2 |
| 82 |
|
t.pt.tar.bz2 |
| 83 |
|
t.ru.tar.bz2 |
| 84 |
|
t.sv.tar.bz2 |
| 85 |
|
t.vi.tar.bz2 |
| 86 |
|
|
| 87 |
|
t.pt.tar.bz2 would contain translations for pt and pt_BR: |
| 88 |
|
|
| 89 |
|
./usr/share/locale/pt/LC_MESSAGES/pilot-qof.mo |
| 90 |
|
./usr/share/locale/pt_BR/LC_MESSAGES/pilot-qof.mo |
| 91 |
|
|
| 92 |
|
This allows later tools to extract only the requested translations from |
| 93 |
|
the TDeb upon installation. |
| 94 |
|
|
| 95 |
|
TDebs are based on the .deb format, it is only a small change in the |
| 96 |
|
organisation of the data.tar.gz but it simplifies various stages of |
| 97 |
|
handling the resulting packages in the repository, in upload rules and |
| 98 |
|
in other support tools. |
| 99 |
|
|
| 100 |
|
## Use of the .tdeb suffix |
| 101 |
|
|
| 102 |
|
Various file-based tools exist to handle .deb files and it will be easier |
| 103 |
|
for such tools to be able to reliably tell the difference between a .deb |
| 104 |
|
and a .tdeb from the filename rather than having to add new support in |
| 105 |
|
the codebase to detect the absence of data.tar.gz and work out how to |
| 106 |
|
handle the t.$root.bz2 members. The suffix also makes it easier to manage |
| 107 |
|
TDebs in various repository situations. Although closely related to the |
| 108 |
|
.deb format, the .tdeb format is sufficiently different to merit a subtle |
| 109 |
|
change to the suffix in a similar manner to .udeb. |
| 110 |
|
|
| 111 |
## Format specification |
## Format specification |
| 112 |
The file is an ar archive with a magic number of !<arch>. |
The file is an ar archive with a magic number of !<arch>. |
| 210 |
The regular deb will need to contain a untranslated copy of the |
The regular deb will need to contain a untranslated copy of the |
| 211 |
templates file, too. See "TDebs and Debconf" below. |
templates file, too. See "TDebs and Debconf" below. |
| 212 |
|
|
| 213 |
|
# TDeb uploads |
| 214 |
|
|
| 215 |
|
## Initial uploads - +t0 |
| 216 |
|
|
| 217 |
|
The initial TDeb will be generated by the maintainer, effectively |
| 218 |
|
+t0, containing whatever translations are currently supported. The |
| 219 |
|
TDeb is uploaded alongside the binary and .dsc. It is up to the |
| 220 |
|
maintainer to incorporate any +t1.diff.gz containing updated or new |
| 221 |
|
translations that may exist already into each new Debian version. |
| 222 |
|
|
| 223 |
|
If the new version has changed translated strings then those will only |
| 224 |
|
available in English until the +t1 TDeb can be prepared. |
| 225 |
|
|
| 226 |
|
Maintainers are advised to always seek translation updates |
| 227 |
|
prior to the upload of the initial TDeb. If maintainers implement a |
| 228 |
|
string freeze and wait for translation updates before uploading, the |
| 229 |
|
chances of a +t1.diff.gz being required by time of the next release |
| 230 |
|
by the maintainer are lower. |
| 231 |
|
|
| 232 |
|
See also Timeline. |
| 233 |
|
|
| 234 |
|
Maintainers will be creating TDebs in Squeeze+1, using debian/rules, |
| 235 |
|
using debhelper calls and uploading TDebs each time they would |
| 236 |
|
currently upload any package that contains /usr/share/locale/LC_*/ etc. |
| 237 |
|
Those TDebs are, effectively, +t0 - only updates by translators start |
| 238 |
|
the +t1 sequence. |
| 239 |
|
|
| 240 |
|
Maintainer uploads (non-native package example): |
| 241 |
|
foo_1.2.3-4_amd64.deb |
| 242 |
|
foo-tdeb_1.2.3-4_all.tdeb |
| 243 |
|
foo-bar_1.2.3-4_amd64.deb |
| 244 |
|
foo_1.2.3-4.diff.gz |
| 245 |
|
foo_1.2.3.orig.tar.gz |
| 246 |
|
foo_1.2.3-4.dsc |
| 247 |
|
foo_1.2.3-4_amd64.changes |
| 248 |
|
|
| 249 |
|
Maintainer uploads (native package example): |
| 250 |
|
foo_1.2.3_amd64.deb |
| 251 |
|
foo-tdeb_1.2.3_all.tdeb |
| 252 |
|
foo-bar_1.2.3_amd64.deb |
| 253 |
|
foo_1.2.3.tar.gz |
| 254 |
|
foo_1.2.3.dsc |
| 255 |
|
foo_1.2.3_amd64.changes |
| 256 |
|
|
| 257 |
|
The foo-tdeb package will be listed in the .changes anyway so existing |
| 258 |
|
tools will simply add it to the list of files to be uploaded to |
| 259 |
|
ftp-master or wherever. foo-tdeb_1.2.3-4_all.tdeb is, effectively, |
| 260 |
|
foo-tdeb_1.2.3-4+t0_all.tdeb |
| 261 |
|
|
| 262 |
|
When the maintainer makes a new release, foo_1.2.3-5, which incorporates |
| 263 |
|
the TDeb changes, it is done in a similar manner to how an NMU is |
| 264 |
|
included. All files matching foo*1.2.3-4* are removed by dak when the |
| 265 |
|
new version is uploaded. The updated translations now exist in |
| 266 |
|
foo-tdeb_1.2.3-5_all.tdeb - uploaded by the maintainer and there is no |
| 267 |
|
+t1.diff.gz or +t1_all.tdeb until the package translations need to be |
| 268 |
|
touched again. |
| 269 |
|
|
| 270 |
|
## Translator updates |
| 271 |
|
|
| 272 |
|
Updates to translations will update the existing TDeb, creating |
| 273 |
|
+t2.diff.gz and +t3.diff.gz etc. All supported languages go into the |
| 274 |
|
existing TDeb, organised by locale root. |
| 275 |
|
|
| 276 |
|
Unless a package needs more than one TDeb for the debconf plus large |
| 277 |
|
amounts of translated documentation corner case, each source package |
| 278 |
|
should only expect to have one TDeb for all binary packages and all |
| 279 |
|
locales. |
| 280 |
|
|
| 281 |
|
Translation teams can work together to make uploads in a coordinated |
| 282 |
|
manner - similar to the current method of requesting deadlines for i18n |
| 283 |
|
bugs, a nominated person can collate the various translations prior to |
| 284 |
|
a deadline chosen by the teams themselves, according to the needs of |
| 285 |
|
that particular package. |
| 286 |
|
|
| 287 |
|
Translator updates of TDebs do not necessarily need to use typical |
| 288 |
|
package building tools like 'dpkg-buildpackage'. All that is needed |
| 289 |
|
is to put the .mo files into the relevant directory hierarchy (or use |
| 290 |
|
dh_gentdeb) and then call dpkg-deb --tdeb -b: |
| 291 |
|
|
| 292 |
|
dpkg-deb --tdeb -b debian/pilot-qof-tdeb ../pilot-qof-tdeb_0.1.7-1_all.tdeb |
| 293 |
|
|
| 294 |
|
This means that translators can build updated TDebs without needing the |
| 295 |
|
full dependency chain needed for a source rebuild - only dpkg (at a version |
| 296 |
|
that includes the TDeb support) is strictly necessary. |
| 297 |
|
|
| 298 |
|
Translator update uploads would contain: |
| 299 |
|
foo-tdeb_1.2.3-4+t1_all.tdeb |
| 300 |
|
foo_1.2.3-4+t1.diff.gz |
| 301 |
|
foo_1.2.3-4+t1.dsc |
| 302 |
|
foo_1.2.3-4+t1_all.changes |
| 303 |
|
|
| 304 |
|
The key point is that a +t1 revision can happen *during a release |
| 305 |
|
freeze* without touching the source, without changing any of the |
| 306 |
|
binaries. Once the release is out and unstable is accessible again, the |
| 307 |
|
maintainer adds +t1.diff.gz to their next upload. |
| 308 |
|
|
| 309 |
|
## dpkg source formats |
| 310 |
|
|
| 311 |
|
Format 3.0 should not be any more difficult than 1.0 or anything that |
| 312 |
|
follows. 3.0 has to deal with incorporating patches and changes from |
| 313 |
|
the Debian Bug Tracking System, so +t1.diff.gz is no different. |
| 314 |
|
|
| 315 |
|
What matters is that the maintainer gets the +t1.diff.gz and applies it |
| 316 |
|
onto the source package prior to the next upload. It's no different to |
| 317 |
|
how the same maintainer would handle a patch or new translations |
| 318 |
|
file sent to the BTS. |
| 319 |
|
|
| 320 |
|
--- |
| 321 |
|
|
| 322 |
# TDeb resources. |
# TDeb resources. |
| 323 |
|
|
| 324 |
## Packages and patches |
## Packages and patches |
| 338 |
* <http://git.debian.org/?p=users/codehelp/debhelper.git;a=summary> |
* <http://git.debian.org/?p=users/codehelp/debhelper.git;a=summary> |
| 339 |
* <http://git.debian.org/?p=users/codehelp/dpkg.git;a=summary> |
* <http://git.debian.org/?p=users/codehelp/dpkg.git;a=summary> |
| 340 |
|
|
| 341 |
|
--- |
| 342 |
|
|
| 343 |
# TDeb Architectures |
# TDeb Architectures |
| 344 |
|
|
| 345 |
## TDebs are architecture-independent |
## TDebs are architecture-independent |
| 350 |
Any translation system that does not use gettext can choose to use |
Any translation system that does not use gettext can choose to use |
| 351 |
TDebs as long as the translation files are architecture-independent. |
TDebs as long as the translation files are architecture-independent. |
| 352 |
|
|
| 353 |
|
--- |
| 354 |
|
|
| 355 |
# TDebs and LINGUAS |
# TDebs and LINGUAS |
| 356 |
|
|
| 357 |
## Avoiding changes to the source package |
## Avoiding changes to the source package |
| 424 |
must be used and all tdebs for the source package must be revised |
must be used and all tdebs for the source package must be revised |
| 425 |
at the same time. |
at the same time. |
| 426 |
|
|
| 427 |
|
--- |
| 428 |
|
|
| 429 |
# TDebs and package managers |
# TDebs and package managers |
| 430 |
|
|
| 431 |
Package managers can find out whether a package has a base tdeb by examining |
Package managers can find out whether a package has a base tdeb by examining |
| 446 |
tdeb merely has to be locatable by debconf which will call apt-extracttemplates |
tdeb merely has to be locatable by debconf which will call apt-extracttemplates |
| 447 |
and load the translated debconf strings into memory. See TDebs and debconf: |
and load the translated debconf strings into memory. See TDebs and debconf: |
| 448 |
|
|
| 449 |
|
--- |
| 450 |
|
|
| 451 |
# TDebs and debconf |
# TDebs and debconf |
| 452 |
|
|
| 453 |
apt-extracttemplates is used by debconf's dpkg-preconfigure to extract |
apt-extracttemplates is used by debconf's dpkg-preconfigure to extract |
| 456 |
are per-binary while tdebs are per-source. Also, the .deb should |
are per-binary while tdebs are per-source. Also, the .deb should |
| 457 |
have non-translated templates. |
have non-translated templates. |
| 458 |
|
|
| 459 |
|
--- |
| 460 |
|
|
| 461 |
# TDebs and multiple templates files |
# TDebs and multiple templates files |
| 462 |
|
|
| 463 |
If a source package builds multiple binaries that use debconf, the debian/ |
If a source package builds multiple binaries that use debconf, the debian/ |
| 466 |
will need to work together to ensure that all templates files are available to |
will need to work together to ensure that all templates files are available to |
| 467 |
debconf so that debconf can selectively load only the templates files required. |
debconf so that debconf can selectively load only the templates files required. |
| 468 |
|
|
| 469 |
|
--- |
| 470 |
|
|
| 471 |
# Tdebs and usr/share/doc |
# Tdebs and usr/share/doc |
| 472 |
|
|
| 473 |
A tdeb needs usr/share/doc/copyright and changelog.Debian and dpkg will create |
A tdeb needs usr/share/doc/copyright and changelog.Debian and dpkg will create |
| 474 |
the necessary files, just as with a normal .deb. |
the necessary files, just as with a normal .deb. |
| 475 |
|
|
| 476 |
|
--- |
| 477 |
|
|
| 478 |
# Lintian support |
# Lintian support |
| 479 |
|
|
| 480 |
## PO translations |
## PO translations |
| 495 |
* Name of the manpages in the binary packages (tdeb). An english |
* Name of the manpages in the binary packages (tdeb). An english |
| 496 |
manpage shall remain, with the same name, in the original binary package. |
manpage shall remain, with the same name, in the original binary package. |
| 497 |
|
|
| 498 |
|
--- |
| 499 |
|
|
| 500 |
# TDeb maintainers |
# TDeb maintainers |
| 501 |
|
|
| 502 |
Rather than allow repeat uploads of the same change in multiple |
Rather than allow repeat uploads of the same change in multiple |
| 504 |
many changes as possible at one time. Translation-Maintainers: in |
many changes as possible at one time. Translation-Maintainers: in |
| 505 |
debian/control and Localisation Assistants. |
debian/control and Localisation Assistants. |
| 506 |
|
|
| 507 |
# TDeb implementation |
--- |
|
|
|
|
## What needs to be done and when? |
|
| 508 |
|
|
| 509 |
* Archive and tools support (Squeeze) |
# TDeb implementation |
|
* Debconf translation will form the first TDebs (Squeeze + 1) |
|
|
* Native packages with program translations next |
|
|
* Non-native packages with Debian maintainers who are also the upstream |
|
| 510 |
|
|
| 511 |
# Incorporation of the tdiff in the next source package |
## Incorporation of the tdiff in the next source package |
| 512 |
|
|
| 513 |
A process will be needed to help maintainers including the tdiff when they |
A process will be needed to help maintainers including the tdiff when they |
| 514 |
prepare a new source package (kind of NMU acknowledgement?) Automated so that |
prepare a new source package (kind of NMU acknowledgement?) Automated so that |
| 528 |
|
|
| 529 |
This issue can be postponed until tdebs appear for non-native packages (squeeze+1) |
This issue can be postponed until tdebs appear for non-native packages (squeeze+1) |
| 530 |
|
|
| 531 |
# L10N Infrastructure |
--- |
| 532 |
|
|
| 533 |
|
## L10N Infrastructure |
| 534 |
|
|
| 535 |
i18n.debian.net gathers the translation material from the packages. It needs |
i18n.debian.net gathers the translation material from the packages. It needs |
| 536 |
to support tdebs too (tdiff). |
to support tdebs too (tdiff). |
| 541 |
i18n.debian.net needs to help "Localisation Assistants" in gathering the new |
i18n.debian.net needs to help "Localisation Assistants" in gathering the new |
| 542 |
translations before the preparation of a new tdeb |
translations before the preparation of a new tdeb |
| 543 |
|
|
| 544 |
# Timeline |
--- |
| 545 |
|
|
| 546 |
|
## Timeline |
| 547 |
|
|
| 548 |
## What needs to be done still? |
### Sequence |
| 549 |
|
|
| 550 |
|
* Archive and tools support (Squeeze) |
| 551 |
|
* Debconf translation will form the first TDebs (Squeeze + 1) |
| 552 |
|
* Native packages with program translations next |
| 553 |
|
* Non-native packages with Debian maintainers who are also the upstream |
| 554 |
|
|
| 555 |
|
### What needs to be done for Squeeze ? |
| 556 |
|
|
| 557 |
* tdeb binary file definition - (ratification and review) |
* tdeb binary file definition - (ratification and review) |
| 558 |
* tdeb source file definition - (development and testing) |
* tdeb source file definition - (development and testing) |
|
* dpkg class support - (make it easier to selectively install translations |
|
|
for specific locale roots). |
|
| 559 |
* dpkg-source building support - (partially implemented in git) |
* dpkg-source building support - (partially implemented in git) |
| 560 |
|
|
| 561 |
|
There will be no TDebs in Squeeze. |
| 562 |
|
|
| 563 |
|
### What needs to be done for Squeeze + 1? |
| 564 |
|
|
| 565 |
* debhelper support for both tdebs explicitly, and also marking files into |
* debhelper support for both tdebs explicitly, and also marking files into |
| 566 |
classes in general (partially implemented via dh_gentdeb in git) |
classes in general (partially implemented via dh_gentdeb in git) |
| 567 |
* provide a patch to cdbs for running dh_gentdeb in the right place. |
* provide a patch to cdbs for running dh_gentdeb in the right place. |
| 568 |
(Done - only remains for the patch to be filed and applied, after Lenny). |
(Done - only remains for the patch to be filed and applied). |
| 569 |
* apt/aptitude support for pulling in and removing tdebs |
* apt/aptitude support for pulling in and removing tdebs |
| 570 |
* lintian support |
* lintian support |
| 571 |
* debdiff support |
* debdiff support |
| 572 |
* devscripts support (debc) |
* devscripts support (debc) |
| 573 |
* dak support (run away, run away) run faster |
* dak support (run away, run away) run faster |
| 574 |
|
|
| 575 |
|
First generation of TDebs: |
| 576 |
|
|
| 577 |
|
* packages using debconf |
| 578 |
|
* native packages using gettext (optional) |
| 579 |
|
|
| 580 |
|
### What will be done for Squeeze + 2 or later? |
| 581 |
|
|
| 582 |
|
* dpkg class support - (make it easier to selectively install translations |
| 583 |
|
for specific locale roots). |
| 584 |
* support for packages using non-gettext translations. Packages using |
* support for packages using non-gettext translations. Packages using |
| 585 |
non-gettext mechanisms include OOo, mozilla, Qt or Java properties, menus, |
non-gettext mechanisms include OOo, mozilla, Qt or Java properties, menus, |
| 586 |
desktop.) |
desktop.) |
| 587 |
|
|
| 588 |
We do need the toolchain changes in squeeze so we can enable use |
* any remaining debconf packages not yet using TDebs |
| 589 |
of it in squeeze+1. |
* remaining native packages using gettext |
| 590 |
|
* non-native packages with a Debian maintainer on upstream team |
| 591 |
|
* starting support for non-gettext packages |
| 592 |
|
|
| 593 |
|
--- |
| 594 |
|
|
| 595 |
# Changes |
# Changes |
| 596 |
|
|
| 597 |
----- |
----- |
| 598 |
|
|
| 599 |
2009-03-08 - [Neil Williams] |
2009-03-08 - [Neil Williams] |
| 605 |
2009-04-14 - [Neil Williams] |
2009-04-14 - [Neil Williams] |
| 606 |
* Tweak some of the links to become active. |
* Tweak some of the links to become active. |
| 607 |
* Update the URL |
* Update the URL |
| 608 |
|
* Fold in the results of the discussions so far on -devel. |