Richard W.M. Jones 2ff8ad2568 inspection: Fix inspection of recent RPM guests using non-BDB.
Recent RPM-based guests have switched from using Berkeley DB (BDB) to
sqlite.  In order to inspect these guests (and earlier ones) we need
to stop using the hokey parsing of the BDB and use librpm APIs
instead.

This commit adds a new internal API so we can call librpm from the
daemon, and changes the library part to use the new API for RPM-based
guests.

This change removes the requirement for BDB tools like db_dump.

See also:
http://lists.rpm.org/pipermail/rpm-ecosystem/2021-March/000751.html
http://lists.rpm.org/pipermail/rpm-ecosystem/2021-March/000754.html
https://blog.fpmurphy.com/2011/08/programmatically-retrieve-rpm-package-details.html

This breaks the virt-inspector test (now in the separate guestfs-tools
repository).  However this is not a bug in libguestfs, but a bug in
the phoney Fedora guest that we use for testing - we created a
BDB-style RPM database which was supposed to be just enough to make
the old code work.  The new code using real librpm needs
/usr/lib/rpm/rpmrc (not present in the phoney image) and also cannot
parse the phoney database, so we will need to separately rework that
test.

Thanks: Panu Matilainen
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1766487
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1409024
(cherry picked from commit c9ee831aff)
2021-10-14 12:01:32 +01:00
2021-01-05 15:53:51 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-11-02 10:13:22 +00:00
2021-01-05 10:32:20 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-01-06 10:18:34 +00:00
2018-02-22 15:06:13 +00:00
2020-03-06 19:32:32 +00:00
2021-01-06 10:18:34 +00:00
2019-11-28 13:09:21 +01:00
2021-01-06 10:18:34 +00:00
2020-01-14 16:21:22 +01:00
2021-01-06 10:18:34 +00:00
2019-11-13 12:49:55 +00:00
2020-03-06 19:32:32 +00:00
2021-01-06 10:18:34 +00:00
2020-10-06 15:26:14 +01:00
2020-03-06 19:32:32 +00:00

Libguestfs is tools and a library for accessing and modifying guest
disk images.  For more information see the home page:

  http://libguestfs.org/

For discussion, development, patches, etc. please use the mailing
list:

  http://www.redhat.com/mailman/listinfo/libguestfs

To find out how to build libguestfs from source, read:

  docs/guestfs-building.pod
  http://libguestfs.org/guestfs-building.1.html
  man docs/guestfs-building.1

Copyright (C) 2009-2020 Red Hat Inc.

The library is distributed under the LGPLv2+.  The programs are
distributed under the GPLv2+.  Please see the files COPYING and
COPYING.LIB for full license information.  The examples are under a
very liberal license.
Languages
C 42.7%
OCaml 35.5%
Shell 7.1%
Makefile 4%
Perl 2.6%
Other 8%