diff options
author | Brian Behlendorf <[email protected]> | 2013-03-06 15:47:38 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-03-06 15:47:38 -0800 |
commit | 7c72f8e391e3fc54a9c5be54083b541cb2951780 (patch) | |
tree | 51e2979a90e2791efc547cb71dc887eadd5499e1 | |
parent | 0b4d1b5853791e1e447d74f0b229800d65b53071 (diff) | |
parent | 2016ff96d1739b5ced1d37e7266720e7531b8212 (diff) |
Merge branch 'build-system'
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | COPYRIGHT | 4 | ||||
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | PKGBUILD-zfs-modules.in | 21 | ||||
-rw-r--r-- | PKGBUILD-zfs.in | 27 | ||||
-rw-r--r-- | ZFS.RELEASE | 1 | ||||
-rw-r--r-- | cmd/zpios/zpios.h | 2 | ||||
-rw-r--r-- | cmd/zpios/zpios_main.c | 2 | ||||
-rw-r--r-- | cmd/zpios/zpios_util.c | 2 | ||||
-rw-r--r-- | config/arch.am | 44 | ||||
-rw-r--r-- | config/user-dracut.m4 | 8 | ||||
-rw-r--r-- | config/user.m4 | 1 | ||||
-rw-r--r-- | config/zfs-build.m4 | 54 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | dracut/90zfs/Makefile.am | 2 | ||||
-rw-r--r-- | etc/init.d/Makefile.am | 3 | ||||
-rw-r--r-- | etc/init.d/zfs.arch.in | 62 | ||||
-rw-r--r-- | include/zpios-ctl.h | 2 | ||||
-rw-r--r-- | include/zpios-internal.h | 2 | ||||
-rw-r--r-- | man/man8/zdb.8 | 4 | ||||
-rw-r--r-- | module/Makefile.in | 21 | ||||
-rw-r--r-- | module/zpios/pios.c | 2 | ||||
-rw-r--r-- | scripts/Makefile.am | 21 | ||||
-rw-r--r-- | scripts/common.sh.in | 19 | ||||
-rw-r--r-- | scripts/zpios-profile/Makefile.am | 22 | ||||
-rw-r--r-- | scripts/zpios-test/Makefile.am | 22 | ||||
-rw-r--r-- | scripts/zpool-config/Makefile.am | 22 | ||||
-rw-r--r-- | zfs.spec.in | 12 |
28 files changed, 63 insertions, 329 deletions
diff --git a/.gitignore b/.gitignore index 453a553dd..b2f6c669c 100644 --- a/.gitignore +++ b/.gitignore @@ -44,8 +44,6 @@ Makefile.in /zfs-modules.spec /zfs.release /dkms.conf -/PKGBUILD-zfs -/PKGBUILD-zfs-modules /stamp-h1 /.script-config /zfs-script-config.sh @@ -11,13 +11,13 @@ to, the vdev_disk.c and zvol.c implementation which are licensed under the CDDL. The zpios test code is originally derived from the Lustre pios test code -which is licenced under the GPLv2. As such the heaviliy modified zpios +which is licensed under the GPLv2. As such the heavily modified zpios kernel test code also remains licensed under the GPLv2. The latest stable and development versions of this port can be downloaded from the official ZFS on Linux site located at: -http://github.com/behlendorf/zfs/ +http://zfsonlinux.org/ This ZFS on Linux port was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) diff --git a/Makefile.am b/Makefile.am index 833bee64e..ca8a41939 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/config/rpm.am include $(top_srcdir)/config/deb.am include $(top_srcdir)/config/tgz.am -include $(top_srcdir)/config/arch.am SUBDIRS = include if CONFIG_USER @@ -14,8 +13,7 @@ endif AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh zfs.spec.in zfs-modules.spec.in EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am -EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown -EXTRA_DIST += OPENSOLARIS.LICENSE ZFS.RELEASE +EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE EXTRA_DIST += dkms.postinst copy-builtin noinst_HEADERS = zfs_config.h zfs.release @@ -36,7 +34,7 @@ install-data-local: release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \ instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + $(INSTALL) -m 644 -D $$instfile $$instdest/$$instfile; \ done endif diff --git a/PKGBUILD-zfs-modules.in b/PKGBUILD-zfs-modules.in deleted file mode 100644 index 29a94aee7..000000000 --- a/PKGBUILD-zfs-modules.in +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: Prakash Surya <[email protected]> -pkgname=@ZFS_META_NAME@-modules -pkgver=@ZFS_META_VERSION@ -pkgrel=@ZFS_META_RELEASE@ -pkgdesc="Contains kernel modules and support utilities for the zfs file system." -arch=(x86_64) -url="git://github.com/zfsonlinux/zfs.git" -license=(@ZFS_META_LICENSE@) -depends=('spl-modules') -source=(@ZFS_META_NAME@-@[email protected]) - -build() { - cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ - ./configure --with-config=kernel - make -} - -package() { - cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ - make DESTDIR=$pkgdir install -} diff --git a/PKGBUILD-zfs.in b/PKGBUILD-zfs.in deleted file mode 100644 index e37a251e7..000000000 --- a/PKGBUILD-zfs.in +++ /dev/null @@ -1,27 +0,0 @@ -# Maintainer: Prakash Surya <[email protected]> -pkgname=@ZFS_META_NAME@ -pkgver=@ZFS_META_VERSION@ -pkgrel=@ZFS_META_RELEASE@ -pkgdesc="Contains the libzfs library and support utilities for the zfs file system." -arch=(x86_64) -url="git://github.com/zfsonlinux/zfs.git" -license=(@ZFS_META_LICENSE@) -depends=('spl' 'zlib' 'e2fsprogs') -source=(@ZFS_META_NAME@-@[email protected]) - -build() { - cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ - ./configure --with-config=user \ - --prefix=/ \ - --sysconfdir=/etc \ - --libexecdir=/usr/libexec \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --with-udevdir=/lib/udev - make -} - -package() { - cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ - make DESTDIR=$pkgdir install -} diff --git a/ZFS.RELEASE b/ZFS.RELEASE deleted file mode 100644 index 8ad36b983..000000000 --- a/ZFS.RELEASE +++ /dev/null @@ -1 +0,0 @@ -ssh://[email protected]/hg/onnv/onnv-gate/onnv_147 diff --git a/cmd/zpios/zpios.h b/cmd/zpios/zpios.h index ed979459a..23c32377e 100644 --- a/cmd/zpios/zpios.h +++ b/cmd/zpios/zpios.h @@ -15,7 +15,7 @@ * Milind Dumbare <[email protected]> * * This file is part of ZFS on Linux. - * For details, see <http://github.com/behlendorf/zfs/>. + * For details, see <http://zfsonlinux.org/>. * * ZPIOS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/cmd/zpios/zpios_main.c b/cmd/zpios/zpios_main.c index 14c37e7e3..1c01d9a9d 100644 --- a/cmd/zpios/zpios_main.c +++ b/cmd/zpios/zpios_main.c @@ -15,7 +15,7 @@ * Milind Dumbare <[email protected]> * * This file is part of ZFS on Linux. - * For details, see <http://github.com/behlendorf/zfs/>. + * For details, see <http://zfsonlinux.org/>. * * ZPIOS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/cmd/zpios/zpios_util.c b/cmd/zpios/zpios_util.c index 48a0a469f..9b06655cc 100644 --- a/cmd/zpios/zpios_util.c +++ b/cmd/zpios/zpios_util.c @@ -15,7 +15,7 @@ * Milind Dumbare <[email protected]> * * This file is part of ZFS on Linux. - * For details, see <http://github.com/behlendorf/zfs/>. + * For details, see <http://zfsonlinux.org/>. * * ZPIOS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/config/arch.am b/config/arch.am deleted file mode 100644 index da43fe738..000000000 --- a/config/arch.am +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################### -# Written by Prakash Surya <[email protected]> -############################################################################### -# Build targets for RPM packages. -############################################################################### - -sarch-modules: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" sarch-common - -sarch-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" sarch-common - -sarch: sarch-modules sarch-utils - -arch-modules: -if CONFIG_KERNEL - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common -endif - -arch-utils: -if CONFIG_USER - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common -endif - -arch: arch-modules arch-utils - -arch-local: - @(if test "${HAVE_MAKEPKG}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${MAKEPKG} missing. Please install the\n" \ - "*** package for your distribution which provides ${MAKEPKG},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi;) - -sarch-common: dist - pkgbuild=PKGBUILD-$(pkg); \ - $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ - $(MAKEPKG) --allsource --skipinteg --nodeps -p $$pkgbuild || exit 1; - -arch-common: dist - pkgbuild=PKGBUILD-$(pkg); \ - $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ - $(MAKEPKG) --skipinteg -p $$pkgbuild || exit 1; diff --git a/config/user-dracut.m4 b/config/user-dracut.m4 new file mode 100644 index 000000000..6d96edc27 --- /dev/null +++ b/config/user-dracut.m4 @@ -0,0 +1,8 @@ +AC_DEFUN([ZFS_AC_CONFIG_USER_DRACUT], [ + AC_ARG_WITH(dracutdir, + AC_HELP_STRING([--with-dracutdir=DIR], + [install dracut helpers [[EPREFIX/lib/dracut]]]), + dracutdir=$withval, dracutdir='${exec_prefix}/lib/dracut') + + AC_SUBST(dracutdir) +]) diff --git a/config/user.m4 b/config/user.m4 index 109ebd5f9..6925e56f4 100644 --- a/config/user.m4 +++ b/config/user.m4 @@ -3,6 +3,7 @@ dnl # Default ZFS user configuration dnl # AC_DEFUN([ZFS_AC_CONFIG_USER], [ ZFS_AC_CONFIG_USER_UDEV + ZFS_AC_CONFIG_USER_DRACUT ZFS_AC_CONFIG_USER_ARCH ZFS_AC_CONFIG_USER_IOCTL ZFS_AC_CONFIG_USER_ZLIB diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 8e6b13b24..f05a4dcd0 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -206,48 +206,6 @@ AC_DEFUN([ZFS_AC_ALIEN], [ ]) dnl # -dnl # Check for pacman+makepkg to build Arch Linux packages. If these -dnl # tools are missing it is non-fatal but you will not be able to -dnl # build Arch Linux packages and will be warned if you try too. -dnl # -AC_DEFUN([ZFS_AC_PACMAN], [ - PACMAN=pacman - MAKEPKG=makepkg - - AC_MSG_CHECKING([whether $PACMAN is available]) - tmp=$($PACMAN --version 2>/dev/null) - AS_IF([test -n "$tmp"], [ - PACMAN_VERSION=$(echo $tmp | - $AWK '/Pacman/ { print $[3] }' | - $SED 's/^v//') - HAVE_PACMAN=yes - AC_MSG_RESULT([$HAVE_PACMAN ($PACMAN_VERSION)]) - ],[ - HAVE_PACMAN=no - AC_MSG_RESULT([$HAVE_PACMAN]) - ]) - - AC_MSG_CHECKING([whether $MAKEPKG is available]) - tmp=$($MAKEPKG --version 2>/dev/null) - AS_IF([test -n "$tmp"], [ - MAKEPKG_VERSION=$(echo $tmp | $AWK '/makepkg/ { print $[3] }') - HAVE_MAKEPKG=yes - AC_MSG_RESULT([$HAVE_MAKEPKG ($MAKEPKG_VERSION)]) - ],[ - HAVE_MAKEPKG=no - AC_MSG_RESULT([$HAVE_MAKEPKG]) - ]) - - AC_SUBST(HAVE_PACMAN) - AC_SUBST(PACMAN) - AC_SUBST(PACMAN_VERSION) - - AC_SUBST(HAVE_MAKEPKG) - AC_SUBST(MAKEPKG) - AC_SUBST(MAKEPKG_VERSION) -]) - -dnl # dnl # Using the VENDOR tag from config.guess set the default dnl # package type for 'make pkg': (rpm | deb | tgz) dnl # @@ -285,7 +243,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ redhat) DEFAULT_PACKAGE=rpm ;; fedora) DEFAULT_PACKAGE=rpm ;; gentoo) DEFAULT_PACKAGE=tgz ;; - arch) DEFAULT_PACKAGE=arch ;; + arch) DEFAULT_PACKAGE=tgz ;; sles) DEFAULT_PACKAGE=rpm ;; slackware) DEFAULT_PACKAGE=tgz ;; lunar) DEFAULT_PACKAGE=tgz ;; @@ -297,12 +255,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_RESULT([$DEFAULT_PACKAGE]) AC_SUBST(DEFAULT_PACKAGE) + DEFAULT_INIT_DIR=$sysconfdir/init.d AC_MSG_CHECKING([default init directory]) - case "$VENDOR" in - arch) DEFAULT_INIT_DIR=$sysconfdir/rc.d ;; - *) DEFAULT_INIT_DIR=$sysconfdir/init.d ;; - esac - AC_MSG_RESULT([$DEFAULT_INIT_DIR]) AC_SUBST(DEFAULT_INIT_DIR) @@ -312,7 +266,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ redhat) DEFAULT_INIT_SCRIPT=redhat ;; fedora) DEFAULT_INIT_SCRIPT=fedora ;; gentoo) DEFAULT_INIT_SCRIPT=gentoo ;; - arch) DEFAULT_INIT_SCRIPT=arch ;; + arch) DEFAULT_INIT_SCRIPT=lsb ;; sles) DEFAULT_INIT_SCRIPT=lsb ;; slackware) DEFAULT_INIT_SCRIPT=lsb ;; lunar) DEFAULT_INIT_SCRIPT=lunar ;; @@ -333,6 +287,4 @@ AC_DEFUN([ZFS_AC_PACKAGE], [ ZFS_AC_RPM ZFS_AC_DPKG ZFS_AC_ALIEN - - AS_IF([test "$VENDOR" = "arch"], [ZFS_AC_PACMAN]) ]) diff --git a/configure.ac b/configure.ac index 1a1886225..71776e7ac 100644 --- a/configure.ac +++ b/configure.ac @@ -120,8 +120,6 @@ AC_CONFIG_FILES([ scripts/common.sh zfs.spec zfs-modules.spec - PKGBUILD-zfs - PKGBUILD-zfs-modules zfs-script-config.sh zfs.release dkms.conf diff --git a/dracut/90zfs/Makefile.am b/dracut/90zfs/Makefile.am index 411206178..759aae81d 100644 --- a/dracut/90zfs/Makefile.am +++ b/dracut/90zfs/Makefile.am @@ -1,4 +1,4 @@ -pkgdracutdir = $(datadir)/dracut/modules.d/90zfs +pkgdracutdir = $(dracutdir)/modules.d/90zfs pkgdracut_SCRIPTS = \ $(top_srcdir)/dracut/90zfs/module-setup.sh \ $(top_srcdir)/dracut/90zfs/mount-zfs.sh \ diff --git a/etc/init.d/Makefile.am b/etc/init.d/Makefile.am index c1b131bcb..72093484c 100644 --- a/etc/init.d/Makefile.am +++ b/etc/init.d/Makefile.am @@ -6,8 +6,7 @@ EXTRA_DIST = \ $(top_srcdir)/etc/init.d/zfs.gentoo.in \ $(top_srcdir)/etc/init.d/zfs.lsb.in \ $(top_srcdir)/etc/init.d/zfs.lunar.in \ - $(top_srcdir)/etc/init.d/zfs.redhat.in \ - $(top_srcdir)/etc/init.d/zfs.arch.in + $(top_srcdir)/etc/init.d/zfs.redhat.in $(init_SCRIPTS): -$(SED) -e 's,@bindir\@,$(bindir),g' \ diff --git a/etc/init.d/zfs.arch.in b/etc/init.d/zfs.arch.in deleted file mode 100644 index de2ea8a2d..000000000 --- a/etc/init.d/zfs.arch.in +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -ZFS="@sbindir@/zfs" -ZPOOL="@sbindir@/zpool" -ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache" - -case "$1" in - start) - stat_busy "Starting zfs" - - if [ ! -c /dev/zfs ]; then - modprobe zfs - if [ $? -ne 0 ]; then - stat_fail - exit 1 - fi - fi - - # Import ZFS pools (via cache file) - if [ -f $ZPOOL_CACHE ]; then - $ZPOOL import -c $ZPOOL_CACHE -aN 2>/dev/null - if [ $? -ne 0 ]; then - stat_fail - exit 1 - fi - fi - - # Mount ZFS filesystems - $ZFS mount -a - if [ $? -ne 0 ]; then - stat_fail - exit 1 - fi - - # Export ZFS flesystems - $ZFS share -a - if [ $? -ne 0 ]; then - stat_fail - exit 1 - fi - - add_daemon zfs - stat_done - ;; - stop) - stat_busy "Stopping zfs" - $ZFS umount -a - rm_daemon zfs - stat_done - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac - -exit 0 diff --git a/include/zpios-ctl.h b/include/zpios-ctl.h index 234e96c11..6744ae614 100644 --- a/include/zpios-ctl.h +++ b/include/zpios-ctl.h @@ -15,7 +15,7 @@ * Milind Dumbare <[email protected]> * * This file is part of ZFS on Linux. - * For details, see <http://github.com/behlendorf/zfs/>. + * For details, see <http://zfsonlinux.org/>. * * ZPIOS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/zpios-internal.h b/include/zpios-internal.h index c9b6e0092..24a2febb2 100644 --- a/include/zpios-internal.h +++ b/include/zpios-internal.h @@ -15,7 +15,7 @@ * Milind Dumbare <[email protected]> * * This file is part of ZFS on Linux. - * For details, see <http://github.com/behlendorf/zfs/>. + * For details, see <http://zfsonlinux.org/>. * * ZPIOS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/man/man8/zdb.8 b/man/man8/zdb.8 index 08bb8e416..3ce326573 100644 --- a/man/man8/zdb.8 +++ b/man/man8/zdb.8 @@ -446,8 +446,8 @@ Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects .sp .LP -\fBExample 3 \fRDisplay basic information about object 0 in -'rpool/export/home' +\fBExample 3 \fRDisplay basic information about object 0 +in 'rpool/export/home' .sp .in +2 .nf diff --git a/module/Makefile.in b/module/Makefile.in index c69b8a355..4c6d38168 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -5,6 +5,8 @@ subdir-m += zcommon subdir-m += zfs subdir-m += zpios +INSTALL_MOD_DIR ?= extra + ZFS_MODULE_CFLAGS += -include @SPL_OBJ@/spl_config.h ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include -I@SPL@/include -I@SPL@ @@ -39,22 +41,25 @@ clean: modules_install: @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ - INSTALL_MOD_PATH=$(DESTDIR) \ - INSTALL_MOD_DIR=addon/zfs $@ + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \ + INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \ + INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) @# Remove extraneous build products when packaging - if [ -n "$(DESTDIR)" ]; then \ - find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ + kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ + if [ -n $$kmoddir ]; then \ + find $$kmoddir -name 'modules.*' | xargs $(RM); \ fi - sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ + sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \ if [ -f $$sysmap ]; then \ depmod -ae -F $$sysmap @LINUX_VERSION@; \ fi modules_uninstall: @# Uninstall the kernel modules - $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/zfs + kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@ + list='$(subdir-m)'; for subdir in $$list; do \ + $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$subdir; \ + done distdir: diff --git a/module/zpios/pios.c b/module/zpios/pios.c index aa1f2bbd3..53cc77bd9 100644 --- a/module/zpios/pios.c +++ b/module/zpios/pios.c @@ -15,7 +15,7 @@ * Milind Dumbare <[email protected]> * * This file is part of ZFS on Linux. - * For details, see <http://github.com/behlendorf/zfs/>. + * For details, see <http://zfsonlinux.org/>. * * ZPIOS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/scripts/Makefile.am b/scripts/Makefile.am index a96915938..80e9cd19a 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,7 +1,6 @@ SUBDIRS = zpool-config zpios-test zpios-profile -pkglibexecdir = $(libexecdir)/@PACKAGE@ -dist_pkglibexec_SCRIPTS = \ +dist_pkgdata_SCRIPTS = \ $(top_builddir)/scripts/common.sh \ $(top_srcdir)/scripts/zconfig.sh \ $(top_srcdir)/scripts/zfault.sh \ @@ -18,24 +17,6 @@ ZFAULT=$(top_builddir)/scripts/zfault.sh ZTEST=$(top_builddir)/cmd/ztest/ztest ZPIOS_SANITY=$(top_builddir)/scripts/zpios-sanity.sh -all: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ ! -e $$link ]; then \ - $(LN_S) $$file $$link; \ - fi \ - done - -clean: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ -L $$link ]; then \ - $(RM) $$link; \ - fi \ - done - check: @$(ZFS) -u @echo diff --git a/scripts/common.sh.in b/scripts/common.sh.in index c99894cbf..29b85d3e1 100644 --- a/scripts/common.sh.in +++ b/scripts/common.sh.in @@ -32,8 +32,7 @@ TESTS_SKIP=${TESTS_SKIP:-} prefix=@prefix@ exec_prefix=@exec_prefix@ -libexecdir=@libexecdir@ -pkglibexecdir=${libexecdir}/@PACKAGE@ +pkgdatadir=@datarootdir@/@PACKAGE@ bindir=@bindir@ sbindir=@sbindir@ udevdir=@udevdir@ @@ -42,9 +41,9 @@ sysconfdir=@sysconfdir@ ETCDIR=${ETCDIR:-/etc} DEVDIR=${DEVDIR:-/dev/disk/by-vdev} -ZPOOLDIR=${ZPOOLDIR:-${pkglibexecdir}/zpool-config} -ZPIOSDIR=${ZPIOSDIR:-${pkglibexecdir}/zpios-test} -ZPIOSPROFILEDIR=${ZPIOSPROFILEDIR:-${pkglibexecdir}/zpios-profile} +ZPOOLDIR=${ZPOOLDIR:-${pkgdatadir}/zpool-config} +ZPIOSDIR=${ZPIOSDIR:-${pkgdatadir}/zpios-test} +ZPIOSPROFILEDIR=${ZPIOSPROFILEDIR:-${pkgdatadir}/zpios-profile} ZDB=${ZDB:-${sbindir}/zdb} ZFS=${ZFS:-${sbindir}/zfs} @@ -53,11 +52,11 @@ ZPOOL=${ZPOOL:-${sbindir}/zpool} ZTEST=${ZTEST:-${sbindir}/ztest} ZPIOS=${ZPIOS:-${sbindir}/zpios} -COMMON_SH=${COMMON_SH:-${pkglibexecdir}/common.sh} -ZFS_SH=${ZFS_SH:-${pkglibexecdir}/zfs.sh} -ZPOOL_CREATE_SH=${ZPOOL_CREATE_SH:-${pkglibexecdir}/zpool-create.sh} -ZPIOS_SH=${ZPIOS_SH:-${pkglibexecdir}/zpios.sh} -ZPIOS_SURVEY_SH=${ZPIOS_SURVEY_SH:-${pkglibexecdir}/zpios-survey.sh} +COMMON_SH=${COMMON_SH:-${pkgdatadir}/common.sh} +ZFS_SH=${ZFS_SH:-${pkgdatadir}/zfs.sh} +ZPOOL_CREATE_SH=${ZPOOL_CREATE_SH:-${pkgdatadir}/zpool-create.sh} +ZPIOS_SH=${ZPIOS_SH:-${pkgdatadir}/zpios.sh} +ZPIOS_SURVEY_SH=${ZPIOS_SURVEY_SH:-${pkgdatadir}/zpios-survey.sh} LDMOD=${LDMOD:-/sbin/modprobe} LSMOD=${LSMOD:-/sbin/lsmod} diff --git a/scripts/zpios-profile/Makefile.am b/scripts/zpios-profile/Makefile.am index 403c02066..c87f16938 100644 --- a/scripts/zpios-profile/Makefile.am +++ b/scripts/zpios-profile/Makefile.am @@ -1,25 +1,7 @@ -pkglibexecdir = $(libexecdir)/@PACKAGE@/zpios-profile -dist_pkglibexec_SCRIPTS = \ +pkgdataprofiledir = $(pkgdatadir)/zpios-profile +dist_pkgdataprofile_SCRIPTS = \ $(top_srcdir)/scripts/zpios-profile/zpios-profile-disk.sh \ $(top_srcdir)/scripts/zpios-profile/zpios-profile-pids.sh \ $(top_srcdir)/scripts/zpios-profile/zpios-profile-post.sh \ $(top_srcdir)/scripts/zpios-profile/zpios-profile-pre.sh \ $(top_srcdir)/scripts/zpios-profile/zpios-profile.sh - -all: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ ! -e $$link ]; then \ - $(LN_S) $$file $$link; \ - fi \ - done - -clean: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ -L $$link ]; then \ - $(RM) $$link; \ - fi \ - done diff --git a/scripts/zpios-test/Makefile.am b/scripts/zpios-test/Makefile.am index 54935b4f8..c74e24f21 100644 --- a/scripts/zpios-test/Makefile.am +++ b/scripts/zpios-test/Makefile.am @@ -1,5 +1,5 @@ -pkglibexecdir = $(libexecdir)/@PACKAGE@/zpios-test -dist_pkglibexec_SCRIPTS = \ +pkgdatatestdir = $(pkgdatadir)/zpios-test +dist_pkgdatatest_SCRIPTS = \ $(top_srcdir)/scripts/zpios-test/16th-8192rc-4rs-1cs-4off.sh \ $(top_srcdir)/scripts/zpios-test/1th-16rc-4rs-1cs-4off.sh \ $(top_srcdir)/scripts/zpios-test/1x256th-65536rc-4rs-1cs-4off.sh \ @@ -11,21 +11,3 @@ dist_pkglibexec_SCRIPTS = \ $(top_srcdir)/scripts/zpios-test/small.sh \ $(top_srcdir)/scripts/zpios-test/tiny.sh \ $(top_srcdir)/scripts/zpios-test/lustre.sh - -all: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ ! -e $$link ]; then \ - $(LN_S) $$file $$link; \ - fi \ - done - -clean: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ -L $$link ]; then \ - $(RM) $$link; \ - fi \ - done diff --git a/scripts/zpool-config/Makefile.am b/scripts/zpool-config/Makefile.am index 87f58bbf7..2d7799413 100644 --- a/scripts/zpool-config/Makefile.am +++ b/scripts/zpool-config/Makefile.am @@ -1,5 +1,5 @@ -pkglibexecdir = $(libexecdir)/@PACKAGE@/zpool-config -dist_pkglibexec_SCRIPTS = \ +pkgdataconfigdir = $(pkgdatadir)/zpool-config +dist_pkgdataconfig_SCRIPTS = \ $(top_srcdir)/scripts/zpool-config/dm0-raid0.sh \ $(top_srcdir)/scripts/zpool-config/file-raid0.sh \ $(top_srcdir)/scripts/zpool-config/file-raid10.sh \ @@ -28,21 +28,3 @@ dist_pkglibexec_SCRIPTS = \ $(top_srcdir)/scripts/zpool-config/zpool-raid0.sh \ $(top_srcdir)/scripts/zpool-config/zpool-raid10.sh \ $(top_srcdir)/scripts/zpool-config/zpool-raidz.sh - -all: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ ! -e $$link ]; then \ - $(LN_S) $$file $$link; \ - fi \ - done - -clean: - @list='$(dist_pkglibexec_SCRIPTS)'; \ - for file in $$list; do \ - link=$$(basename $$file); \ - if [ -L $$link ]; then \ - $(RM) $$link; \ - fi \ - done diff --git a/zfs.spec.in b/zfs.spec.in index 78a2bd890..3e784ecda 100644 --- a/zfs.spec.in +++ b/zfs.spec.in @@ -5,6 +5,7 @@ %define _sbindir /sbin %define _libdir /%{_lib} %define _udevdir /lib/udev +%define _dracutdir %{_datadir}/dracut Summary: ZFS Library and Utils Group: Utilities/System @@ -60,7 +61,10 @@ which are ZFS aware. %prep %setup %build -%configure --with-config=user --without-blkid --with-udevdir=%{_udevdir} +%configure --with-config=user \ + --without-blkid \ + --with-udevdir=%{_udevdir} \ + --with-dracutdir=%{_dracutdir} make %install @@ -82,7 +86,7 @@ rm -rf $RPM_BUILD_ROOT %config %{_sysconfdir}/zfs/* %doc AUTHORS COPYING COPYRIGHT DISCLAIMER -%doc OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE +%doc OPENSOLARIS.LICENSE README.markdown %files devel %defattr(-,root,root) @@ -90,11 +94,11 @@ rm -rf $RPM_BUILD_ROOT %files test %defattr(-,root,root) -%{_libexecdir}/@PACKAGE@/* +%{_datadir}/@PACKAGE@/* %files dracut %defattr(-,root,root) -%{_datadir}/dracut/* +%{_dracutdir}/* %post [ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs |