src/dbdump.c: Shouldn't depend on HAVE_HIVEX (thanks Tao Zhou).
(cherry picked from commit 4e6bf1ed653540a8954a6a11fe5a0fb424013af9)
tests: Attach copyright and license (GPLv2+) notices to various test scripts.

For some reason these tests did not have license notices.
(cherry picked from commit a1d981edeae120a0523d0974c703f1a956202415)
recipes: Checksum file/device.  Download to stdout.
(cherry picked from commit b799bc58a84e155783afae23f64f27e23ddd06dd)
java: Fix >= 32 optargs (thanks Wanlong Gao).
(cherry picked from commit f65dee769d1fc53c5963c381bf8a1bf02654f78c)
rescue: If -v / debugging enabled, don't mask error messages.

We set the error handler to NULL in order to mask "normal" error
messages that we expect to see because of the unusual way that
virt-rescue runs the appliance.  However if the user selected -v /
enabled debugging, then it is reasonable to expect they want to see
every message, so do not mask anything.
(cherry picked from commit 6fdf1f40fa85d2e6e7a1118f4cfa532ea9831b89)
fix fuse_opt_add_opt_escaped return type

I: Program returns random data in a function
E: libguestfs no-return-in-nonvoid-function guestmount.c:75

The function fuse_opt_add_opt_escaped has only one caller and a return
code is not checked.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
(cherry picked from commit bdb5689f58c0db18de28d6a703b3af4f22eded38)
extra-tests: Don't use $QEMU as a variable.

Since 'QEMU' is set (overwritten) by the autoconf-generated Makefile,
this test would always test installed qemu, not upstream qemu,
making it pretty useless.  Use another name for this variable.
(cherry picked from commit 81c682f1295a934d18bd4dc9e42b8e843df0c207)
fish: Replace '_' with '-' in deprecation cross-refs (thanks Olaf Hering).
(cherry picked from commit 8acdc23622ea95a233ac831d67c143517aa94bba)
test-tool: Print more environment variables.

This prints LIBVIRT_*, LIBVIRTD_*, LD_* and PATH, since these are all
useful for debugging and could affect libguestfs in some way.
(cherry picked from commit 281b155800f2e62b994e59bef418ca200da8e93a)
faq: Add more answers about read-only disks.
(cherry picked from commit 2c59af77545c764ddded93af2c0a0611be79376e)
faq: Tidy up headings.
(cherry picked from commit 19da851610fc14b547ff9e25101921f69edc7f2f)
faq: Make the legal section less unnecessarily legalistic.
(cherry picked from commit 244e9a2ac40fa8a1494f769740947c8a600ee8d7)
docs: Fix documentation of syntax-check target, add extra-tests.
(cherry picked from commit 6951becfdb0b69b4defff4393f48314e884ad7c1)
syntax: Remove test for TAB indentation.

Nothing particularly wrong with using TABs for indentation,
and this test also has a lot of false positives.
(cherry picked from commit ae137124ca143e57f16d103f24cb3f21a3157b09)
lib: These optargs structures are not modified, hence const.
(cherry picked from commit 5a46eadd3dcab1b8944eabc0f21097048e0ebe13)
perl: Include <inttypes.h> and assume it always defines PRId64 and PRIu64.

If these are not defined in the header files, it's a problem on
the platform which we should fix with gnulib.  Our replacement
definitions might be wrong here.
(cherry picked from commit 188b44ee458a666bee8a18ed47cccdec25859aff)
perl: Add <stdio.h> and <stdlib.h> for printf and malloc.
(cherry picked from commit cd8976a5b52425f9d7c45249e1a593a341d91c52)
syntax: Remove HAVE_*_H tests which are always true.

Gnulib supplies replacements for these headers, so there
is no need to test.

(cherry picked from commit dec73f70fc5320faec46a21f27aae6748cea3450)
lib: Remove unused headers <arpa/inet.h> and <netinet/in.h>

These were used back in the day when we used TCP for the
communications channel with the guest.
(cherry picked from commit 8747ff743216fbb6119606c22966e2283f30a54a)
lib: Rearrange headers.

This is just code motion.
(cherry picked from commit da75618fb2eecb644d8ec84c9584c402b0bc5339)