appliance: Add libsystemd0 (and systemd as an alternative for sysvinit) on Debian-based systems
v2v: Fix typo in comment.
v2v: Remove source.s_arch field and find architecture through inspection.

Previously we required that the source hypervisor knew the
architecture of the guest, and passed that through to KVM.

However this was error-prone for several reasons:

 - OVF (-i ova) doesn't define the architecture

 - Disk images (-i disk) don't have an associated architecture

 - Libvirt XML sometimes lacks the <type arch=...> field, especially
   for RHEL 5-era libvirt.

 - It might not be set correctly for the guest.

We know the real architecture from inspection of the guest, so use
that instead.
aarch64: Add support to file_architecture API.

Add support for aarch64 to the file_architecture API, so we can
detect aarch64 guests correctly.

Add a test binary and library.  These were generated on an aarch64
machine by doing:

  echo 'main(){}' > bin.c
  gcc bin.c -o bin-aarch64-dynamic
  strip --strip-all bin-aarch64-dynamic
  echo '' > lib.c
  gcc -shared lib.c -o lib-aarch64.so
  strip --strip-all lib-aarch64.so
v2v: Clarify description of ov_sd field in comment.
v2v: Move target actual size computation into core v2v.ml code.

This was only calculated for RHEV, but might benefit other output
modes in future, and is generic code, so move it into the core code.
v2v: Move mpstat type definition.

It's only used by the core v2v.ml code, so move it to that file.

This is just code motion.
tests/guests: Don't calculate checksums of generated images.

Turns out not to be useful, and takes a long time.

This reverts commit 0c605eb94f20cb08e4a858988e0da121af6f66cb.
tests/data: Remove abssymlink.

This file causes the test ISO to be rebuilt every time.

Instead of including it as a Makefile dependency, create it just
before making the ISO, which has the same effect.

A test in fish/ also used this file.  Change it so it doesn't need it.
fuse: Rewrite test-fuse.sh in C.

This gives us finer control over how system calls are done,
and also potentially lets us test more.

Currently two tests are disabled:

 - utimens because of https://bugzilla.redhat.com/show_bug.cgi?id=1144766

 - utimes because our stat call does not return the nanosecond fields
New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).

The existing APIs guestfs_stat, guestfs_lstat and guestfs_lstatlist
return a stat structure that contains atime, mtime and ctime fields
that store only the timestamp in seconds.

Modern filesystems can store timestamps down to nanosecond
granularity, and the ordinary glibc stat(2) wrapper will return these
in "hidden" stat fields:

  struct timespec st_atim;            /* Time of last access.  */
  struct timespec st_mtim;            /* Time of last modification.  */
  struct timespec st_ctim;            /* Time of last status change.  */

with the following macros defined for backwards compatibility:

  #define st_atime st_atim.tv_sec
  #define st_mtime st_mtim.tv_sec
  #define st_ctime st_ctim.tv_sec

It is not possible to redefine guestfs_stat to return a longer struct
guestfs_stat with room for the extra nanosecond fields, because that
would break the ABI of guestfs_lstatlist as it returns an array
containing consecutive stat structs (not pointers).  Changing the
return type of guestfs_stat would break API.  Changing the generator
to support symbol versioning is judged to be too intrusive.

Therefore this adds a new struct (guestfs_statns) and new APIs:

  guestfs_statns
  guestfs_lstatns
  guestfs_lstatnslist

which return the new struct (or array of structs in the last case).

The old APIs may of course still be used, forever, but are deprecated
and shouldn't be used in new programs.

Because virt tools are compiled with -DGUESTFS_WARN_DEPRECATED=1, I
have updated all the places calling the deprecated functions.  This
has revealed some areas for improvement: in particular virt-diff and
virt-ls could be changed to print the nanosecond fields.

FUSE now returns nanoseconds in stat calls where available, fixing
https://bugzilla.redhat.com/show_bug.cgi?id=1144891

Notes about the implementation:

- guestfs_internal_lstatlist has been removed and replaced by
  guestfs_internal_lstatnslist.  As the former was an internal API no
  one should have been calling it, or indeed can call it unless they
  start defining their own header files.

- guestfs_stat and guestfs_lstat have been changed into library-side
  functions.  They, along with guestfs_lstatlist, are now implemented
  as wrappers around the new functions which just throw away the
  nanosecond fields.
fuse: Enable futimens test (RHBZ#1144766).
v2v: For grub legacy, edit grub config file instead of using grubby (RHBZ#1141145).

The old virt-v2v code would either edit the grub config file (grub
legacy) or use grubby --set-default (grub2).

When translating this code, I figured we could use grubby in both
cases, since grubby exists for grub legacy guests.

However it doesn't appear to work for grub legacy guests.  Use the
configuration file editing method for these, same as old virt-v2v.

Thanks: Tingting Zheng
resize: simplify the code to filter parts

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Revert "v2v: -o rhev: Use chown --reference instead of 36.36 (RHBZ#1143887)."

This reverts commit 70444670acc60c5700bcd07ea7440d186eb4b60c.
Revert "v2v: -o rhev: Chown the image files and metadata after the upload."

This reverts commit dd58cde929ade2dd6bc216aac21658ed3b3f51aa.
fuse: Remove test-fuse.sh (rewritten script) from EXTRA_DIST.

This fixes commit aca076e2e2b3e03f4cf5b09cf7766925f97e4b68.
v2v: Windows: Uploading viostor driver needs upload method, not copy.

Thanks: Jeff Forbes
Version 1.27.51.
v2v: lib_ovf: Change create_meta_files so it doesn't write the files.

Change Lib_ovf.create_meta_files so that instead of writing the
.meta files, it just returns the content.  Output_rhev and
Output_vdsm are correspondingly changed so that they write the
content to the .meta files.

This is just code refactoring, there is no functional change.