mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
658fb8020f
Property to allow sets of features to be specified; for compatibility with specific versions / releases / external systems. Influences the behavior of 'zpool upgrade' and 'zpool create'. Initial man page changes and test cases included. Brief synopsis: zpool create -o compatibility=off|legacy|file[,file...] pool vdev... compatibility = off : disable compatibility mode (enable all features) compatibility = legacy : request that no features be enabled compatibility = file[,file...] : read features from specified files. Only features present in *all* files will be enabled on the resulting pool. Filenames may be absolute, or relative to /etc/zfs/compatibility.d or /usr/share/zfs/compatibility.d (/etc checked first). Only affects zpool create, zpool upgrade and zpool status. ABI changes in libzfs: * New function "zpool_load_compat" to load and parse compat sets. * Add "zpool_compat_status_t" typedef for compatibility parse status. * Add ZPOOL_PROP_COMPATIBILITY to the pool properties enum * Add ZPOOL_STATUS_COMPATIBILITY_ERR to the pool status enum An initial set of base compatibility sets are included in cmd/zpool/compatibility.d, and the Makefile for cmd/zpool is modified to install these in $pkgdatadir/compatibility.d and to create symbolic links to a reasonable set of aliases. Reviewed-by: ericloewe Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Colm Buckley <colm@tuatha.org> Closes #11468
82 lines
2.5 KiB
Makefile
82 lines
2.5 KiB
Makefile
pkgdatadir = $(datadir)/@PACKAGE@
|
|
|
|
dist_pkgdata_SCRIPTS = \
|
|
zimport.sh \
|
|
zfs.sh \
|
|
zfs-tests.sh \
|
|
zloop.sh \
|
|
zfs-helpers.sh
|
|
|
|
EXTRA_DIST = \
|
|
commitcheck.sh \
|
|
common.sh.in \
|
|
cstyle.pl \
|
|
dkms.mkconf \
|
|
dkms.postbuild \
|
|
enum-extract.pl \
|
|
kmodtool \
|
|
make_gitrev.sh \
|
|
man-dates.sh \
|
|
paxcheck.sh \
|
|
zfs2zol-patch.sed \
|
|
zol2zfs-patch.sed
|
|
|
|
define EXTRA_ENVIRONMENT
|
|
|
|
# Only required for in-tree use
|
|
export INTREE="yes"
|
|
export GDB="libtool --mode=execute gdb"
|
|
export LDMOD=/sbin/insmod
|
|
|
|
export CMD_DIR=@abs_top_builddir@/cmd
|
|
export UDEV_RULE_DIR=@abs_top_builddir@/udev/rules.d
|
|
export ZEDLET_ETC_DIR=$$CMD_DIR/zed/zed.d
|
|
export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/zed/zed.d
|
|
export ZPOOL_SCRIPT_DIR=$$CMD_DIR/zpool/zpool.d
|
|
export ZPOOL_SCRIPTS_PATH=$$CMD_DIR/zpool/zpool.d
|
|
export ZPOOL_COMPAT_DIR=$$CMD_DIR/zpool/compatibility.d
|
|
export CONTRIB_DIR=@abs_top_builddir@/contrib
|
|
export LIB_DIR=@abs_top_builddir@/lib
|
|
export SYSCONF_DIR=@abs_top_builddir@/etc
|
|
|
|
export INSTALL_UDEV_DIR=@udevdir@
|
|
export INSTALL_UDEV_RULE_DIR=@udevruledir@
|
|
export INSTALL_MOUNT_HELPER_DIR=@mounthelperdir@
|
|
export INSTALL_SYSCONF_DIR=@sysconfdir@
|
|
export INSTALL_PYTHON_DIR=@pythonsitedir@
|
|
|
|
export KMOD_SPL=@abs_top_builddir@/module/spl/spl.ko
|
|
export KMOD_ZAVL=@abs_top_builddir@/module/avl/zavl.ko
|
|
export KMOD_ZNVPAIR=@abs_top_builddir@/module/nvpair/znvpair.ko
|
|
export KMOD_ZUNICODE=@abs_top_builddir@/module/unicode/zunicode.ko
|
|
export KMOD_ZCOMMON=@abs_top_builddir@/module/zcommon/zcommon.ko
|
|
export KMOD_ZLUA=@abs_top_builddir@/module/lua/zlua.ko
|
|
export KMOD_ICP=@abs_top_builddir@/module/icp/icp.ko
|
|
export KMOD_ZFS=@abs_top_builddir@/module/zfs/zfs.ko
|
|
export KMOD_FREEBSD=@abs_top_builddir@/module/openzfs.ko
|
|
export KMOD_ZZSTD=@abs_top_builddir@/module/zstd/zzstd.ko
|
|
endef
|
|
|
|
export EXTRA_ENVIRONMENT
|
|
|
|
all-local:
|
|
-$(SED) -e '\|^export BIN_DIR=|s|$$|@abs_top_builddir@/bin|' \
|
|
-e '\|^export SBIN_DIR=|s|$$|@abs_top_builddir@/bin|' \
|
|
-e '\|^export LIBEXEC_DIR=|s|$$|@abs_top_builddir@/bin|' \
|
|
-e '\|^export ZTS_DIR=|s|$$|@abs_top_srcdir@/tests|' \
|
|
-e '\|^export SCRIPT_DIR=|s|$$|@abs_top_srcdir@/scripts|' \
|
|
$(abs_top_srcdir)/scripts/common.sh.in >common.sh
|
|
-echo "$$EXTRA_ENVIRONMENT" >>common.sh
|
|
|
|
clean-local:
|
|
-$(RM) common.sh
|
|
|
|
install-data-hook:
|
|
-$(SED) -e '\|^export BIN_DIR=|s|$$|@bindir@|' \
|
|
-e '\|^export SBIN_DIR=|s|$$|@sbindir@|' \
|
|
-e '\|^export LIBEXEC_DIR=|s|$$|@zfsexecdir@|' \
|
|
-e '\|^export ZTS_DIR=|s|$$|@datadir@/@PACKAGE@|' \
|
|
-e '\|^export SCRIPT_DIR=|s|$$|@datadir@/@PACKAGE@|' \
|
|
$(abs_top_srcdir)/scripts/common.sh.in \
|
|
>$(DESTDIR)$(datadir)/@PACKAGE@/common.sh
|