[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: extension of lsb packages

Matt Taggart wrote:
> Good point. So I think this makes it even more important for file(1) to
> report the right thing so that tools that know how to deal with rpm can use
> it to differentiate between normal rpms and LSB packages.

This could be done by, for example, hacking the rpm lead and replacing
the initial 4 bytes of magic with some other value. That would require
an update to rpm to support the new magic so it could install (and
generate, I suppose) the lsb packages.

A better way might be to change some other bit of the rpm lead, in a way that
is backwards-compatable with rpm, so it doesn't need any modifications to
install a lsb package. Probably by adding another field to the structure,
eating into the reserved space:

struct rpmlead {
    unsigned char magic[4];
    unsigned char major, minor;
    short type;
    short archnum;
    char name[66];
    short osnum;
    short signature_type;
    short lsb_compliant;
    char reserved[15];

Then if there is a lsb package validator, it could even support flipping 
the right bit in packages it validates. The file output might look something

foo-1-2.i386.rpm:             RPM v3 bin i386 foo-1-2 (LSB compliant)

The version of the LSB the package is compliant with could also be encoded
in there, I suppose.

see shy jo

Reply to: