Fix out-of-tree build for GObject bindings
(cherry picked from commit 148e8068267bcf9ce8ff3a5062747998f960619d)
Split off GObject tests that require an appliance
(cherry picked from commit 3893dc0b9436ebb4dd620c6ca9b1d038eacf83a6)
ocaml: Fix parameters to ocaml_guestfs_create.

The first parameter (not used) is a unit, so declare it properly.
(cherry picked from commit 1bdfc88eba7f932b2581d55ecf4455d0e70335c2)
Enhance BUGS script.

Since RHBZ was updated, the old python-bugzilla program broke.  When
it was fixed, I found the (undocumented) ordering of the results from
the old tool was no longer true.

This commit adds a small Perl script to sort the output predictably.
Now bugs are sorted by both bug state and bug number, so the output
should be more stable than before.

Re-enable creation of the BUGS file in 'make dist'
(this reverts commit 91f3456244e7843768da659e24ce0aeeb4ebe4b0).

Also the BUGS file has been updated.

Cherry picked from commit f90c01a5dc6a01284debdd0a45406f9d4a5e7159
and backported to libguestfs 1.16 branch.  Note the BUGS file has
been deleted, and will be updated at the next release.
fish: Change test-escapes so test is not endian-sensitive.

The test used the external 'od' command to compare the output of
guestfish with what it's supposed to be.  Unfortunately by default
this outputs groups of 2-byte words, with the words' endianness
affected by the current hardware endianness.  For example:

x86-64$ echo -n ab | od
0000000 061141
0000002

ppc64$ echo -n ab | od
0000000 060542
0000002

By using 'od -b' instead we can output bytes instead of words, and
there is no endianness issue, and the output is clearer:

x86-64$ echo -n ab | od -b
0000000 141 142
0000002

ppc64$ echo -n ab | od -b
0000000 141 142
0000002
(cherry picked from commit 20137c8731d142797e2476e35fe724c95a8a7a06)
blockdev_getbsz: Remove test.

The output of this test depends on page size, so on ppc64
it returns 64K.
(cherry picked from commit 42475dd21fbdc551137fe815efadf08a87729642)
tests: Allow regression test for bug 690819 to be skipped.
(cherry picked from commit 251b131e0a55cce21f6ee2240315903e34c4ffe1)
daemon: Always pass -F option to mke2fs.

Apparently e2fsprogs only knows that "/dev/sda" is a whole device, but
doesn't think that "/dev/vda" is.  On switching the default device
over to virtio-scsi, that causes mke2fs without -F option to complain
and ask for an interactive prompt.  Adding -F forces it to go ahead
anyway.

This caused several less-used APIs to break with virtio-scsi.
(cherry picked from commit 62c5b6db58911a5e51f59965619355437b7a7214)
tests/lvm: Don't hard-code /dev/vda in test.

Hard-coding it breaks virtio-scsi because the devices are called
/dev/sda etc.
(cherry picked from commit 7509cdf18e6d3fd96b10246f4d0417e5285e38f6)
tests: Fix spelling in comment.
(cherry picked from commit 9a5c0d39081f9f40d7ad12fbb55fb6120046679c)
tests/md: Don't hard code /dev/vda in expected output of tests.

Use a small sed script to canonicalize the device names.
(cherry picked from commit 320adf477805f703b0a1c79d86c3fb4078d11700)
appliance: Add lsscsi to package list.
(cherry picked from commit cef979b2897725b735c68f5b806d332f4cea864d)
daemon: Fix order of devices in guestfs_list_devices when > 26 disks.

Sort the device names correctly, not just treating them as
strings.  As a result, /dev/sdz < /dev/sdaa.

Cherry picked from commit c0a087b8236755e95371d5c352c9d29a3ca992c0
and backported to libguestfs 1.16.
lvm-filter: Make it work with > 26 devices.

Thanks Alasdair Kergon.
(cherry picked from commit 998ebc333dbfe40c5953e36fb42f9610727a7532)
virt-edit: Document CVE-2012-2690.
(cherry picked from commit d43e3d63de1622e98313bb797922dfd7d95ddd11)
Ignore .gdb_history file.
(cherry picked from commit 60a2f8706b305b4068df020598abee9566022e20)
configure: Look for mkisofs as well as genisoimage.

For our purposes, the two tools are compatible.
(cherry picked from commit 87de36670108a19b832e8f5ded8d413e7b575d70)
ocaml: Use OCAMLOPTFLAGS when compiling .cmx (ie. native code) files.
(cherry picked from commit dd216fedbdacfd641c2da4073ae26d3ccb6098a6)
build: Define builddir and abs_srcdir when they are missing.

RHEL 5-era autoconf did not define these, so define them manually
when they are missing.

Define builddir as '.'  The scripts require this.  It won't work
in the srcdir != builddir case, but we don't care about that for
RHEL 5.

This commit also moves the builddir / abs_srcdir variable setting
above the include of subdir-rules.mk, in case that include uses
these variables.

Useful script:

  for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do
    if ! grep -q '^abs_srcdir' $f; then
      echo missing in $f
    fi
  done
(cherry picked from commit 50aa9533e4a505e1c64dbedddb30491bfbb755d6)
fuse: Add replacement for fuse_opt_add_opt_escaped.

RHEL 5-era FUSE didn't have this function.

I copied the function out of upstream FUSE, since the license is
compatible.

Cherry picked from commit 4846b84476015874d569c14c2c30fcd71aa4d54c
and backported to libguestfs 1.16.  This includes more of the
development 'configure.ac' than is strictly necessary, but on the
other hand it brings the code closer to that development branch.