tests: Add SKIP_TEST_* variables to allow these tests to be skipped.

By setting these variables, we can skip tests that fail on
RHEL 5.
(cherry picked from commit 145f35badfd9ca4a6d9f54f7732566a5e5114876)
ruby: Fix libruby test.

If -lruby was not available, this used to define HAVE_LIBRUBY=0.
However this meant that the later test -n "$HAVE_LIBRUBY" would
be successful, whereas it should fail in this case.
(cherry picked from commit 823ba05ebd8f1a12574a3f154aaf7c8b4f2aeeac)
ruby: Add a replacement rb_hash_lookup function for Ruby 1.8.5.

This function was first added to Ruby in 1.8.7.
(cherry picked from commit 8098d062b4cb70defd4aecba0ba8cd75cf893751)
part-get-bootable: Fix when partitions are missing or unordered (RHBZ#602997).

The original fix for this in
commit 511c82df46f5c6f4a7f984fdb81d4691038ed6da was not complete, in
that it did not fix the case of the old (pre '-m' option) parted.
This doesn't matter for Fedora, but it matters for RHEL 5 which has
this ancient parted.
(cherry picked from commit 4d3ec25b47361601604e2f585178393e60f4cd4d)
test-virt-resize: Replace truncate with guestfish sparse.

Another instance of 'truncate' command.

See commit 39df80dcc0e485e69048bddbf33c259ce532e50d for an
explanation.
(cherry picked from commit ef1514aa1e0a099d71cbb7d2c5f24f9f32e1939d)
lib: Remove obsolete NETWORK, ROUTER definitions in header file.

These haven't been used since we switched over to virtio-serial.
(cherry picked from commit 78a515ec4a4e8650bd2e1ffc0bfbb97b9568306d)
tests: Add thread IDs to test of bug 790721.
(cherry picked from commit 90d0beb3c528d91029349b64d0159836c776189b)
launch: Log errors from close syscall.
(cherry picked from commit ef5c02c6ee72eb8e127115923951777a2c2b8480)
launch: Set g->sock = -1 to avoid double-close.

This fixes commit ef5c02c6ee72eb8e127115923951777a2c2b8480.
(cherry picked from commit 11317b5d1243f3afc35f7abe8edc646f75813e36)
launch: Ensure errno from test_qemu_cmd is captured and printed.

(cherry picked from commit 9e221e55b61e9f1cd0caf292ca609a4ca26f1d4d)
launch: Avoid double-close when qemu exits early.

The stdin and stdout of the qemu process are aliased to g->fd:

  g->fd[0] = wfd[1];
  g->fd[1] = rfd[0];

However if the child exits early, then child_cleanup closes g->fd[0],
g->fd[1], AND the code at the cleanup1 label closes wfd[1], rfd[0],
resulting in a double-close.

Avoid this case by setting wfd[1], rfd[0] to -1.  In the cleanup1
label, only close wfd[1], rfd[0] if they are not -1, and add the same
for g->fd[0], g->fd[1].
(cherry picked from commit c87956837e962072fff61edef5b18e55ad42d730)
./run: Fix indenting for shell script.
(cherry picked from commit bbb7d75c91450ab029edb794b0486eeb8220e4fd)
gobject: bindtests: gjs exception behaviour changed, fix test.

When libguestfs calls 'error (g, "error")', gjs in F17 throws
error.message == "Error invoking Guestfs.test0rinterr: error"

In F18, error.message is simply the string "error".

Fix the test so it works for both cases.
(cherry picked from commit 6afb7336e33dc28c4fd1a4545a8298ee36c10723)
src/actions.c: Include <config.h> in this generated file.

On RHEL 5, because _GNU_SOURCE was not defined, open_memstream was not
being declared, resulting in miscompilation and a segfault in the
trace code whenever open_memstream returned a pointer >= 0x80000000
(which would be truncated to a 32 bit int and then sign-extended).
(cherry picked from commit 6777425636d1c04494e52c61dc44f523458d12d3)
Ensure #include <config.h> occurs in every C file.

(cherry picked from commit 1d17a6e9d8f434f952f3c171b5a81ca6b916fa1f)
Version 1.16.26.