LSB, bi-arch, and package repositories
This message describes a real world problem I'm hitting now trying to
ship Picasa.
Consider the case of an ISV who has a 32 bit
application who would like to build it once
and allow users to use their native package manager
to download the package from the ISV's package repository
and also notify the user when newer versions are available.
For good coverage, this means the ISV has to
package the same binary in both .rpm and .deb format
(e.g. http://picasa.google.com/linux/download.html )
(This ignores the attempt of the spec to mandate the RPM format,
http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core...
but since the LSB doesn't standardize rollout of packages over the
network, we have to go with the native package format here.)
With .rpm, no problem; rpm is pretty good at handling this.
Even on 64 bit machines, the 32 bit package installs and works.
With .deb, there's a minor hitch; apt and aptitude don't
recognize 32 bit packages in 64 bit repositories.
Easy workaround: provide a second .deb marked as
64 bits, but with identical contents.
(This violates the letter but perhaps not the spirit of
http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-IA32/LSB-Core-IA...
)
That works fine except for one detail: how to make sure the
target system has the 32 bit compatibility libraries installed?
Since this is a dependency problem specific to the
ia32 architecture (the arch of the app) and the
amd64 architecture (the arch of the target system),
let's look at the pages of the LSB definition that deal
with those two architectures:
http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-IA32/LSB-Core-IA...
suggests that adding a dependency on
lsb-core-ia32
would do the trick, but
http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-AMD64/LSB-Core-A...
doesn't mention this possibility.
Back in the real world, the story is not so pretty.
On Ubuntu Gutsy, one has to add a dependency on ia32-libs,
but on Ubuntu Hardy, one has to add dependencies on
both ia32-libs and lib32nss-mdns, else the app can't look up hosts by name;
see https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/220377
So, what are the prospects for tidying up this painful little issue?
I'm looking for both a short-term and a long-term solution.
Short-term, I'd like Ubuntu to get its *!@$ act together and
return to the practice of letting 64 bit packages depend on ia32-libs
to trigger installation of all needed 32 bit compatibility libraries.
Long-term, since forcing all distributions to support yum rpm
repostories is not likely to succeed, I'd like the LSB to
grudgingly accept the .deb format as an alternate representation.
That would probably mean adding
a little section saying that .deb packaging is allowed, and
allow 32 bit apps to be packaged either the current way
(marked as 32 bit packages) or (as a sop to apt's inability to
handle 32 bit packages on a 64 bit machine) in this alternate way
(marked as 64 bit packages but with a dependency on lsb-core-ia32).
I looked around a bit, and found a few hits on the topic, e.g.
http://www.linuxfoundation.org/impl/20040206.html
http://lackof.org/taggart/hacking/multiarch/
but nothing current.
If you've read this far, thanks for listening. I'd love to
hear suggestions for how to move forward.
- Dan

