Commit Graph

18 Commits

Author SHA1 Message Date
Brian Behlendorf
b4b599d250 Fix rpm dependencies
This change updates the rpm spec files to have strictly correct
package dependencies.  That means a few things:

* The zfs-modules package is now tied to a specific build of
  the spl-modules packages based on the kernel version.  This
  ensures that the correct spl-modules packages will always get
  installed and not just the newest.

* The zfs package now requires both the zfs-modules and spl
  packages.  Thus a 'yum install zfs' will pull in the minimal
  set of packages required for a functional system.

* The zfs-devel packages now require the zfs package to be
  installed which is normal behavior for -devel packages.

* Remove the redundant distribution release extension.  This
  is already added once because it is part of the kernel package
  release name.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-01-18 12:19:52 -08:00
Brian Behlendorf
3bb1ac6994 Include distribution in release
Common practice is to include the distribution in the package release.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-10-19 11:43:27 -07:00
Ned Bass
b385d7da6e Use @ZFS_META LICENSE@ in spec.in files
zfs.spec.in and zfs-modules.spec.in had the License field incorrectly
set to @LICENSE@, causing generated rpm packages to report an invalid
license string.  Fix this by using @ZFS_META_LICENSE@.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #422

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-10-18 11:11:35 -07:00
Brian Behlendorf
a65666f638 Install zfs-devel headers in /usr/include
The zfs-devel header files for linking with the libspl/libzfs
libraries should be installed under /usr/include not /include.
Ensure the correct install location is used when building an
rpm package.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-09-12 11:45:23 -07:00
Prakash Surya
7cdac8b853 Fix zfs.spec.in to use @LICENSE@ variable
The zfs.spec.in file had the license field hard coded to specify the
CDDL. This was changed to use the @LICENSE@ variable, maintaining
consistency with the zfs-modules.spec.in file.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-09-06 13:38:46 -07:00
Prakash Surya
2e79a04a58 Fix package URLs to use the github repository
The URL field in the zfs-modules and zfs package spec files were
updated to point to the ZFS on Linux repository hosted by github.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-09-06 13:37:13 -07:00
Kyle Fuller
146cde8f4a Move 90-zfs udev rule from dracut to udev/rules.d
This rule does not need to be dracut specific.  Automatically loading
the zfs module stack when a zfs device is detected is usually desirable.
My only concern is that this might cause trouble for large pools where
we don't want to automatically import the pool until all the disks are
available.  However, we'll cross that bridge when we come to it.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-08-19 16:26:13 -07:00
Kyle Fuller
12d06bac9b Move udev rules from /etc/udev to /lib/udev
This change moves the default install location for the zfs udev
rules from /etc/udev/ to /lib/udev/.  The correct convention is
for rules provided by a package to be installed in /lib/udev/.
The /etc/udev/ directory is reserved for custom rules or local
overrides.

Additionally, this patch cleans up some abuse of the bindir install
location by adding a udevdir and udevruledir install directories.
This allows us to revert to the default bin install location.  The
udev install directories can be set with the following new options.

  --with-udevdir=DIR      install udev helpers [EPREFIX/lib/udev]
  --with-udevruledir=DIR  install udev rules [UDEVDIR/rules.d]

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #356
2011-08-08 16:21:10 -07:00
Fajar A. Nugraha
1fa3bb750d Remove zfs service only on uninstall, not on upgrade
This caused problems on upgrade using RPM:

* The new version will run chkconfig --add, which has no effect
  since the service was already added.

* The old version will run chkconfig --del, which caused zfs
  service removal.

Only run "chkconfig --del" on complete uninstall, by checking
the value of "$1" to %preun, which will be "0" on uninstall,
and "1" on upgrade.

  http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #314
2011-07-08 11:44:17 -07:00
Brian Behlendorf
db97f88646 Update rpm/deb packages to be FHS compliant
This change is the first step towards updating the default
rpm/deb packages to be FHS compliant.  It accomplishes this
by passing the following options to ./configure to ensure the
zfs build products are installed in FHS compliant locations.

  ./configure --prefix=/ --bindir=/lib/udev \
    --libexecdir=/usr/libexec --datadir=/usr/share

The core zfs utilities (zfs, zpool, zdb) are now be installed
in /sbin, the core libraries in /lib, and the udev helpers
(zpool_id, zvol_id) are in /lib/udev with the other udev
helpers.

The remaining files in the zfs package remain in their
previous locations under /usr.
2011-06-17 13:36:16 -07:00
Brian Behlendorf
18f4238277 Add parted and lsscsi dependencies to zfs-test
The zfault.sh and zconfig.sh test scripts requires the parted
utility, the lsscsi utility, and the scsi_debug module.  To
ensure the utilities are available they have been added as
dependencies to zfs-test package.  Checking for scsi_debug
is a little more problematic because if it's missing you will
need to build it.  For clarity the documention has been updated
to mention this.

Closes #205
Closes #206
2011-04-19 15:22:46 -07:00
Fajar A. Nugraha
1f5fd9d478 Spec file compat, %{datadir}
The dracut change caused an error during "make rpm".  The cause
is simple, RHEL5 does not recognize the %{datarootdir} macro in
zfs.spec.  It was changed to %{datadir} which fixes the build.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-03-25 10:08:49 -07:00
Manuel Amador (Rudd-O)
ae26d0465a Add dracut support
To simplify the process of using zfs as your root filesystem a
zfs-drucat sub-package has been added.  This sub-package adds a zfs
dracut module which allows your initramfs to be rebuilt with zfs
support.  The process for doing this is still complicated but there
is clearly interest from the community about getting this working
well and documented.  This should help lay some of the groundwork.

Longer term these changes should be pushed in the upstream dracut
package.  Once that occurs this subpackage will no longer be
required for new systems, however we may want to conditionally
build this package in the future for systems running older
dracut versions.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-03-17 16:52:04 -07:00
Brian Behlendorf
01c0e61da0 Add init scripts
To support automatically mounting your zfs on filesystem on boot
a basic init script is needed.  Unfortunately, every distribution
has their own idea of the _right_ way to do things.  Rather than
write one very complicated portable init script, which would be
invariably replaced by the distributions own anyway.  I have
instead added support to provide multiple distribution specific
init scripts.

The correct init script for your distribution will be selected
by ZFS_AC_DEFAULT_PACKAGE which will set DEFAULT_INIT_SCRIPT.
During 'make install' the correct script for your system will
be installed from zfs/etc/init.d/zfs.DEFAULT_INIT_SCRIPT to the
usual /etc/init.d/zfs location.

Currently, there is zfs.fedora and a more generic zfs.lsb init
script.  Hopefully, the distribution maintainers who know best
how they want their init scripts to function will feedback their
approved versions to be included in the project.

This change does not consider upstart jobs but I'm not at all
opposed to add that sort of thing.
2011-03-17 16:51:54 -07:00
Brian Behlendorf
d53368f675 Fix mount helper
Several issues related to strange mount/umount behavior were reported
and this commit should address most of them.  The original idea was
to put in place a zfs mount helper (mount.zfs).  This helper is used
to enforce 'legacy' mount behavior, and perform any extra mount argument
processing (selinux, zfsutil, etc).  This helper wasn't ready for the
0.6.0-rc1 release but with this change it's functional but needs to
extensively tested.

This change addresses the following open issues.
Closes #101
Closes #107
Closes #113
Closes #115
Closes #119
2011-03-09 15:26:48 -08:00
Brian Behlendorf
6283f55ea1 Support custom build directories and move includes
One of the neat tricks an autoconf style project is capable of
is allow configurion/building in a directory other than the
source directory.  The major advantage to this is that you can
build the project various different ways while making changes
in a single source tree.

For example, this project is designed to work on various different
Linux distributions each of which work slightly differently.  This
means that changes need to verified on each of those supported
distributions perferably before the change is committed to the
public git repo.

Using nfs and custom build directories makes this much easier.
I now have a single source tree in nfs mounted on several different
systems each running a supported distribution.  When I make a
change to the source base I suspect may break things I can
concurrently build from the same source on all the systems each
in their own subdirectory.

wget -c http://github.com/downloads/behlendorf/zfs/zfs-x.y.z.tar.gz
tar -xzf zfs-x.y.z.tar.gz
cd zfs-x-y-z

------------------------- run concurrently ----------------------
<ubuntu system>  <fedora system>  <debian system>  <rhel6 system>
mkdir ubuntu     mkdir fedora     mkdir debian     mkdir rhel6
cd ubuntu        cd fedora        cd debian        cd rhel6
../configure     ../configure     ../configure     ../configure
make             make             make             make
make check       make check       make check       make check

This change also moves many of the include headers from individual
incude/sys directories under the modules directory in to a single
top level include directory.  This has the advantage of making
the build rules cleaner and logically it makes a bit more sense.
2010-09-08 12:38:56 -07:00
Brian Behlendorf
1ae93745d2 Minor packaging fixes
The GIT file was removed from the tree because I have stopped
using TopGit.  Because of this is must also be removed from
the top level Makefile.am as will as the zfs.spec.in file
which referenced it.

Fix type in lib/libzpool/Makefile.am which was preventing
the needed zrlock.h header from being included by 'make dist'.
I simply had the name wrong in the Makefile.am.

Regenerated autogen.sh build products.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-09-01 15:42:32 -07:00
Brian Behlendorf
c9c0d073da Add build system
Add autoconf style build infrastructure to the ZFS tree.  This
includes autogen.sh, configure.ac, m4 macros, some scripts/*,
and makefiles for all the core ZFS components.
2010-08-31 13:41:27 -07:00