Remove bogus license file from daemon subdirectory.

It was left over from when the daemon was a separate autoconf
directory, and in any case the daemon has never been GPLv3 (it is
GPLv2+).

(cherry picked from commit d5b540153fa91230524133c09c879199b8e2d902)
sparsify: Prevent overwriting block or char output devices (RHBZ#1056290).

virt-sparsify doesn't work if the output is a block device, and cannot
possibly work if the output is a char device.  Currently if you try
this it actually overwrites (deletes) the output device which is not
exactly desirable.  Therefore throw an error and exit.

Cherry picked from commit 13bca32e4ec9213e69ea55e837dea846719fb67e.
Added additional supporting functions is_block_device and
is_char_device from upstream.
fuse: In mount-local-run, test if root filesystem has been mounted (RHBZ#1057504).

It is never normally valid to use the mount-local* APIs when you
haven't mounted some filesystems in the libguestfs namespace.

If you try it, it results in some odd errors.  The mount-local-run
call is successful, but subsequent operations fail:

$ mkdir -p /tmp/mnt
$ guestfish -x -N fs mount-local /tmp/mnt : mount-local-run
libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem
libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem

With this commit, the mount-local-run call gives an error:

libguestfs: error: you must call 'guestfs_mount' first to mount a filesystem on '/'.
Note: '/tmp/mnt' is still mounted.  Use 'guestunmount /tmp/mnt' to clean up.

The error is implemented by calling guestfs_exists (g, "/") which has
the side effect of running the NEED_ROOT macro in the daemon.  (There
is no simple equivalent of NEED_ROOT on the library side.)

(cherry picked from commit 0e2489974b91e4728d544fe2aa08c2a1c9deb365)
RHEL 7: Emphasize libguestfs-winsupport package (RHBZ#627468).

This RHEL-only patch changes the error messages when the
inspection code cannot find an operating system inside the guest
image.  For a Windows guest this may happen because the user has not
installed the separate 'libguestfs-winsupport' package.  Therefore we
emphasize that the user may need to install this package.

Notes:

(1) In RHEL there are two pieces of inspection code, the old Perl code
(deprecated upstream) and the new C core inspection API.  Therefore
this patch has to touch two places with essentially the same change.

(2) This patch doesn't try to be clever and detect if it was a Windows
guest.  This should reduce the chance of failure.

Output from (Perl) virt-inspector now looks like this:

 $ virt-inspector disk.img
 No operating system could be detected inside this disk image.

 This may be because the file is not a disk image, or is not a virtual machine
 image, or because the OS type is not understood by virt-inspector.

 If you feel this is an error, please file a bug report including as much
 information about the disk image as possible.

 RHEL notice
 -------------
 libguestfs will return this error for Microsoft Windows guests if the
 separate 'libguestfs-winsupport' package is not installed. If the
 guest is running Microsoft Windows, please try again after installing
 'libguestfs-winsupport'.

Output from guestfish (ie. C core inspection API) now looks like this:

 $ guestfish -i disk.img
 guestfish: no operating system was found on this disk

 RHEL notice
 -------------
 libguestfs will return this error for Microsoft Windows guests if the
 separate 'libguestfs-winsupport' package is not installed. If the
 guest is running Microsoft Windows, please try again after installing
 'libguestfs-winsupport'.
RHEL 7: Remove libguestfs live (RHBZ#798980).

This isn't supported in RHEL 7.
RHEL 7: Exclude iptables from the appliance (RHBZ#858648).
RHEL 7: Ignore /etc/release if /etc/redhat-release exists (RHBZ#873219).

If the user has created /etc/release on a RHEL machine, don't
mis-detect the OS as NetBSD.
RHEL 7: Remove 9p APIs from RHEL (RHBZ#921710).
RHEL 7: Disable unsupported remote drive protocols (RHBZ#962113).

This disables support for unsupported remote drive protocols:

 * ftp
 * ftps
 * http
 * https
 * tftp
 * gluster
 * iscsi
 * rbd
 * sheepdog
 * ssh

Note 'nbd' is not disabled, and of course 'file' works.

We hope to gradually add some of these back over the lifetime of RHEL 7.