Commit Graph

11 Commits

Author SHA1 Message Date
Richard W.M. Jones
d2b56f08f0 lib: Require libmagic.
If libmagic isn't installed then the guestfs_file_architecture API
doesn't work.  This means that inspection will always return
<arch>unknown</arch> for every guest.  This subtly breaks a few
features.  In particular it was reported that the
virt-builder/virt-customize --install option did not work because the
"unknown" architecture of the guest was not compatible with the host.

libmagic is a small, widely available C library, so the easiest fix is
just to make it mandatory.

Reported by: Solarix on IRC
2017-02-27 12:16:07 +00:00
Pino Toscano
8066b34b60 inspect: read more fields for RPM packages
In particular, read the URL, and both the summary and the description.
2017-02-24 14:01:31 +01:00
Pino Toscano
ca997dce6c inspect: read more fields for Debian packages
In particular, read the URL, the source name, and both the summary and
the description.  For the long description, add a small system to read
continuation lines.

Adapt the expected result of virt-inspector for Debian and Ubuntu phony
guests, so test-virt-inspector.sh still passes.
2017-02-24 14:01:31 +01:00
Pino Toscano
a920c94870 inspect: add source and summary to internal add_application
This way source and summary can be specified for any package read from
the guest.
2017-02-24 14:01:31 +01:00
Pino Toscano
00bac2e5da inspect: ignore /dev/cdN devices in /etc/fstab
Non-Linux Unix guests may have static devices for CDs, so make sure to
skip them when reading /etc/fstab.  This is the same as done for
/dev/fdN devices, i.e. floppy devices.
2017-02-22 18:57:33 +01:00
Richard W.M. Jones
7ac977f12c New APIs: guestfs_inspect_get_windows_software_hive and guestfs_inspect_get_windows_system_hive.
The inspection code already computed the paths of the software hive
(twice!) and the system hive, plus we also recompute the same paths
elsewhere, in virt-v2v for example.  Therefore it makes sense to store
the paths from the inspection code and make them available through two
new APIs.
2017-02-21 13:33:42 +00:00
Richard W.M. Jones
8ee7da48c5 lib, tools, v2v: Use unsafe flag when reading (but NOT writing) hives.
Pass the HIVEX_OPEN_UNSAFE flag when opening hives for reading.
Do NOT pass it when opening hives for writing.

This should make inspection, virt-win-reg and virt-v2v more tolerant
about handling Windows Registry corruption, without increasing the
risk of causing new corruption in hives.
2017-02-17 14:51:15 +00:00
Pino Toscano
7a3854001e New API: mksquashfs
Introduce a new API to create a new squashfs filesystem out of a path
in the guest.  It can be configured to exclude paths based on patterns,
and to select which compression use for the filesystem.

The advantage of running mksquashfs directly in the appliance is that
ownerships are properly saved, as opposed to tar_out + local untar.
2017-02-15 14:44:13 +01:00
Richard W.M. Jones
0de08f6527 daemon: Allow ADD_ARG macro to be used everywhere.
This is a simple macro with no dependencies.  Allow it to be used from
any program.
2017-02-08 12:47:17 +00:00
Pino Toscano
ab0cf0012f fuse: use the configured program name
When initializing FUSE, use the program name as set (either
automatically or manually) in the guestfs handle.
2017-02-06 10:09:58 +01:00
Richard W.M. Jones
f161c9ea57 Rename src/ to lib/ 2017-01-26 15:05:46 +00:00