Revert "Fix build system to support new zfs 0.6.1 packaging"

This reverts commit 30bedf239d5d9eee9bc4106aa0e3871ca83fb3e9.
LU-2895 osp: return proper error in osp_precreate_reserve

Make sure the osp_precreate_reserve() always return proper error
when reserving object failed.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9d16135091ebe5ef1243416a15722c4859026e46
Reviewed-on: http://review.whamcloud.com/5683
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Revert "LU-1199 build: Overhaul lustre spec file and rpm build process"

This reverts commit e68d54836524e17f137f1b0a4b6bcd3938acdf35.
Revert "LU-1199 build: Overhaul ldiskfs spec file and build process"

This reverts commit dc121daa9beed85dc75e0550d41b901271a92b27.
Revert "LU-1199 build: Drop unused LB_LDISKFS_RELEASE macros"

This reverts commit 58016807da816856c308529c70f7f6328ffedd01.
LU-1199 build: Clean out the build directory

Clean up the build directory.  Move in the direction of reserving
"build/" for the special-purpose Makefile that lives there.
Eventually we could rewrite the autoconf tests to eliminate that
Makfile, and the build directory could disappear altogether (after
finding homes for anything else that is left).

The autoconf m4 file move into a top level "config" directory.

Most other things that have moved are put in the new "contrib"
top-level directory.  For instance, "contrib/lbuild" contains
all of the lbuild-related files, and "contrib/git-hooks" contains
the git hooks for lustre developers.

Most of the moved files were unchanged, however the lbuild scripts
needed some tweaking to deal with the new location.

Because of the way that Intel's build farm and git hooks expect to
find certain files in fixed locations I have had to leave a few
symlinks in place that point to the new locations.

Change-Id: I04dc529d4f4060b892e1e4eaa8613bbc3337c414
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5035
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1199 build: Relocate missed lbuild-fc18

lbuild-fc18 was missed in the move of the other lbuild files
to contrib/lbuild.  This relocates that file as well.

Change-Id: I2775f1e0aa4c7d17d2e1d8a114f2bea3702fec68
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5872
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1199 build: Increase ldiskfs version to 4.1.0

The ldiskfs version number has not changed in quite some time.

This brings the versioning in line with what LLNL has been using
externally, and allows us to realign on the same code.

Add an explicit requirement for "lustre-ldiskfs >= 4.1.0"
to the lustre spec file at the same time.

Change-Id: I72c9f52093942d881ee02dad8f65c2f04dbef35e
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
LU-1199 build: Drop unused LB_LDISKFS_RELEASE macros

The products of the LB_LDISKFS_RELEASE macros are completely
unused.  They also make some bad assumtions that prevent
building against the lustre-devel package, so we just remove
them.

If Lustre needs to know ldiskfs's version in the future, we
should simply add an ldiskfs header (that gets installed into
the lustre-devel rpm) that lustre can easily probe for that
information.

Change-Id: I40b96dc72f5076ba9a9dda3f41b31088fdfd4341
LU-1199 build: Overhaul ldiskfs spec file and build process

The make "rpm" target now depends on the "srpm", using rpmbuild
--rebuild to make the binary rpms from the .src.rpm file.  This
will help to ensure that we don't break the the source rpm again
in the future.

Adjust Lustre's build system to explicitly run ldiskfs's configure
script and explicitly pass configure options instead of implicitly
assuming that ldiskfs uses the same configure options as lustre.

Add an "ldiskfs-devel" package, which contains all that is
necessary to build lustre again ldiskfs.

Change-Id: Ia7aa6fe31b4b9fc74599269cfbdc400cdc70bb62
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
LU-1199 build: Overhaul lustre spec file and rpm build process

- Make it possible to override Requires and BuildRequires at
  rpmbuild time.
- Use rpmbuild --with/--without parameters.
- Group configuration settings for each distro into
  clear sections at the top of the spec file, rather than
  strewn throughout the file.
- Eliminate all configure_args parsing.  Instead explicitly
  pass arguments to rpmbuild as needed.
- Improve release string handling.  No more stray underscores
  in source rpm name!
- Don't include kernel string in version of source rpm.
- "make rpms" now employs "make src" to first build the
  source rpm.  This will help enforce disipline in keeping
  the source rpm rebuildable.

Change-Id: Id0612ade9f170d84518f01d4e8de654a7ba8af88
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
LU-3117 build: zfs-0.6.1 kmod+dkms compatibility

With the release of zfs-0.6.1 the default install location of
the zfs kmod headers and objects has changed.  The kmod headers
which are common for a zfs version are now installed under
/usr/src/zfs-<version>/ path.  The objects, which are kernel
specific, are installed under /usr/src/zfs-<version>/<kernel>/.

This was done just prior to the official 0.6.1 release because
this scheme satisfies the packaging requirements of the major
distributions.  Making the change now means we shouldn't need
to change it again.

To accomidate this change the lustre-build-zfs.m4 has been
updated in the following ways:

* The new zfs header and object paths were added to the list
  of default search paths.  The DKMS build paths were also added
  to allow compilation against zfs-kmod or zfs-dkms packages.

* Support for building the spl and zfs code recursively as
  part of the Lustre build process was removed.

* The lustre-osd-zfs packages 'Requires' line was changed to
  require zfs-kmod.  Either the zfs-kmod or zfs-dkms packages
  can be used to satisfy this requirement.

* Fix incorrect usage of @ZFS_OBJ@ in osd-zfs/Makefile.in,
  the include directory us under @ZFS@ with the headers.
  These happens to be the same location before so it never
  caused issues.

* EXTRA_LIBZFS_INCLUDE renamed ZFS_LIBZFS_INCLUDE, this was
  done for consistency.

* Failing to build ldiskfs should not automatically disable
  all server support.  The zfs osd may still be buildable.

* General m4 cleanup and simplification of lustre-build-zfs.m4.

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