Commit Graph

92 Commits

Author SHA1 Message Date
Brian Behlendorf 46fb31d60c Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-20 10:26:33 -07:00
Brian Behlendorf b974e4bf4d Fix error message to reference the new libuuid package.
It used to be the case that libuuid was part of e2fsprogs.  However,
since other projects unrelated to e2fsprogs make use of that library
it was getting aukward to have that dependency.  The package was
split from e2fsprogs and moved to its own devel package in the
util-linux-ng project.  Anyway, I'm just updating the error message
to reflect the new upstream reality.
2010-05-20 10:00:03 -07:00
Brian Behlendorf cf07f0acd5 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-18 15:12:33 -07:00
Brian Behlendorf 4e7fd8ff9d Move build system and core script changes to correct zfs-branch. 2010-05-18 15:05:44 -07:00
Brian Behlendorf 31ce6ad143 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-18 12:32:10 -07:00
Brian Behlendorf 13ad721a84 Move user-arch.m4 change from linux-libspl to zfs-branch. 2010-05-18 12:26:48 -07:00
Brian Behlendorf 1d30e61982 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-04-22 10:01:49 -07:00
Brian Behlendorf d69cfcab40 Add top level SPL include path which is needed for *-devel builds 2010-04-22 09:55:07 -07:00
Brian Behlendorf 4886900ac9 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-26 15:49:18 -07:00
Brian Behlendorf 23ab272555 Add support for 'make -s' silent builds
The cleanest way to do this is to set AM_LIBTOOLFLAGS = --silent.  However,
AM_LIBTOOLFLAGS is not honored by automake-1.9.6-2.1 which is what I have
been using.  To cleanly handle this I am updating to automake-1.11-3 which
is why it looks like there is a lot of churn in the Makefiles.
2010-03-26 15:41:41 -07:00
Brian Behlendorf e29cc93267 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-22 16:57:25 -07:00
Brian Behlendorf e96be1888a Allow zfs_config.h to be included by dependant packages (updated)
We need dependent packages to be able to include zfs_config.h to
build properly.  This was partially solved previously be using
AH_BOTTOM to #undef common #defines (PACKAGE, VERSION, etc) which
autoconf always adds and cannot be easily removed.  This solution
works as long as the zfs_config.h is included before your projects
config.h.  That turns out to be easier said than done.  In particular,
this is a problem when your package includes its config.h using the
-include gcc option which ensures the first thing included is your
config.h.

To handle all cases cleanly I have removed the AH_BOTTOM hack and
replaced it with an AC_CONFIG_HEADERS command.  This command runs
immediately after zfs_config.h is written and with a little awk-foo
it strips the offending #defines from the file.  This eliminates
the problem entirely and makes header safe for inclusion.
2010-03-22 16:42:18 -07:00
Brian Behlendorf eb7888a1eb Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-11 14:09:58 -08:00
Brian Behlendorf e7b3766a69 Remove udev dependency when running in-tree
After much contemplation I can't see a clean way to use udev entirely
in-tree for testing.  This patch removed a horrible horrible hack which
would copy the needed udev bits in to place on your system to make it
work.  That however is simply not acceptable, nothing you in in-tree
should ever ever ever install something on your system.

Since I could not come up with a clean way to use udev in-tree.  The
fix is to simply parse the zdev config file and create the needed
symlinks in a sub-diretory or your working tree.  This is not as clean
as using udev but it does work perfectly well for in-tree testing.
2010-03-11 13:56:20 -08:00
Brian Behlendorf b258057882 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-11 10:01:42 -08:00
Brian Behlendorf 369293803b Allow recursive configure/make
Previously the ZFS configure was dependent on a correct Module{s}.symvers
file which is generated as one of the last steps of the full SPL build.
This meant you could not do a recursive configure because this will
configure all sub-packages before building any of them.

To resolve this issue the ZFS code has been updated to make a very
educated guess as to this file name at configure time.  This means
SPL_SYMBOLS may still be used in various places in the build system
such as modules/Makefile.in.  But we do give up the ability to
seemlessly detect symbols exported by the SPL at ZFS configure time.
At the moment this is not as issue, hopefully it will stay that way.
2010-03-11 09:45:23 -08:00
Brian Behlendorf 7f1fc3e842 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-08 16:08:51 -08:00
Brian J. Murrell 3f30f74414 Check for spl in ../spl if not found in install path
If the spl source could not be found in /usr/src/spl-*, also try to
find it in ../spl.  This makes finding it in a development sandbox
more natural.
2010-03-08 16:04:25 -08:00
Brian Behlendorf cb49458424 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-08 14:57:48 -08:00
Brian J. Murrell 0ec3b7e122 When no kernel source has been pointed to, first attempt to use
/lib/modules/$(uname -r)/source.  This will likely fail when building
under a mock (http://fedoraproject.org/wiki/Projects/Mock) chroot
environment since `uname -r` will report the running kernel which
likely is not the kernel in your chroot.  To cleanly handle this
we fallback to using the first kernel in your chroot.

The kernel-devel package which contains all the kernel headers and
a few build products such as Module.symver{s} is all the is required.
Full source is not needed.
2010-03-08 14:53:13 -08:00
Brian Behlendorf 6e82c8b73b Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-08 10:52:22 -08:00
Brian Behlendorf fd7578215e Configure checks for kernel build options incompatible with the license
Twice now I've been bitten by building agaist a kernel which is
configured such that it is incompatible with the CDDL license.  These
build failures don't occur until the linking phase at which point they
simply callout the offending symbol.  No location information can be
provided at this point so it often can be confusing what the problem is
particularly when building against a new kernel for the first time.

To help address this I've added a configure check which can be extended
over time to detect known kernel config options which if set will break
the ZFS build.  Currently I have just added CONFIG_DEBUG_LOCK_ALLOC which
makes mutex's GPL-only and is on by default in the RHEL6 alpha builds.
I know for a fact there are other similiar options which can be added
as they are encountered.
2010-03-08 10:27:42 -08:00
Brian Behlendorf 06d354b4f3 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios
Conflicts:

	cmd/Makefile.am
2010-03-02 10:06:26 -08:00
Brian Behlendorf 7df02c0f57 Split the udev rule from a specific configuration
While I completely agree the udev is the lesser of many possibles
evils when solving the device issue... it is still evil.  After
attempting to craft a single rule which will work for various
versions of udev in various distros.  I've come to the conclusion
the only maintainable way to solve this issue is to split the rule
from any particular configuration.

This commit provides a generic 60-zpool.rules file which use a
small helper util 'zpool_id' to parse a configuration file by
default located in /etc/zfs/zdev.conf.  The helper script maps
a by-path udev name to a more friendly name of <channel><rank>
for large configurations.

As part of this change all of the support scripts why rely on
this udev naming convention have been updated as needed.  Example
zdev.conf files have also been added for 3 different systems by
you will always need to add one for your exact hardware.

Finally, included in these changes are the proper tweaks to the
build system to ensure everything still get's packaged properly
in the rpms and can run in or out of tree.
2010-03-01 16:51:21 -08:00
Brian Behlendorf 31df8cd872 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-12-23 14:51:33 -08:00
Brian Behlendorf c824f39f95 Add a check for the fmode_t type.
This typedef first appears in 2.6.28 kernels as part of some
block device operation reworking.
2009-12-23 14:42:32 -08:00
Brian Behlendorf 7db119660f Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-11-24 14:18:55 -08:00
Brian Behlendorf c8bd25ac98 Add 'srpm' --with-config option for creation of spec files. 2009-11-24 14:13:25 -08:00
Brian Behlendorf 0fa82994c4 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-11-20 10:31:30 -08:00
Brian Behlendorf 6fabeffd3b Additional ZVOL compatibility autoconf checks and zconfig ZVOL sanity test. 2009-11-20 10:04:56 -08:00
Brian Behlendorf e4ea868a55 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-11-16 10:37:59 -08:00
Brian Behlendorf 915205a6e8 Add autoconf checks for zvol integration. 2009-11-16 10:31:10 -08:00
Brian Behlendorf 00679cea1c Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-11-12 12:56:13 -08:00
Brian Behlendorf 9ee04032de Linux 2.6.31 logical block size compatibility.
Autoconf check for bdev_logical_block_size() helper which replaced
bdev_hardsect_size() as the correct way to get the sector size.
2009-11-12 12:49:01 -08:00
Brian Behlendorf b1d8d8fef9 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-10-21 12:04:21 -07:00
Brian Behlendorf 5bf14d3400 Update zpool-configs to be udev aware.
To simplify creation and management of test configurations the
dragon and x4550 configureis have been integrated with udev.  Our
current best guess as to how we'll actually manage the disks in
these systems is with a udev mapping scheme.  The current leading
scheme is to map each drive to a simpe <CHANNEL><RANK> id.  In
this mapping each CHANNEL is represented by the letters a-z, and
the RANK is represented by the numbers 1-n.  A CHANNEL should
identify a group of RANKS which are all attached to a single
controller, each RANK represents a disk.  This provides a nice
mechanism to locate a specific drive given a known hardware
configuration.  Various hardware vendors use a similar scheme.

A nice side effect of these changes is it allowed me to make
the raid0/raid10/raidz/raidz2 setup functions generic.  This
makes adding new test configs easy, you just need to create
a udev rules file for your test config which conforms to the
naming scheme.
2009-10-21 11:38:51 -07:00
Brian Behlendorf af214824d3 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-10-15 16:45:19 -07:00
Brian Behlendorf a09d33e929 Update build system for libblkid integration 2009-10-15 16:25:18 -07:00
Brian Behlendorf 1e5d0220d0 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-10-14 15:59:03 -07:00
Brian Behlendorf 09a8c99097 Additional build system update for libefi library.
This include updating all the Makefile.am to have the correct
include paths and libraries.  In addition, the zlib m4 macro was
updated to more correctly integrate with the Makefiles.  And I
added two new macros libblkid and libuuid which will be needed by
subsequent commits for blkid and uuid support respectively.  The
blkid support is optional, the uuid support is mandatory for libefi.
2009-10-14 15:47:41 -07:00
Brian Behlendorf 89eadc4abd Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-10-09 16:44:01 -07:00
Brian Behlendorf cb91bbe6ce Additional set of build system tweaks for libefi library. 2009-10-09 16:37:32 -07:00
Brian Behlendorf 8e954086b9 Add zpios scripts to zfs-test package test infrastructure.
This change extends the existing in-tree test infrastructure such
that it can also be run as part of a the installed package.  This
simplifies testing on multiple systems and is generally all around
useful.  The scripts may still be run in-tree and will use the
in-tree build products as long as .script-config exists.
2009-08-17 21:50:55 -07:00
Brian Behlendorf 4f555da51d Add zfs-test package which includes test infrastructure.
This change extends the existing in-tree test infrastructure such
that it can also be run as part of a the installed package.  This
simplifies testing on multiple systems and is generally all around
useful.  The scripts may still be run in-tree and will use the
in-tree build products as long as .script-config exists.
2009-08-17 21:35:06 -07:00
Brian Behlendorf 9cabcac115 Required autoconf support for vdev_disk integration with 2.6.30 kernels.
2.6.22 API change
Unused destroy_dirty_buffers arg removed from prototype.

2.6.24 API change
Empty write barriers are now supported and we should use them.

2.6.24 API change
Size argument dropped from bio_endio and bi_end_io, because the
bi_end_io is only called once now when the request is complete.
There is no longer any need for a size argument.  This also means
that partial IO's are no longer possibe and the end_io callback
should not check bi->bi_size.  Finally, the return type was updated
to void.

2.6.28 API change
open/close_bdev_excl() renamed to open/close_bdev_exclusive().

2.6.29 API change
BIO_RW_SYNC renamed to BIO_RW_SYNCIO.
2009-07-29 17:14:23 -07:00
Brian Behlendorf 3a431c68c2 Remove LINUXINCLUDE from autoconf wrapper, breaks 2.6.28+ kernels.
Modern kernel build systems at least post 2.6.16 will set this properly
so we should not.  In fact post 2.6.28 the include headers have moved
under arch so the guess we make here is completely wrong.  Letting
the kernel build system set this ensure it will be correct.  Also
drop the ulimit from the Makefile which, not surprisingly, turns out
to be very non-portable.  If your expecting failures set the ulimit
in your shell before kicking off the test suite.
2009-07-27 10:39:28 -07:00
Brian Behlendorf 18ffe73d3f Check arch/default/ path when detecting kernel objects on SLES
We still preferentially use arch/arch looking for a native version
but if that fails it is acceptable to use default.
2009-07-24 16:26:17 -07:00
Brian Behlendorf f984d28e0c Cleanly handle --with-linux=NONE and --with-spl=NONE options
when used to generate source rpms.  These should not be fatal
because we actually don't need them until we build the source
rpm.  When doing mock build this is important because these
dependent rpms will only be installed if they are specificed
in the source rpms spec file.
2009-07-02 10:44:43 -07:00
Brian Behlendorf ef0a712858 Distro friendly build system / packaging improvements.
These changes bring the zfs-0.4.4 tree in to compliance with
the spl-0.4.4 packaging changes.  The bottom line is 2 source
rpms and 4 binary rpms will now be generated when creating
packages there will be:

zfs-<version>.src.rpm
- Fully rebuildable source rpm for libzfs and utils.
zfs-modules-<version>.src.rpm
- Fully rebuildable source rpm for kernel modules.

zfs-<version>.<arch>.rpm
- Binary rpm for libzfs and utils.  The utils in this package are
  compatible with all zfs-module rpms of the same version.
zfs-devel-<version>.<arch>.rpm
- Binary rpm containing headers for building against libzfs libraries.

zfs-modules-<verion>-<kernel>.arch.rpm
- Binary rpm containing the kernel modules for a specific kernel build.
  The package name contains the kernel version and you should have one
  of these packages installed to match every kernel on your system.
zfs-modules-devel-<verion>-<kernel>.arch.rpm
- Binary rpm containing development header and module symbols needed
  for building additional kernel modules which are dependent on the
  zfs module stack.

Expect minor interations on these changes as I validate they work
properly on CHAOS, RHEL, Fedora, and SLES style distros.
2009-07-01 10:53:05 -07:00
Brian Behlendorf 0f1012be0a Add basic zlib autoconf check for user space build. 2009-06-09 16:09:17 -07:00