builder: Don't run virt-resize when not necessary.

If:
 - the output is a regular file
 - the output format is raw
 - the user didn't specify the --size option
then we don't need to run virt-resize.  Simply uncompress
the template directly to the output file.

(cherry picked from commit 2f3a3e308af8012501437f723471a66537ecbf64)
builder: Make xzcat binary configurable and use AC_PATH_PROG.

(cherry picked from commit 0e18bccb648f8c96366ae53746d83bd009f924f7)
builder: Use pxzcat (optionally) to speed up xzcat step.

(cherry picked from commit d4450c6590744ab96c7e0c3b21325d1eff666f29)
builder: Add --no-sync option to avoid sync on exit.

(cherry picked from commit 3f46a92ed5737bb8d75630a39729f95bc96417f6)
builder: Add --mkdir option to create directories.

(cherry picked from commit 99840550d5508b228ee4b2533ad94da517873f76)
builder: Allow --upload to a directory.

Also set the owner and permissions on the destination file correctly.

(cherry picked from commit 10c849ed1cb4375c5ef811197fa0a3206d365b86)
builder: Add --write option to write a literal file.

(cherry picked from commit 0520aa3c42fbb174be37ef75b19390855d225897)
builder: Document how to boot VMs directly in qemu or KVM.

(cherry picked from commit 8b34855684fb660823a2801a4a5e8be32a6cc40f)
firstboot: Send the output to the console as well as to the log file.

For systemd:
Currently stdout+stderr go to the journal (these are effectively
empty unless there are gross errors).  The output of the commands
goes to the log file.

With this change, the output goes to the journal, the console and
the log file.

For SysV-init:
Currently stdout+stderr go to the console (but these are effectively
empty).  The output of the commands goes to the log file.

With this change, the output goes to the console and the log file.

(cherry picked from commit f114e28cc80eabdcf47c97e7e3895065cdfe4886)
builder: Add a section on performance to the manual.

(cherry picked from commit 2937c035958f84986e84c47df49f79d19c4b5b59)
builder: Add -m/--memsize and --smp command line options.

(cherry picked from commit 42e445f98692c6344baafaab1da10e821288ac0a)
builder: Allow multiple source paths to be specified.

Users can now specify multiple source paths, eg:

  virt-builder --source http://example.com/foo \
    --source http://example.com/bar

to get templates from multiple places.

There is still only one built-in path, but we can add more later.

(cherry picked from commit bb4e882d61b49045aabd35912ae7e3a18cd6028b)
builder: Add a real scanner/parser for index files.

This adds a tool called virt-index-validate to validate index files.

(cherry picked from commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633)
builder: Fix missing files in EXTRA_DIST.

This fixes commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.

(cherry picked from commit 2035a75d66676c5fb2cc047a36c174dd953cd1b9)
builder/website: Add index validation test script.

(cherry picked from commit 154bfb7dd46e7998eed1d40ead95923590763739)
builder: Internal implementation of parallel xzcat (pxzcat).

Instead of calling out to the pxzcat program, use an internal
implementation.  This requires liblzma to be available at build time.
If it's not available, fall back to using regular xzcat.

It is intended that eventually this code will go away when regular
xzcat / unxz is able to use threads.

(cherry picked from commit 681c88ef5d69b1dec4b929ff3451c45968023e5a)
builder/website: Add validate.sh test script to EXTRA_DIST.

This fixes commit 154bfb7dd46e7998eed1d40ead95923590763739.

(cherry picked from commit 92206e8d09455b3ec63d44e4b55d5eef415681af)
builder: Add missing dependency.

index-parser-c.c depends on index-parse.h being created first.
However without an explicit dependency, this is not done (and implicit
deps don't work because automake doesn't sufficiently understand OCaml
programs).

This fixes commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.

(cherry picked from commit dfe97b352d6b398c3cb3ddb1c9984767722e514b)
builder: Add some generated files to CLEANFILES.

This updates commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.

(cherry picked from commit 01551e546293bbbd094d4d4acfdaf421f7758251)
builder: Add dependency from index-parse.h to index-validate.

For some reason automake doesn't get this dependency right,
resulting in occasional build failures if yacc races the
rest of the build.

(cherry picked from commit e3ac293e869a4c69225e3d954b812e9bf21588a1)