Import ztest.1 man page.

Create a nroff man page for ZoL from:

  http://grml.org/online-docs/ztest.1.html

Which itself was derived from:

  http://opensolaris.org/os/community/zfs/ztest/

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #518
Create mount.zfs, zinject, and zpios man pages.

And update the automake templates to install them.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #518
Remove COPYING

There's no reason to keep this file around it's redundant with
the COPYRIGHT and OPENSOLARIS.LICENSE files and causes lintian
to emit an extra-license-file warning.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Change zfs-kmod-devel install path

Install the common zfs kernel development headers under
/usr/src/zfs-<version>/ rather than in a kernel specific
directory.  The kernel specific build products such as
zfs_config.h and Modules.symvers are left installed under
/usr/src/zfs-<version>/<kernel>.

This was done to be consistent with where dkms expects
kernel module source to be packaged.  It also allows for
a common zfs-kmod-devel package which includes the headers,
and per-kernel zfs-kmod-devel-<kernel> packages.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Configure --with-spl{-obj} auto-detect cleanup

Because the install location for the spl/zfs-devel headers was
changed we need to refresh the auto-detect code.  Note that
for packaging which already explicitly calls --with-spl{-obj}
nothing has changed.

The updated code is now structured like that in ZFS_AC_KERNEL
and should be cleaner and easier to maintain.  In addition,
it's stricter about detecting a valid source and object
directory.  It requires:

* The source directory contains the file 'spl.release'
* The object directory contains the file 'spl_config.h'
* The following paths will be checked.  Notice the /var/lib/
  and /usr/src paths require that the spl and zfs version be
  matched.  This is done to prevent accidentally mixing releases.

        dnl # 1) /var/lib/dkms/spl/<version>/build
        dnl # 2) /usr/src/spl-<version>/<kernel-version>
        dnl # 3) /usr/src/spl-<version>
        dnl # 4) ../spl
        dnl # 5) /usr/src/kernels/<kernel-version>

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Refresh RPM packaging

Refresh the existing RPM packaging to conform to the 'Fedora
Packaging Guidelines'.  This includes adopting the kmods2
packaging standard which is used fod kmods distributed by
rpmfusion for Fedora/RHEL.

  http://fedoraproject.org/wiki/Packaging:Guidelines
  http://rpmfusion.org/Packaging/KernelModules/Kmods2

While the spec files have been entirely rewritten from a
user perspective the only major changes are:

* The Fedora packages now have a build dependency on the
  rpmfusion repositories.  The generic kmod packages also
  have a new dependency on kmodtool-1.22 but it is bundled
  with the source rpm so no additional packages are needed.

* The kernel binary module packages have been renamed from
  zfs-modules-* to kmod-zfs-* as specificed by kmods2.

* The is now a common kmod-zfs-devel-* package in addition
  to the per-kernel devel packages.  The common package
  contains the development headers while the per-kernel
  package contains kernel specific build products.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1341
Add metaslab_debug option

Enabling metaslab debugging will prevent space maps from being
automatically unloaded.  This can significantly increase the
memory footprint but being able to dynamically control this is
helpful for debugging and certain performance testing.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Add zio_ddt_free()+ddt_phys_decref() error handling

The assumption in zio_ddt_free() is that ddt_phys_select() must
always find a match.  However, if that fails due to a damaged
DDT or some other reason the code will NULL dereference in
ddt_phys_decref().

While this should never happen it has been observed on various
platforms.  The result is that unless your willing to patch the
ZFS code the pool is inaccessible.  Therefore, we're choosing
to more gracefully handle this case rather than leave it fatal.

http://mail.opensolaris.org/pipermail/zfs-discuss/2012-February/050972.html

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1308
Create fsck.zfs and zhack man pages.

The automake templates have been updated to install them,
and the existing packaging will automatically include them.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Supplements #518
Add spl-dkms dependency to zfs-dkms

Adding the 'spl-dkms = VERSION' dependency to the zfs-dkms
package ensures the spl will be installed before zfs.  This
cleanly handles the initial 'yum localinstall' case.

However, this does not address the dkms rebuilds caused by
a new kernel being installed.  For that we still rely on the
clunky  --with-spl-timeout=<timeout> configure option which
allows the zfs compilation to be briefly delayed while the
spl components are built.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Add missing dependencies

The spl, zfs-test, and zfs-dracut packages should be pulled in
by the core zfs package.  This allows all the required zfs packages
to be installed from a yum repository by running:

  yum install zfs

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Refresh dracut module setup

60-zpool.rules was retired some time ago in favor of 69-vdev.rules.
Additionally, there is no guarentee a zpool.cache file exists so
only install it conditionally upon its existance.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Remove zfs-dkms conflict with zfs-kmod

Because the zfs-dkms package also provides zfs-kmod for the
zfs user package yum flags this as a conflict.  To avoid the
problem remove the Conflicts tag from zfs-dkms and just rely
on the one in zfs-kmod.

  zfs-dkms-0.6.0-rc14.fc18.noarch has installed conflicts
    zfs-kmod: zfs-dkms-0.6.0-rc14.fc18.noarch

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Use BUILD_DEPENDS option for dkms builds

Support was added to dkms so build dependencies can be specified.
This allows us to ensure that the spl package will always be built
before the zfs package.  Those patches have not yet been merged
upstream but they are available in the zfsonlinux/dkms repository.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Use requested kernel for dkms builds

The --with-linux and --with-linux-obj options must be specified
as part of the dkms build otherwise the package will be built
against the running kernel.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Fix minor typos and update marketing copy.

Correct spelling mistakes in the AUTHORS and DISCLAIMER files, and
update the README.markdown file to credit Illumos and mention that
the ZPL is finished.

The README.markdown file is also the first impression for a handful
of new users that discover ZoL through a web search because it
doubles as the splash page for the Github repository. The build blurbs
are therefore removed because these people should be encouraged to
visit the regular home page before installing the product.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1366
Use 'git describe' for working builds

When building from an arbitrary commit in the git tree it's useful
for the resulting packages to be uniquely identifiable.  Therefore,
the build system has been updated to detect if your compiling in
git tree.

If you are building in a git tree, and there are commits after the
last annotated tag.  Then the <id>-<hash> component of 'git describe'
will be used to overwrite the 'Release:' field in the META file.

The only tricky part is that to ensure the 'make dist' tarball is
built using the correct release.  A dist-hook was added to the top
level make file to rewrite the META file using the correct release.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Provide ${kmodname}-devel-kmod for yum-builddep

In order to ensure that yum-builddep pulls in all the build
requirements a generic ${kmodname}-devel-kmod provides line is
added.  This allows a version of the development headers to be
included without requiring knowledge of the kernel version.

This is important because unlike rpmbuild which does correctly
expand the source rpm spec file, yum-builddep does not.  Without
this generic provides line mock which relies on yum-builddep is
unable to automatically satisfy the dependency.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Include init scripts in packages

The distribution specific init scripts where excluded from the
packaging when it was reworked.  The intention is to replace
them with systemd equivilants.  However, that work has not yet
been done and the init scripts are still useful so they have
been added back in to the packaging.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Tag zfs-0.6.1

META file and release log updated.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>