tests/regressions: Remove duplicate test skip code.

(cherry picked from commit e7f83f2ecc8e5e00e15e49357b37980b68fa7153)
(cherry picked from commit b647db0bc07319239bf7d073226280259352ecf4)
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)
(cherry picked from commit 281d6e3234bf78dad349f7120e188ce0fe6c4032)
virt-resize: Fix minor typo in error message.

(cherry picked from commit 7949fd3949c300ec70b85b40d8ac7a9d651cd4af)
(cherry picked from commit 9838c57cb2d620a81fa63e1631958979311de654)
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)
(cherry picked from commit d2d59b6444d82a2d428e97f295343925da5f8240)
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)
(cherry picked from commit 8c80e28821221232278a195a3bc6b48282c990e4)
virt-resize: Add notes about Windows and disk consistency (RHBZ#975753).

Also group the Windows-related notes together.

(cherry picked from commit a7aa47f4de7c61620c92f95ceb2d6de833152574)
(cherry picked from commit 7334b5d53ab86a540d1681c52d58970bab06669f)
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)
(cherry picked from commit fe03f7bafe38e5586fc8c7e9cd980e2853dbadd7)
configure: python: RHEL 6 doesn't have sysconfig, use distutils.sysconfig instead.

This works on recent Python as well.

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

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

(cherry picked from commit 8f504539f21647d72ac537fade26a02be004c63d)
(cherry picked from commit 12114c784a83e039577f60641ac6f60480c337f9)
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)
(cherry picked from commit f646124b46a10c6aa044095fe0a80cae976fc284)
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)
(cherry picked from commit c6a5dab9e5bda1f74801125f014b2a543b769fdc)
FAQ: Explain qemu-nbd & libguestfs better.

(cherry picked from commit 4b838a4b28e660cda4569c099784dc2a53dc74de)
(cherry picked from commit c6f900ce48f594abf05fbb33e671536772ddbc59)
FAQ: Fix typo.

(cherry picked from commit 02123b72429ab156512f682301946dfe02780336)
(cherry picked from commit 575d67b68eaa17095f47d474e6cdc691195b44f9)
Remove more temporary ($builddir/tmp) files when doing 'make clean'.

(cherry picked from commit 7e134f865f4e4e35f27d0c676645fffc16d85e80)
(cherry picked from commit 91a3304a7913a1d4fe0544827f495b5da1e14527)
./run: Add a better comment describing --test mode.

This is just code motion, there is no functional change.

(cherry picked from commit 745e507c2fd06f9349212efe86f8143a1f0c5a0e)
(cherry picked from commit a93f4d9029b3b04fb73b1d1f5ca6368f82638eee)
./run: Timeout tests after 1 hour.

No single test should run longer than 1 hour even on the slowest of
hardware.  We are having a problem in Koji where a test hangs and then
we end up losing the output completely, so a timeout + print the log
to that point is much better.

(cherry picked from commit caab9f1e6f7ac0d8d5209c31854d640b807519ce)
(cherry picked from commit 9d4be5edb92a39359d48c44524ec3caf596ef08a)
launch: appliance: Fix a double-free if kernel linking fails (RHBZ#983218).

This also simplifies the code which takes the building_lock around
guestfs___build_appliance.

Thanks Attila Fazekas for the detailed bug report.

(cherry picked from commit ae78381287771a781f939f26a414fc8cfdc05fd6)
(cherry picked from commit af667e7d1cf0e423a9f8498ab49667345bb63167)
./run: Increase default timeout from 1h -> 4h.

1 hour was not long enough for the C API tests when run in Koji.

This update commit caab9f1e6f7ac0d8d5209c31854d640b807519ce.

(cherry picked from commit a7b9d61cde63020686afe769ca8265a01fce208f)
(cherry picked from commit 2a25742550a863acd3207ec221eef5e6b12ad258)
library: Fix a few direct calls to perror(3).

Mainly in the FUSE code, left over from when this code lived in the
standalone guestmount program.

(cherry picked from commit ea817cdc603477ab691ce49b21ecf9f0cca6f944)
(cherry picked from commit b5b83812c5e57e7823af18cd67e046356de28d9e)