Files
libguestfs/inspector
Richard W.M. Jones 5b6a2e68b8 tests/guests: Fix RPM database in phony Fedora guest.
Fix the Name and Packages database so it looks enough like a modern
RPM database to fool inspection.  I'm not sure whether or not the old
version ever worked, but it doesn't work now.

The format is not documented, but in brief:

The Name database contains (Name, link) pairs.  The link is an
arbitrary 32 bit integer.

The Packages database contains (link, RPM-blob) pairs.

The RPM-blob is a binary blob formatted like this:

 * Number of fields               4 bytes, big endian
 * Size in bytes of the store     4 bytes, big endian
 * Field descriptions:
     list of (RPMTAG, 0, offset in store, 0)
                                  4 * 4 * nr_fields bytes, big endian
 * The store                      binary data containing ASCIIZ strings

For the values of RPMTAG_* that we understand, see src/inspect-apps.c.
2014-08-13 22:10:31 +01:00
..