Cyril Brulebois: dpkg with multiarch
(This page was edited a few times,
details are available.)
Grab it while it s hot!
Thanks to the hard work of dpkg developers and many (generations of)
developers, multiarch is becoming
a reality.
If you want to give it a try, install
dpkg from experimental, add
a foreign architecture, and start trying to install packages. Example
on amd64:
# dpkg --add-architecture i386
# dpkg --print-foreign-architectures
i386
# apt-get update
[ lots of amd64 and i386 Packages files get downloaded ]
# apt-get install mksh:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
ed:i386
The following NEW packages will be installed:
mksh:i386
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 414 kB of archives.
After this operation, 707 kB of additional disk space will be used.
Get:1 http://ftp.fr.debian.org/debian/ sid/main mksh i386 40.4-2 [414 kB]
Fetched 414 kB in 0s (664 kB/s)
Selecting previously unselected package mksh.
(Reading database ... 171933 files and directories currently installed.)
Unpacking mksh (from .../archives/mksh_40.4-2_i386.deb) ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up mksh (40.4-2) ...
update-alternatives: using /bin/mksh to provide /bin/ksh (ksh) in auto mode.
Processing triggers for menu ...
# mksh
$ ldd $(which mksh)
linux-gate.so.1 => (0xf779c000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf75d6000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf75b9000)
/lib/ld-linux.so.2 (0xf779d000)
Of course, installing an i386 mksh package isn t exactly what
multiarch is about. Dozens of packages have been patched already to
add Multi-Arch fields, but until their (recursive) dependencies have
been multiarch-ified, foreign packages can be uninstallable, as can be
seen below, with the usual why is it uninstallable? hunt (shortened
output):
# apt-get install psutils:i386
The following packages have unmet dependencies:
psutils:i386 : Depends: libpaper1:i386 but it is not going to be installed
# apt-get install libpaper1:i386
The following packages have unmet dependencies:
libpaper1:i386 : Depends: ucf:i386 (>= 0.28) but it is not installable
Recommends: libpaper-utils:i386 but it is not going to be installed
# apt-get install ucf:i386
E: Package 'ucf:i386' has no installation candidate
Another example, successful handling of the installation of a foreign
package, while it s already installed with the host architecture:
# apt-get install xz-utils:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
liblzma5:i386
Suggested packages:
xz-lzma:i386
The following packages will be REMOVED:
xz-utils
The following NEW packages will be installed:
liblzma5:i386 xz-utils:i386
0 upgraded, 2 newly installed, 1 to remove and 9 not upgraded.
Need to get 440 kB of archives.
After this operation, 410 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp.fr.debian.org/debian/ sid/main liblzma5 i386 5.1.1alpha+20110809-3 [205 kB]
Get:2 http://ftp.fr.debian.org/debian/ sid/main xz-utils i386 5.1.1alpha+20110809-3 [235 kB]
Fetched 440 kB in 0s (478 kB/s)
dpkg: xz-utils: dependency problems, but removing anyway as you requested:
dpkg depends on xz-utils.
xz-lzma depends on xz-utils.
dpkg-dev depends on xz-utils.
(Reading database ... 171952 files and directories currently installed.)
Removing xz-utils ...
Processing triggers for man-db ...
Selecting previously unselected package liblzma5:i386.
(Reading database ... 171908 files and directories currently installed.)
Unpacking liblzma5:i386 (from .../liblzma5_5.1.1alpha+20110809-3_i386.deb) ...
Selecting previously unselected package xz-utils.
Unpacking xz-utils (from .../xz-utils_5.1.1alpha+20110809-3_i386.deb) ...
Processing triggers for man-db ...
Setting up liblzma5:i386 (5.1.1alpha+20110809-3) ...
Setting up xz-utils (5.1.1alpha+20110809-3) ...
# dpkg -l xz-utils xz-utils:i386 'liblzma*:*'
[ ]
un xz-utils <none>
ii xz-utils 5.1.1alpha+20110809-3
ii liblzma5:amd64 5.1.1alpha+20110809-3
ii liblzma5:i386 5.1.1alpha+20110809-3
# ldd $(which xz)
linux-gate.so.1 => (0xf776b000)
liblzma.so.5 => /usr/lib/i386-linux-gnu/liblzma.so.5 (0xf7724000)
librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf771b000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf7701000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf75a4000)
/lib/ld-linux.so.2 (0xf776c000)
# zgrep -a '_("Activities")' gnome-shell-3.2.2.1.tar.xz
this._label = new St.Label( text: _("Activities") );
zgrep is a shell script, but it calls xz, which is from the i386
package, and everything runs just fine. Running it through strace -f
-e '', I discovered those messages, which I had never seen before:
[ Process PID=8900 runs in 32 bit mode. ]
[ Process PID=8899 runs in 64 bit mode. ]
[ Process PID=8900 runs in 32 bit mode. ]
[ Process PID=8899 runs in 64 bit mode. ]
What s next?
We re late! It s time to check what happens with that dpkg
package, report bugs, and convert more libraries! Please think of the
kittens, and coordinate with the release team to make sure you
don t delay a transition when uploading a shiny, multiarch-ified
package. In a nutshell, if you received a patch from Steve Langasek or
Riku Voipio, it s a good indication your package will be helpful
quickly when it s multiarchified.
Since zlib is directly depended on by 2000+ packages,
#569697 was pinged right after the
dpkg upload; but many other packages will need patches and heavy
testing.
Hurry up, the freeze is coming, we need to shake it up as soon as
possible!
In a perfectly orchestrated marketing campaign for a 100% free-libre tablet called Spark that will run
Doh.. I thought it s end of problems.
Maybe this could be of interest to a few of my readers who may have missed the announcement, in particular for ones related to forges which will be deployed for private administrations in Europe.
The recently stared
If you re not into packaging and if you asked how you could help Debian, someone probably suggested that you help to translate it.
It s true that translating Debian is essential if we want to make Debian available to everybody on the world. There are many persons who are stuck as soon as they get a message in English, so it s important to aim for 100% coverage in terms of localization.
Some vocabulary: localization vs internationalization
Internationalization (i18n) is the work that makes it possible to translate messages in a given application.
Localization (l10n) is the work of translating messages of said application. So as a translator, you ll be doing localization but some knowledge of internationalization is still useful because it will define how you re supposed to provide the translations. We ll come back to that later.
Join your localization team
Usually the translation work is shared among multiple translators within a localization team. Check out the
GPL enforcement is a surprisingly difficult task. It's not just a matter of identifying an infringement - you need to make sure you have a copyright holder on your side, spend some money sending letters asking people to come into compliance, spend more money initiating a suit, spend even more money encouraging people to settle, spend yet more money actually taking them to court and then maybe, at the end, you have some source code. One of the (tiny) number of groups involved in doing this is the
When you read this,
I've managed to go for eleven years working on Debian and nearly eight on Ubuntu without ever needing to teach myself how APT's resolver works. I get the impression that there's a certain mystique about it in general (alternatively, I'm just the last person to figure this out). Recently, though, I had a couple of Ubuntu upgrade bugs to fix that turned out to be bugs in the resolver, and I thought it might be interesting to walk through the process of fixing them based on the
I have a mythtv box which (when working) records television shows for
me. As I'm not interested in the vast majority of shows shown on US
television, it spends most of it's time off, waiting for a show that I
want to record. This requires using
good news: from looking through RC bugs in the
The code for now is very simple:
All of 