utils: Add utility functions guestfs___concat_strings and guestfs__join_strings.

These concatenate strings or join them with a separator in between.

(cherry picked from commit 2ee4d5e059840b518814dd6ce615627fe0a8391d)
inspection: Fix hostname inspection because of faulty Augeas path expression (RHBZ#975412).

(cherry picked from commit 2343840936c900109b6675cc6e605026443ccf0a)
inspection: Replace phony XML with virt-inspector output from real guests.

Also add an example from a real RHEL 6 guest.

Remove rules for building these XML files which are no longer
relevant.  These files were built by running virt-inspector on real
guests, and then edited to remove excessive <application> sections.

(cherry picked from commit d7bc1dd92241ed569627b7583a014059afa5fc37)
inspector: Add a real test of inspection.

Verify that the output from inspection doesn't change, in order to
catch regressions such as RHBZ#975412.

(cherry picked from commit a86cb71fcadbed3881e593b6de9706c03ca57149)
tests: inspection: Don't complain because NTFS UUID changes between test runs.

This fixes commit a86cb71fcadbed3881e593b6de9706c03ca57149.

(cherry picked from commit 0ff0454c59ae79d47fadcc4f2837e3bfca7af105)
tests: inspection: Add example and test XML to EXTRA_DIST.

This fixes commit a86cb71fcadbed3881e593b6de9706c03ca57149.

(cherry picked from commit d88f6c0ba62d65acf8db074d33109947907ec048)
tests/regressions: Remove duplicate test skip code.

(cherry picked from commit e7f83f2ecc8e5e00e15e49357b37980b68fa7153)
launch: direct: Calculate appliance root correctly when iface drives are added (RHBZ#975797).

This also changes guestfs___appliance_command_line to allow
appliance_dev parameter to be NULL.  Previously a bogus root=
parameter could be passed.

(cherry picked from commit f7fe7e8db021b13f40aba56722d6ebe58e3777d2)
tests: Add a regression test for iface launch hangs (RHBZ#975797).

(cherry picked from commit d8a3185823e608dbddbc6185209951140b8f3b33)
virt-resize: Fix minor typo in error message.

(cherry picked from commit 7949fd3949c300ec70b85b40d8ac7a9d651cd4af)
virt-resize: Add some more debugging messages.

These are only printed when using the --debug flag and are
helpful for diagnosing problems.

(cherry picked from commit 07f3e5ae5cba03d29c5b9675c7f137463b29d424)
virt-resize: Take into account large start offset of the first partition when calculating overhead (RHBZ#974904).

Since we don't usually move the first partition, if the first
partition has an unusually large offset from the start of the disk,
then the unpartitioned space in front of that partition counts as
partitioning overhead.  However the previous surplus calculation was
not taking that into account.

This was a problem for certain Ubuntu images which are partitioned
with an 8 MB gap before the first partition.

Thanks: David Hart.
(cherry picked from commit b730bc0c4685887232daed8fafa491b28f38c300)
virt-resize: Add notes about Windows and disk consistency (RHBZ#975753).

Also group the Windows-related notes together.

(cherry picked from commit a7aa47f4de7c61620c92f95ceb2d6de833152574)
daemon: Verify ext2/3/4 filesystem name before passing to mke2fs (RHBZ#978302).

Add a utility function (fstype_is_extfs) to match ext2/3/4 filesystem
names.  This is used in a couple of places.

When passing the mke2fs -t parameter, verify that the request is for
an ext2/3/4 filesystem.  Previously we did not check this, and neither
did mke2fs when the -F flag was also used.

(cherry picked from commit fb0bd82dbe9c3cad40312e89de5b61195f5fd889)
configure: python: RHEL 6 doesn't have sysconfig, use distutils.sysconfig instead.

This works on recent Python as well.

(cherry picked from commit cd9f40945d45f2f44d3986f15dc9b82bd03ac7dc)
java: Fix comment in test script.

(cherry picked from commit 667b303c9afad887f7e23082d2d2b09fcd1f9d5c)
java: Fix typo in comment.

(cherry picked from commit 8f504539f21647d72ac537fade26a02be004c63d)
filesystem-available: Clarify documentation for this test.

See:
https://bugzilla.redhat.com/show_bug.cgi?id=980358#c1

Thanks Bo Fan.

(cherry picked from commit 280dbed9aabcb5aa2ddbed4f0c49a82235df7eae)
daemon: hivex: Check that hivex_commit is passed an absolute path (RHBZ#981683).

You will now get an error like:

libguestfs: error: hivex_commit: do_hivex_commit: path must start with a / character
(cherry picked from commit c8f0a2eb76a39a009e0591f73e5249f3bcfc4ee8)
hivex: Add some simple tests of the hivex_* APIs.

These are by no means comprehensive, but cover the basics.

The 'minimal' hive comes from hivex.

(cherry picked from commit 8c9a5d623ea79448a3912c22e90c05771d7d1c1f)