ppc64: Avoid "defined by not used" warning for is_openable function.
(cherry picked from commit 450493cf6b563389bd11f02284bd22d7ed90b5da)
ocaml: Fix parameters to ocaml_guestfs_create.

The first parameter (not used) is a unit, so declare it properly.
(cherry picked from commit 1bdfc88eba7f932b2581d55ecf4455d0e70335c2)
arm: Use #if defined instead of #ifdef.

No functional change.
(cherry picked from commit 4e5d3b06fb2f366c0010ae6aa15f9dee74261917)
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)
out-of-tree build/install fix for translations
(cherry picked from commit 6cf15e8841897d3190c3e730e6eeae06fe4b8b1d)
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)
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)