Hi. I've been getting my feet wet with lsb by adding support for lsb packages to alien. This is done; alien 8.0 can convert from lsb packages into any other format, and it will try to convert from other formats (say, .deb) to lsb, although it cannot guarentee the result will be lsb compliant[1].
In the process, I was suprised to find that the spec doesn't bother to change the filename extension to .lsb. Alien needs to be able to detect the origin package format automatically. So at first I just figured hey, I'll make alien assume that any rpm starting with lsb- is a lsb package. Then I had a look around the lsb ftp site, at the existing lsb-*.rpm files there, to find something to test alien with. Well, it's a mixed bag. In the app-battery, the rsync package doesn't look like a lsb package at all; no lsb- prefix. The apache package looks good. The new lsb-xv package neglects to depend on lsb. But, what about this rpm package, for instance: lsb-apache_1.3.22-1_src.rpm This is clearly not a lsb compliant package, but the only mechanical way to determine that is to either code in a special check for src rpms, or pull it apart and notice that it does not depend on lsb[2]. Moving out of the app-battery, I found some more apparent lsb packages, like lsb-tools-0.1-1.i386.rpm (which does not depend on lsb), and like lsb-rpm in the lsbdev directory. It's not clear to me if this is intended to be a real lsb package (it does not depend on lsb), or if it is just a package that happens to have a name beginning with lsb- because it is a special rpm for building lsb packages. This is especially interesting to me since I maintain rpm for debian (don't laugh!) and need to make a lsb-rpm package of my own, for debian's lsbdev package. I wonder if calling a package lsb-rpm.deb is infringing on the lsb namespace too much. After all, what if someone told alien to turn lsb-rpm.deb into a rpm (not lsb) package? The result, lsb-rpm.rpm, would look to the casual eye like a lsb package, but it would not depend on lsb, it would not use /opt, it would be linked to non-lsb libraries, etc. What a mess. So, I have settled on the following code in alien to determine if a package is a lsb package or just a rpm that sorta, kinda looks like one: sub checkfile { my $this=shift; my $file=shift; return unless $file =~ m/^lsb-.*\.rpm$/; my @deps=`LANG=C rpm -qp -R $file`; return 1 if grep { s/\s+//g; $_ eq 'lsb' } @deps; return; } This seems less than optimal to me. If lsb packages were required to end with ".lsb", then there would be no worries about source packages being confused with lsb packages, and no worries about alien or another tools generating something that looks broadly like a lsb package but was not intended to be one, and there would be less special-purpose code in alien. Really I wish you could go one step further and munge the format in some unique but harmless way[2] such that file(1) could recognize a lsb package no matter what the filename, but I suppose it's too late for that. -- see shy jo [1] There are some warnings to that effect, I probably need to make them more prominant. [2] Eg, a deb is a slightly munged but still valid ar file.