valgrind: Add suppression for memory leak found in libselinux.
(cherry picked from commit 7de25c2bca7a06cbd076d0f025cc62c0d49d8167)
proto: send_to_daemon is not an exported function.

This function is only used inside src/proto.c, so rename
it from guestfs___send_to_daemon to just send_to_daemon.
(cherry picked from commit 8136ca37194b162af714e2e0328d9171729370f9)
out-of-tree build: don't distribute extconf.rb.in template, use generated exconf.rb

Apparently, the file will only be autogenerated in $(builddir) if it
is not already present in $(srcdir).
(cherry picked from commit 0a50e644353658fb7dac97c5efe665ffd20cd3fd)
out-of-tree build: Fix localized manpages
(cherry picked from commit 43b37d02a14827376ad6c5c1449d27a875ff783e)
Still build the libguestfs-specific parts when --disable-appliance is passed to configure
(cherry picked from commit a568dec4cf00405002c723c69f2d76d9e38d3c20)
out-of-tree build: Fix link creation
(cherry picked from commit 6557d0c0824fd25cba4f96d033b77554b4b787f9)
Move Ruby-related checks from autoconf to extconf.rb; add extra check for rb_alloc_func_t

Ruby ships its own config.h which may or may not define the same
relevant constants as our autoconf-generated config.h. Instead of
trying to specify the exact path to the wanted header file we may just
as well simply use Ruby's autoconf-inspired checks and macros.
(cherry picked from commit 0ee24ccf8adb080260a5bb4260593cafe7bc016d)
filearch: Don't print errno if cpio command fails, print command status instead.

errno is meaningless here.
(cherry picked from commit 801487f2a74c4ce8d70dd4465443bd4c58719ed0)
filearch: Use a more logical way to construct the cpio command.
(cherry picked from commit 52c3edd5e008bdd74d06f5b1823d9b6495a74f4d)
Add suppression for memory leak in libmagic.
(cherry picked from commit 74297e6109b1f97b36a38c15f9bfecd841372ab5)
RHEL 5: inspect: Add macro for be32toh if one is not defined in the header files.
(cherry picked from commit bb0617859fe4b272c6ce0d1ab37db04e6d7fdfb4)
RHEL 5: gnulib: Use module mkstemps.

RHEL 5 glibc doesn't have this function.
(cherry picked from commit e73944faf40c0a880ecd66bc0e7ade3f4b8ddc2c)
RHEL 5: Replacement for 'Unix.isatty stdout' for old OCaml versions.

Unix.isatty missing on RHEL 5-era OCaml 3.09.3.
(cherry picked from commit d16bb6b70c8e70285fbc12bc85da5a4cdad9f928)
RHEL 5: tests: Use gnulib.

Gnulib defines O_CLOEXEC which is missing on RHEL 5.
(cherry picked from commit 1b5b397da8d02421c99ac4ed235cae0ec113f741)
RHEL 5: tests/xml: Define O_CLOEXEC in LD_PRELOAD library.
(cherry picked from commit d9efcfb5561a3ad3a6a557c4ec275277a48963d1)
lib: Add comment for libguestfs handle.
(cherry picked from commit 99e5ffd1de7a21a10c33fcddbdf560a8b5808800)
php: Fix test, /dev/null format must be "raw".
(cherry picked from commit d44752a110e46c1a67ef1b9aae71e2dc0691a178)
php: Print libguestfs error string if test fails.
(cherry picked from commit fe3798f366bbe581e9058ba03778dc49ee83dc4a)
launch: libvirt: Print proper dotted libvirt version.
(cherry picked from commit 02159e9aa8a1d40c8c266aabe835003ad1e32629)
launch: libvirt: Unset $PATH can cause libvirt launch to fail.

Note this fact in the error message that is printed in this situation.
(cherry picked from commit 350c478d7b7517660d7a31e860fe993f52ff5964)