Neil Williams: TDeb processing...
Just added a TDeb test build branch for multistrap to test out the changes in the next version of the emdebian-tdeb binary package - specifically: Move em_installtdeb into the emdebian-grip-server package so that the emdebian-tdeb package can be slimmed down to only contain what will become useful for other maintainers to use in their debian/rules files and for translators when the time comes to implement DEP-4. CDBS rules / patches to follow... bug reports against dpkg and debhelper to follow ...
DEP-4 itself is being restarted and refreshed but with some problems on alioth currently, I'm going to (try and) keep the document up to date via SGML and people.debian.org.
The changes are now in Emdebian SVN and I'm starting testing with my own packages first. Multistrap for PO and po4a-build testing, dpkg-cross for debconf testing, some others for testing with build systems other than CDBS, then the discussions will restart on debian-devel and I'll upload the TDeb support scripts to unstable.
There are a variety of things which need to happen before these scripts become useful, including:
- dpkg support for XC-Package-Type: tdeb
- debhelper support for dh_gentdeb,
- inevitable bug fixing in emdebian-tdeb
Why is the package called emdebian-tdeb? Simple - that's where the scripts have lived until now and the hope is that dpkg-gentdeb can migrate into dpkg-dev and dh_gentdeb into debhelper - eventually.
By all means play with the scripts and follow the example multistrap branch above to see what kind of changes might be needed in your own packages. I'll post again when I've worked out the changes needed in packages like dpkg-cross which only need TDebs for debconf support. (This is the easiest mode of TDeb usage but it's also the most useful during a release cycle - maintainers make a single change and then a nominated i18n boss-person - take a guess who - can update the all your debconf translations in one upload without a binary build - eventually possibly not even needing any bug reports, just a simple email advance warning.
What I've got to work on still is how the generation of an updated TDeb creates a new debian diff / debian.tar.gz to accompany the upload. For that I need XC-Package-Type: tdeb support in dpkg....
Sample output from the viewpoint of a translator updating a package already converted to support a TDeb:
neil@sylvester:tdeb-test$ dpkg-gentdeb -t
Set the changelog message to version 2.1.15+t0 first, closing any relevant bugs!
dch -v 2.1.15+t0
neil@sylvester:tdeb-test$ dch -v 2.1.15+t0 TDeb test
neil@sylvester:tdeb-test$ dpkg-gentdeb -t
Building TDeb update: 2.1.15+t0
(192 entries)
Discard doc/pod/1/da/multistrap (65 of 177 strings; only 36.72% translated; need 50%).
Discard doc/pod/1/da/device-table.pl (5 of 19 strings; only 26.31% translated; need 50%).
Processing untranslated files for pod/multistrap (1) . . .
Processing untranslated files for device-table.pl (1) . . .
Processing de translations for pod/multistrap (1). . .
Processing de translations for device-table.pl (1). . .
Processing fr translations for pod/multistrap (1). . .
Processing fr translations for device-table.pl (1). . .
Processing pt translations for pod/multistrap (1). . .
Processing pt translations for device-table.pl (1). . .
dpkg-gencontrol -pmultistrap-tdeb -Pdebian/multistrap-tdeb -cdebian/control
dpkg --build debian/multistrap-tdeb ../multistrap-tdeb_2.1.15+t0_all.tdeb
dpkg-deb: building package multistrap-tdeb' in ../multistrap-tdeb_2.1.15+t0_all.tdeb'.
neil@sylvester:tdeb-test$ dpkg -c ../multistrap-tdeb_2.1.15+t0_all.tdeb
drwxr-xr-x root/root 0 2011-06-08 21:06 ./
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/pt/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/pt/LC_MESSAGES/
-rw-r--r-- root/root 6427 2011-06-08 21:06 ./usr/share/locale/pt/LC_MESSAGES/multistrap.mo
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/vi/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/vi/LC_MESSAGES/
-rw-r--r-- root/root 6963 2011-06-08 21:06 ./usr/share/locale/vi/LC_MESSAGES/multistrap.mo
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/fr/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/fr/LC_MESSAGES/
-rw-r--r-- root/root 6789 2011-06-08 21:06 ./usr/share/locale/fr/LC_MESSAGES/multistrap.mo
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/da/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/locale/da/LC_MESSAGES/
-rw-r--r-- root/root 16311 2011-06-08 21:06 ./usr/share/locale/da/LC_MESSAGES/multistrap.mo
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/pt/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/pt/man1/
-rw-r--r-- root/root 33963 2011-06-08 21:06 ./usr/share/man/pt/man1/multistrap.1
-rw-r--r-- root/root 4471 2011-06-08 21:06 ./usr/share/man/pt/man1/device-table.pl.1
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/vi/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/fr/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/fr/man1/
-rw-r--r-- root/root 33969 2011-06-08 21:06 ./usr/share/man/fr/man1/multistrap.1
-rw-r--r-- root/root 4708 2011-06-08 21:06 ./usr/share/man/fr/man1/device-table.pl.1
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/da/
drwxr-xr-x root/root 0 2011-06-08 21:06 ./usr/share/man/da/man1/
I'm also going to DebConf11

On the RoadTrip! all the way hrough France, Belgium, Netherlands, Germany, Austria, Slovenia, Croatia, Bosnia-Herzegovina (Banja Luka) in an MX5.
I've got a lot of things to talk to people about @ DebConf this year... you won't be able to tell if I'm just buying you a beer or trying to badger you about your packages!! Just note that TDebs have been already agreed (in terms of how TDebs work in the archive) with ftp-master at a previous meeting in Extremadura and I'm being badgered by a Release Manager and an ex-DPL to get TDebs implemented real soon now, so it is going to happen and hopefully in time for Wheezy - it's just a matter of fixing the bugs. The quicker everyone has a look at the new scripts (which have been completed re-written and immensely simplified since I first tried a dumb conversion of em_installtdeb) and the likely changes needed in packages, the quicker I can get the bugs out of the scripts.
More documentation to follow, I'll be updating the SGML whenever practical and the actual DEP just as soon as I get commit access back.
It s been a few months since
Today is
Since my laptop features
We downloaded a total of 8
Anyone who's been following anything I've written lately may be under the impression that I dislike EFI. They'd be entirely correct. It's an awful thing and I've lost far too much of my life to it. It complicates the process of booting for no real benefit to the OS. The only real advantage we've seen so far is that we can configure boot devices in a vaguely vendor-neutral manner without having to care about BIOS drive numbers. Woo.
Whenever someone asked me about a calendar application, especially for the textmode, I always encouraged them to give
As usual many people requested travel sponsorship to attend DebConf 11 and
are now waiting eagerly on the outcome of their request. We are sorry,
that we can t give you much details yet. To give you an idea of the
time line, here is a small explanation of the process.
About 100 people requested travel sponsorship. In total that would about
50 000 Euro. Problem is currently we don t exactly know, how much money we
may spend on travel sponsorship ourselves (By the way: If a potential
sponsor is reading this, please
DECLARATIVE DIVERSIONS
======================
Introduction
A diversion is when it is possible to have dpkg not overwrite a file when it
reinstalls the package it belongs to, and to have it put the file from the
package somewhere else instead.
Declarative diversions involves a new control file with a declarative
syntax which dpkg will parse and process directly as part of the package unpack
and removal phases, eliminating the problems resulting from non-atomic
handling of diversions.
Topics
There are a number of topics involved in implementing this kind of project
* What syntax do we use for the new control file?
* What dpkg does with the control file
* How do we handle diversions to a non-existant directory?
* How do we order unpacking a new package which adds a diversion?
* How do we order unpacking a new package that removes a diversion?
* How do we order removing a package which had a diversion?
* How do we handle errors?
* What happens to dpkg-divert?
Details - Control File Syntax
-
It will conform to RFC2822 style with the following format:
* Divert-From:
* Divert-To:
* Blank lines and lines beginning with # will be comments
Divert-To will be optional and if it is ommitted then files being diverted
will have their filename changed to file.distrib
The above style has it s advantages, one of the main ones being that there is
no need to escape whitespace within filenames. It also allows for more commands
to be added at a later date.
Details - Control File Handling
-
Within control.tar.gz the file should be named diversions
This file is then copied to /var/lib/info/$package.diversions
We need to store the control file for the currently-installed package so that
we can detect declarative diversions that have been removed from the control
file between versions (On-disk version and the to-be-unpacked version).
If there is no previous version of a control file then all current diversions
within the package are left in place and any new ones declared within the
control file are added.
If there is a previous version of the control file then the diversions
listed within the file are compared with the diversions currently in place.
If a diversion exists that is no longer listed in the control file then it is
removed. If there is a diversion listed in the control file that doesn t
currently exist then it is added.
Details - Handling Diversions to non-existant directories
-
Diverting files to directories that don t exist can cause a number of problems.
If the package does not own the directory it may be left orphaned on
removal of the package
The package is responsible for ensuring the availability of the target
directory in the unpack phase.
If a declarative diversion attempts to divert a file to a folder that neither
exists already on the filesystem at unpack time, nor is shipped within
the package, dpkg will return an error at unpack time.
Details - Ordering Requirements
-
=>Unpacking a new package that adds a diversion
*1. Check if package has a previous diversion control file
*2. Copy control file to tmp directory
*3. Calculate diversions to be added
*4. Unpack folders
*5. Add diversions
*6. Unpack files
*7. Copy control file to /var/lib/dpkg/info/$package.diversion
*Performing diversions this way avoids trouble with creating folders and
accidentally overwriting the wrong version of files.
*Another major problem would be extracting a new version of the file and
overwriting the old one.
*This might cause the wrong version of the file to be diverted and the
package to break.
=>Unpacking a new package that removes a diversion
*1. Check if package has a previous diversion control file
*2. Copy control file to tmp directory
*3. Calculate diversions to be removed
*4. Check if dropped diversion results in a file conflict and abort the
unpack if it does.
*5. Unpack folders
*6. Unpack files
*7. Remove old files no longer needed in the package
*8. Remove diversions
*9. Copy control file to /var/lib/dpkg/info/$package.diversion
*If a package has no previous diversion control file then no diversions
will be removed and existing diversions can only be removed using
dpkg-divert.
*If removing a diversion results in a file conflict then dpkg will return
an error at unpack time before anything is unpacked and the unpack
is aborted.
=>Removing a package which had a diversion
*1. Remove files
*2. Remove diversions
*3. Remove folders
*4. Remove control file at /var/lib/dpkg/info/$package.diversion
*This ensures that all files, diversions and folders are removed correctly
Details - Error handling
Errors in diversions will have to handled with a great deal of care due to
the fact that if they are not the package could be broken.
This means that a great deal of checks must be done to ensure that all the files
can be diverted properly before any actual diverting takes place. If they can t
the package installation/update must be stopped and rolled back to avoid the
package being installed incorrectly or broken.
Details - dpkg-divert
-
When we impliment the new diversion method we should keep the current
dpkg-divert. This allows maintainers to catch up with the new method without
breaking their packages. It also allows maintainers to perform some operations
that aren t support by the new method.
All current functionality of dpkg-divert will be left intact for use by
sysadmins and for maintainers to catch up with the new system. The two
systems will work together without directly conflicting with each other.
Example Usage #1
The file to be diverted is /usr/share/foo
It needs to be moved to /usr/share/bar
The syntax of the control file would be:
#Start File
Divert-From: /usr/share/foo
Divert-To: /usr/share/bar
#End File
Example Usage #2
In this example the maintainer doesn t want to move the file to any specific
folder
The syntax of the control file would be:
#Start File
Divert-From: /usr/share/foo
#End File
This would divert the file to /usr/share/foo.distrib
Footnotes
-
RFC2822 Guide:
*
(First posting to Pl net Commandline! Tag: pcli)
Vutral asked in IRC how to synchronise two shells environment
while they re running. As you may know, POSIX systems cannot change
a process environment vector after it has been started, only the
process itself can. Well,
When soliciting for opinions, recently, I discovered that the python-based
I ve gotten a couple of complaints on the amount of daemons that is launched by default by any app built upon the KDE Frameworks, so I investigated one of them a bit.
The knotify daemon currently seems to do two things:
