2010-08-26 22:22:58 +04:00
|
|
|
AC_DEFUN([ZFS_AC_LICENSE], [
|
|
|
|
AC_MSG_CHECKING([zfs author])
|
|
|
|
AC_MSG_RESULT([$ZFS_META_AUTHOR])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([zfs license])
|
|
|
|
AC_MSG_RESULT([$ZFS_META_LICENSE])
|
|
|
|
])
|
|
|
|
|
2014-09-23 21:31:33 +04:00
|
|
|
AC_DEFUN([ZFS_AC_DEBUG_ENABLE], [
|
2018-01-10 21:49:27 +03:00
|
|
|
DEBUG_CFLAGS="-Werror"
|
|
|
|
DEBUG_CPPFLAGS="-DDEBUG -UNDEBUG"
|
|
|
|
DEBUG_LDFLAGS=""
|
2014-09-23 21:31:33 +04:00
|
|
|
DEBUG_ZFS="_with_debug"
|
2021-03-05 23:16:41 +03:00
|
|
|
WITH_DEBUG="true"
|
2014-09-23 21:31:33 +04:00
|
|
|
AC_DEFINE(ZFS_DEBUG, 1, [zfs debugging enabled])
|
2018-01-10 21:49:27 +03:00
|
|
|
|
|
|
|
KERNEL_DEBUG_CFLAGS="-Werror"
|
|
|
|
KERNEL_DEBUG_CPPFLAGS="-DDEBUG -UNDEBUG"
|
2014-09-23 21:31:33 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_DEBUG_DISABLE], [
|
2018-01-10 21:49:27 +03:00
|
|
|
DEBUG_CFLAGS=""
|
|
|
|
DEBUG_CPPFLAGS="-UDEBUG -DNDEBUG"
|
|
|
|
DEBUG_LDFLAGS=""
|
2014-09-23 21:31:33 +04:00
|
|
|
DEBUG_ZFS="_without_debug"
|
2021-03-05 23:16:41 +03:00
|
|
|
WITH_DEBUG=""
|
2018-01-10 21:49:27 +03:00
|
|
|
|
|
|
|
KERNEL_DEBUG_CFLAGS=""
|
|
|
|
KERNEL_DEBUG_CPPFLAGS="-UDEBUG -DNDEBUG"
|
2014-09-23 21:31:33 +04:00
|
|
|
])
|
|
|
|
|
2018-01-10 21:49:27 +03:00
|
|
|
dnl #
|
|
|
|
dnl # When debugging is enabled:
|
|
|
|
dnl # - Enable all ASSERTs (-DDEBUG)
|
|
|
|
dnl # - Promote all compiler warnings to errors (-Werror)
|
|
|
|
dnl #
|
2021-06-07 22:29:27 +03:00
|
|
|
dnl # (If INVARIANTS is detected, we need to force DEBUG, or strange panics
|
|
|
|
dnl # can ensue.)
|
|
|
|
dnl #
|
2010-08-26 22:22:58 +04:00
|
|
|
AC_DEFUN([ZFS_AC_DEBUG], [
|
2014-09-23 21:31:33 +04:00
|
|
|
AC_MSG_CHECKING([whether assertion support will be enabled])
|
2010-08-26 22:22:58 +04:00
|
|
|
AC_ARG_ENABLE([debug],
|
|
|
|
[AS_HELP_STRING([--enable-debug],
|
2018-01-10 21:49:27 +03:00
|
|
|
[Enable compiler and code assertions @<:@default=no@:>@])],
|
2010-08-26 22:22:58 +04:00
|
|
|
[],
|
|
|
|
[enable_debug=no])
|
|
|
|
|
2014-09-23 21:31:33 +04:00
|
|
|
AS_CASE(["x$enable_debug"],
|
|
|
|
["xyes"],
|
|
|
|
[ZFS_AC_DEBUG_ENABLE],
|
|
|
|
["xno"],
|
|
|
|
[ZFS_AC_DEBUG_DISABLE],
|
|
|
|
[AC_MSG_ERROR([Unknown option $enable_debug])])
|
2010-08-26 22:22:58 +04:00
|
|
|
|
2021-06-07 22:29:27 +03:00
|
|
|
AS_CASE(["x$enable_invariants"],
|
|
|
|
["xyes"],
|
|
|
|
[],
|
|
|
|
["xno"],
|
|
|
|
[],
|
|
|
|
[ZFS_AC_DEBUG_INVARIANTS_DETECT])
|
|
|
|
|
|
|
|
AS_CASE(["x$enable_invariants"],
|
|
|
|
["xyes"],
|
|
|
|
[ZFS_AC_DEBUG_ENABLE],
|
|
|
|
["xno"],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([Unknown option $enable_invariants])])
|
|
|
|
|
2018-01-10 21:49:27 +03:00
|
|
|
AC_SUBST(DEBUG_CFLAGS)
|
|
|
|
AC_SUBST(DEBUG_CPPFLAGS)
|
|
|
|
AC_SUBST(DEBUG_LDFLAGS)
|
2012-02-27 22:12:40 +04:00
|
|
|
AC_SUBST(DEBUG_ZFS)
|
2021-03-05 23:16:41 +03:00
|
|
|
AC_SUBST(WITH_DEBUG)
|
2018-01-10 21:49:27 +03:00
|
|
|
|
|
|
|
AC_SUBST(KERNEL_DEBUG_CFLAGS)
|
|
|
|
AC_SUBST(KERNEL_DEBUG_CPPFLAGS)
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
AC_MSG_RESULT([$enable_debug])
|
|
|
|
])
|
|
|
|
|
2018-01-10 21:49:27 +03:00
|
|
|
AC_DEFUN([ZFS_AC_DEBUGINFO_ENABLE], [
|
2020-02-06 20:24:37 +03:00
|
|
|
DEBUG_CFLAGS="$DEBUG_CFLAGS -g -fno-inline $NO_IPA_SRA"
|
2018-01-10 21:49:27 +03:00
|
|
|
|
2022-11-30 13:27:28 +03:00
|
|
|
KERNEL_DEBUG_CFLAGS="$KERNEL_DEBUG_CFLAGS -fno-inline $KERNEL_NO_IPA_SRA"
|
2018-01-10 21:49:27 +03:00
|
|
|
KERNEL_MAKE="$KERNEL_MAKE CONFIG_DEBUG_INFO=y"
|
|
|
|
|
|
|
|
DEBUGINFO_ZFS="_with_debuginfo"
|
2014-09-23 22:29:30 +04:00
|
|
|
])
|
|
|
|
|
2018-01-10 21:49:27 +03:00
|
|
|
AC_DEFUN([ZFS_AC_DEBUGINFO_DISABLE], [
|
|
|
|
DEBUGINFO_ZFS="_without_debuginfo"
|
2014-09-23 22:29:30 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_DEBUGINFO], [
|
|
|
|
AC_MSG_CHECKING([whether debuginfo support will be forced])
|
|
|
|
AC_ARG_ENABLE([debuginfo],
|
|
|
|
[AS_HELP_STRING([--enable-debuginfo],
|
|
|
|
[Force generation of debuginfo @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[enable_debuginfo=no])
|
|
|
|
|
|
|
|
AS_CASE(["x$enable_debuginfo"],
|
|
|
|
["xyes"],
|
2018-01-10 21:49:27 +03:00
|
|
|
[ZFS_AC_DEBUGINFO_ENABLE],
|
2014-09-23 22:29:30 +04:00
|
|
|
["xno"],
|
2018-01-10 21:49:27 +03:00
|
|
|
[ZFS_AC_DEBUGINFO_DISABLE],
|
|
|
|
[AC_MSG_ERROR([Unknown option $enable_debuginfo])])
|
2014-09-23 22:29:30 +04:00
|
|
|
|
|
|
|
AC_SUBST(DEBUG_CFLAGS)
|
2018-01-10 21:49:27 +03:00
|
|
|
AC_SUBST(DEBUGINFO_ZFS)
|
|
|
|
|
|
|
|
AC_SUBST(KERNEL_DEBUG_CFLAGS)
|
|
|
|
AC_SUBST(KERNEL_MAKE)
|
|
|
|
|
2014-09-23 22:29:30 +04:00
|
|
|
AC_MSG_RESULT([$enable_debuginfo])
|
|
|
|
])
|
|
|
|
|
2018-02-16 04:53:18 +03:00
|
|
|
dnl #
|
|
|
|
dnl # Disabled by default, provides basic memory tracking. Track the total
|
|
|
|
dnl # number of bytes allocated with kmem_alloc() and freed with kmem_free().
|
|
|
|
dnl # Then at module unload time if any bytes were leaked it will be reported
|
|
|
|
dnl # on the console.
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_DEBUG_KMEM], [
|
|
|
|
AC_MSG_CHECKING([whether basic kmem accounting is enabled])
|
|
|
|
AC_ARG_ENABLE([debug-kmem],
|
|
|
|
[AS_HELP_STRING([--enable-debug-kmem],
|
|
|
|
[Enable basic kmem accounting @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[enable_debug_kmem=no])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_debug_kmem" = xyes], [
|
2020-07-01 19:05:21 +03:00
|
|
|
KERNEL_DEBUG_CPPFLAGS="${KERNEL_DEBUG_CPPFLAGS} -DDEBUG_KMEM"
|
2018-02-16 04:53:18 +03:00
|
|
|
DEBUG_KMEM_ZFS="_with_debug_kmem"
|
|
|
|
], [
|
|
|
|
DEBUG_KMEM_ZFS="_without_debug_kmem"
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST(KERNEL_DEBUG_CPPFLAGS)
|
|
|
|
AC_SUBST(DEBUG_KMEM_ZFS)
|
|
|
|
|
|
|
|
AC_MSG_RESULT([$enable_debug_kmem])
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl #
|
|
|
|
dnl # Disabled by default, provides detailed memory tracking. This feature
|
|
|
|
dnl # also requires --enable-debug-kmem to be set. When enabled not only will
|
|
|
|
dnl # total bytes be tracked but also the location of every kmem_alloc() and
|
|
|
|
dnl # kmem_free(). When the module is unloaded a list of all leaked addresses
|
|
|
|
dnl # and where they were allocated will be dumped to the console. Enabling
|
|
|
|
dnl # this feature has a significant impact on performance but it makes finding
|
|
|
|
dnl # memory leaks straight forward.
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
|
|
|
|
AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
|
|
|
|
AC_ARG_ENABLE([debug-kmem-tracking],
|
|
|
|
[AS_HELP_STRING([--enable-debug-kmem-tracking],
|
|
|
|
[Enable detailed kmem tracking @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[enable_debug_kmem_tracking=no])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_debug_kmem_tracking" = xyes], [
|
2020-07-01 19:05:21 +03:00
|
|
|
KERNEL_DEBUG_CPPFLAGS="${KERNEL_DEBUG_CPPFLAGS} -DDEBUG_KMEM_TRACKING"
|
2018-02-16 04:53:18 +03:00
|
|
|
DEBUG_KMEM_TRACKING_ZFS="_with_debug_kmem_tracking"
|
|
|
|
], [
|
|
|
|
DEBUG_KMEM_TRACKING_ZFS="_without_debug_kmem_tracking"
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST(KERNEL_DEBUG_CPPFLAGS)
|
|
|
|
AC_SUBST(DEBUG_KMEM_TRACKING_ZFS)
|
|
|
|
|
|
|
|
AC_MSG_RESULT([$enable_debug_kmem_tracking])
|
|
|
|
])
|
|
|
|
|
2021-03-05 23:16:41 +03:00
|
|
|
AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS_DETECT_FREEBSD], [
|
2022-03-12 02:26:46 +03:00
|
|
|
AS_IF([sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS'],
|
2021-03-05 23:16:41 +03:00
|
|
|
[enable_invariants="yes"],
|
|
|
|
[enable_invariants="no"])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS_DETECT], [
|
|
|
|
AM_COND_IF([BUILD_FREEBSD],
|
|
|
|
[ZFS_AC_DEBUG_INVARIANTS_DETECT_FREEBSD],
|
|
|
|
[enable_invariants="no"])
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl #
|
|
|
|
dnl # Detected for the running kernel by default, enables INVARIANTS features
|
|
|
|
dnl # in the FreeBSD kernel module. This feature must be used when building
|
|
|
|
dnl # for a FreeBSD kernel with "options INVARIANTS" in the KERNCONF and must
|
|
|
|
dnl # not be used when the INVARIANTS option is absent.
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS], [
|
|
|
|
AC_MSG_CHECKING([whether FreeBSD kernel INVARIANTS checks are enabled])
|
|
|
|
AC_ARG_ENABLE([invariants],
|
|
|
|
[AS_HELP_STRING([--enable-invariants],
|
|
|
|
[Enable FreeBSD kernel INVARIANTS checks [[default: detect]]])],
|
|
|
|
[], [ZFS_AC_DEBUG_INVARIANTS_DETECT])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_invariants" = xyes],
|
|
|
|
[WITH_INVARIANTS="true"],
|
|
|
|
[WITH_INVARIANTS=""])
|
|
|
|
AC_SUBST(WITH_INVARIANTS)
|
|
|
|
|
|
|
|
AC_MSG_RESULT([$enable_invariants])
|
|
|
|
])
|
|
|
|
|
2011-06-15 02:09:05 +04:00
|
|
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
2021-01-22 23:54:34 +03:00
|
|
|
AX_COUNT_CPUS([])
|
|
|
|
AC_SUBST(CPU_COUNT)
|
|
|
|
|
2022-02-16 18:06:08 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED
|
2022-06-20 22:53:58 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
|
2022-11-30 13:27:28 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION
|
2021-09-14 19:17:54 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
|
2018-01-10 21:49:27 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
|
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
|
2020-04-14 21:36:28 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH
|
2022-11-30 13:27:28 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW
|
2019-04-14 21:04:54 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
|
2020-02-06 20:24:37 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA
|
2022-11-30 13:27:28 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA
|
2018-01-10 21:49:27 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_ASAN
|
2022-02-04 01:35:38 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CC_UBSAN
|
Support for vectorized algorithms on x86
This is initial support for x86 vectorized implementations of ZFS parity
and checksum algorithms.
For the compilation phase, configure step checks if toolchain supports relevant
instruction sets. Each implementation must ensure that the code is not passed
to compiler if relevant instruction set is not supported. For this purpose,
following new defines are provided if instruction set is supported:
- HAVE_SSE,
- HAVE_SSE2,
- HAVE_SSE3,
- HAVE_SSSE3,
- HAVE_SSE4_1,
- HAVE_SSE4_2,
- HAVE_AVX,
- HAVE_AVX2.
For detecting if an instruction set can be used in runtime, following functions
are provided in (include/linux/simd_x86.h):
- zfs_sse_available()
- zfs_sse2_available()
- zfs_sse3_available()
- zfs_ssse3_available()
- zfs_sse4_1_available()
- zfs_sse4_2_available()
- zfs_avx_available()
- zfs_avx2_available()
- zfs_bmi1_available()
- zfs_bmi2_available()
These function should be called once, on module load, or initialization.
They are safe to use from user and kernel space.
If an implementation is using more than single instruction set, both compiler
and runtime support for all relevant instruction sets should be checked.
Kernel fpu methods:
- kfpu_begin()
- kfpu_end()
Use __get_cpuid_max and __cpuid_count from <cpuid.h>
Both gcc and clang have support for these. They also handle ebx register
in case it is used for PIC code.
Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Closes #4381
2016-02-29 21:42:27 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD
|
2019-09-05 19:34:54 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_SYSTEM
|
2016-05-12 17:51:24 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_ARCH
|
pyzfs: python3 support (build system)
Almost all of the Python code in the respository has been updated
to be compatibile with Python 2.6, Python 3.4, or newer. The only
exceptions are arc_summery3.py which requires Python 3, and pyzfs
which requires at least Python 2.7. This allows us to maintain a
single version of the code and support most default versions of
python. This change does the following:
* Sets the default shebang for all Python scripts to python3. If
only Python 2 is available, then at install time scripts which
are compatible with Python 2 will have their shebangs replaced
with /usr/bin/python. This is done for compatibility until
Python 2 goes end of life. Since only the installed versions
are changed this means Python 3 must be installed on the system
for test-runner when testing in-tree.
* Added --with-python=<2|3|3.4,etc> configure option which sets
the PYTHON environment variable to target a specific python
version. By default the newest installed version of Python
will be used or the preferred distribution version when
creating pacakges.
* Fixed --enable-pyzfs configure checks so they are run when
--enable-pyzfs=check and --enable-pyzfs=yes.
* Enabled pyzfs for Python 3.4 and newer, which is now supported.
* Renamed pyzfs package to python<VERSION>-pyzfs and updated to
install in the appropriate site location. For example, when
building with --with-python=3.4 a python34-pyzfs will be
created which installs in /usr/lib/python3.4/site-packages/.
* Renamed the following python scripts according to the Fedora
guidance for packaging utilities in /bin
- dbufstat.py -> dbufstat
- arcstat.py -> arcstat
- arc_summary.py -> arc_summary
- arc_summary3.py -> arc_summary3
* Updated python-cffi package name. On CentOS 6, CentOS 7, and
Amazon Linux it's called python-cffi, not python2-cffi. For
Python3 it's called python3-cffi or python3x-cffi.
* Install one version of arc_summary. Depending on the version
of Python available install either arc_summary2 or arc_summary3
as arc_summary. The user output is only slightly different.
Reviewed-by: John Ramsden <johnramsden@riseup.net>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8096
2018-10-31 19:22:59 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_PYTHON
|
Adopt pyzfs from ClusterHQ
This commit introduces several changes:
* Update LICENSE and project information
* Give a good PEP8 talk to existing Python source code
* Add RPM/DEB packaging for pyzfs
* Fix some outstanding issues with the existing pyzfs code caused by
changes in the ABI since the last time the code was updated
* Integrate pyzfs Python unittest with the ZFS Test Suite
* Add missing libzfs_core functions: lzc_change_key,
lzc_channel_program, lzc_channel_program_nosync, lzc_load_key,
lzc_receive_one, lzc_receive_resumable, lzc_receive_with_cmdprops,
lzc_receive_with_header, lzc_reopen, lzc_send_resume, lzc_sync,
lzc_unload_key, lzc_remap
Note: this commit slightly changes zfs_ioc_unload_key() ABI. This allow
to differentiate the case where we tried to unload a key on a
non-existing dataset (ENOENT) from the situation where a dataset has
no key loaded: this is consistent with the "change" case where trying
to zfs_ioc_change_key() from a dataset with no key results in EACCES.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7230
2018-03-18 11:34:45 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_PYZFS
|
2019-10-17 05:19:48 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_SED
|
2021-01-22 23:54:34 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_CPPCHECK
|
2021-05-22 00:43:38 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_SHELLCHECK
|
2021-12-23 23:26:19 +03:00
|
|
|
ZFS_AC_CONFIG_ALWAYS_PARALLEL
|
2011-06-15 02:09:05 +04:00
|
|
|
])
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
AC_DEFUN([ZFS_AC_CONFIG], [
|
2019-10-01 22:50:34 +03:00
|
|
|
|
|
|
|
dnl # Remove the previous build test directory.
|
|
|
|
rm -Rf build
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
ZFS_CONFIG=all
|
|
|
|
AC_ARG_WITH([config],
|
|
|
|
AS_HELP_STRING([--with-config=CONFIG],
|
|
|
|
[Config file 'kernel|user|all|srpm']),
|
|
|
|
[ZFS_CONFIG="$withval"])
|
2012-07-17 12:36:43 +04:00
|
|
|
AC_ARG_ENABLE([linux-builtin],
|
2021-01-03 03:55:55 +03:00
|
|
|
[AS_HELP_STRING([--enable-linux-builtin],
|
2012-07-17 12:36:43 +04:00
|
|
|
[Configure for builtin in-tree kernel modules @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[enable_linux_builtin=no])
|
2010-08-26 22:22:58 +04:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([zfs config])
|
|
|
|
AC_MSG_RESULT([$ZFS_CONFIG]);
|
|
|
|
AC_SUBST(ZFS_CONFIG)
|
|
|
|
|
2011-06-15 02:09:05 +04:00
|
|
|
ZFS_AC_CONFIG_ALWAYS
|
|
|
|
|
2020-04-14 21:36:28 +03:00
|
|
|
AM_COND_IF([BUILD_LINUX], [
|
2021-01-22 23:54:34 +03:00
|
|
|
AC_ARG_VAR([TEST_JOBS], [simultaneous jobs during configure])
|
2020-04-14 21:36:28 +03:00
|
|
|
if test "x$ac_cv_env_TEST_JOBS_set" != "xset"; then
|
2021-01-22 23:54:34 +03:00
|
|
|
TEST_JOBS=$CPU_COUNT
|
2020-04-14 21:36:28 +03:00
|
|
|
fi
|
|
|
|
AC_SUBST(TEST_JOBS)
|
|
|
|
])
|
|
|
|
|
2022-04-10 02:19:15 +03:00
|
|
|
ZFS_INIT_SYSV=
|
|
|
|
ZFS_INIT_SYSTEMD=
|
|
|
|
ZFS_WANT_MODULES_LOAD_D=
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
case "$ZFS_CONFIG" in
|
|
|
|
kernel) ZFS_AC_CONFIG_KERNEL ;;
|
|
|
|
user) ZFS_AC_CONFIG_USER ;;
|
2015-07-02 01:23:09 +03:00
|
|
|
all) ZFS_AC_CONFIG_USER
|
|
|
|
ZFS_AC_CONFIG_KERNEL ;;
|
2022-05-26 19:24:50 +03:00
|
|
|
dist) ;;
|
2010-08-26 22:22:58 +04:00
|
|
|
srpm) ;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT([Error!])
|
|
|
|
AC_MSG_ERROR([Bad value "$ZFS_CONFIG" for --with-config,
|
|
|
|
user kernel|user|all|srpm]) ;;
|
|
|
|
esac
|
|
|
|
|
2022-04-10 02:19:15 +03:00
|
|
|
AM_CONDITIONAL([INIT_SYSV], [test "x$ZFS_INIT_SYSV" = "xyes"])
|
|
|
|
AM_CONDITIONAL([INIT_SYSTEMD], [test "x$ZFS_INIT_SYSTEMD" = "xyes"])
|
|
|
|
AM_CONDITIONAL([WANT_MODULES_LOAD_D], [test "x$ZFS_WANT_MODULES_LOAD_D" = "xyes"])
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
AM_CONDITIONAL([CONFIG_USER],
|
2016-04-01 18:49:19 +03:00
|
|
|
[test "$ZFS_CONFIG" = user -o "$ZFS_CONFIG" = all])
|
2010-08-26 22:22:58 +04:00
|
|
|
AM_CONDITIONAL([CONFIG_KERNEL],
|
2016-04-01 18:49:19 +03:00
|
|
|
[test "$ZFS_CONFIG" = kernel -o "$ZFS_CONFIG" = all] &&
|
|
|
|
[test "x$enable_linux_builtin" != xyes ])
|
2017-03-23 03:58:47 +03:00
|
|
|
AM_CONDITIONAL([CONFIG_QAT],
|
|
|
|
[test "$ZFS_CONFIG" = kernel -o "$ZFS_CONFIG" = all] &&
|
|
|
|
[test "x$qatsrc" != x ])
|
2018-03-28 20:19:22 +03:00
|
|
|
AM_CONDITIONAL([WANT_DEVNAME2DEVID], [test "x$user_libudev" = xyes ])
|
|
|
|
AM_CONDITIONAL([WANT_MMAP_LIBAIO], [test "x$user_libaio" = xyes ])
|
2020-06-25 04:45:44 +03:00
|
|
|
AM_CONDITIONAL([PAM_ZFS_ENABLED], [test "x$enable_pam" = xyes])
|
2010-08-26 22:22:58 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl #
|
|
|
|
dnl # Check for rpm+rpmbuild to build RPM packages. If these tools
|
|
|
|
dnl # are missing it is non-fatal but you will not be able to build
|
|
|
|
dnl # RPM packages and will be warned if you try too.
|
|
|
|
dnl #
|
2013-02-18 00:10:17 +04:00
|
|
|
dnl # By default the generic spec file will be used because it requires
|
|
|
|
dnl # minimal dependencies. Distribution specific spec files can be
|
|
|
|
dnl # placed under the 'rpm/<distribution>' directory and enabled using
|
|
|
|
dnl # the --with-spec=<distribution> configure option.
|
|
|
|
dnl #
|
2010-08-26 22:22:58 +04:00
|
|
|
AC_DEFUN([ZFS_AC_RPM], [
|
|
|
|
RPM=rpm
|
|
|
|
RPMBUILD=rpmbuild
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether $RPM is available])
|
|
|
|
AS_IF([tmp=$($RPM --version 2>/dev/null)], [
|
|
|
|
RPM_VERSION=$(echo $tmp | $AWK '/RPM/ { print $[3] }')
|
|
|
|
HAVE_RPM=yes
|
|
|
|
AC_MSG_RESULT([$HAVE_RPM ($RPM_VERSION)])
|
|
|
|
],[
|
|
|
|
HAVE_RPM=no
|
|
|
|
AC_MSG_RESULT([$HAVE_RPM])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether $RPMBUILD is available])
|
|
|
|
AS_IF([tmp=$($RPMBUILD --version 2>/dev/null)], [
|
|
|
|
RPMBUILD_VERSION=$(echo $tmp | $AWK '/RPM/ { print $[3] }')
|
|
|
|
HAVE_RPMBUILD=yes
|
|
|
|
AC_MSG_RESULT([$HAVE_RPMBUILD ($RPMBUILD_VERSION)])
|
|
|
|
],[
|
|
|
|
HAVE_RPMBUILD=no
|
|
|
|
AC_MSG_RESULT([$HAVE_RPMBUILD])
|
|
|
|
])
|
|
|
|
|
OpenZFS 7793 - ztest fails assertion in dmu_tx_willuse_space
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
Background information: This assertion about tx_space_* verifies that we
are not dirtying more stuff than we thought we would. We “need” to know
how much we will dirty so that we can check if we should fail this
transaction with ENOSPC/EDQUOT, in dmu_tx_assign(). While the
transaction is open (i.e. between dmu_tx_assign() and dmu_tx_commit() —
typically less than a millisecond), we call dbuf_dirty() on the exact
blocks that will be modified. Once this happens, the temporary
accounting in tx_space_* is unnecessary, because we know exactly what
blocks are newly dirtied; we call dnode_willuse_space() to track this
more exact accounting.
The fundamental problem causing this bug is that dmu_tx_hold_*() relies
on the current state in the DMU (e.g. dn_nlevels) to predict how much
will be dirtied by this transaction, but this state can change before we
actually perform the transaction (i.e. call dbuf_dirty()).
This bug will be fixed by removing the assertion that the tx_space_*
accounting is perfectly accurate (i.e. we never dirty more than was
predicted by dmu_tx_hold_*()). By removing the requirement that this
accounting be perfectly accurate, we can also vastly simplify it, e.g.
removing most of the logic in dmu_tx_count_*().
The new tx space accounting will be very approximate, and may be more or
less than what is actually dirtied. It will still be used to determine
if this transaction will put us over quota. Transactions that are marked
by dmu_tx_mark_netfree() will be excepted from this check. We won’t make
an attempt to determine how much space will be freed by the transaction
— this was rarely accurate enough to determine if a transaction should
be permitted when we are over quota, which is why dmu_tx_mark_netfree()
was introduced in 2014.
We also won’t attempt to give “credit” when overwriting existing blocks,
if those blocks may be freed. This allows us to remove the
do_free_accounting logic in dbuf_dirty(), and associated routines. This
logic attempted to predict what will be on disk when this txg syncs, to
know if the overwritten block will be freed (i.e. exists, and has no
snapshots).
OpenZFS-issue: https://www.illumos.org/issues/7793
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3704e0a
Upstream bugs: DLPX-32883a
Closes #5804
Porting notes:
- DNODE_SIZE replaced with DNODE_MIN_SIZE in dmu_tx_count_dnode(),
Using the default dnode size would be slightly better.
- DEBUG_DMU_TX wrappers and configure option removed.
- Resolved _by_dnode() conflicts these changes have not yet been
applied to OpenZFS.
2017-03-07 20:51:59 +03:00
|
|
|
RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"'
|
2020-07-14 02:20:27 +03:00
|
|
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUGINFO_ZFS) 1"'
|
2020-07-01 19:05:21 +03:00
|
|
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUG_KMEM_ZFS) 1"'
|
|
|
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
|
|
|
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(ASAN_ZFS) 1"'
|
2022-02-04 01:35:38 +03:00
|
|
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(UBSAN_ZFS) 1"'
|
2018-01-10 21:49:27 +03:00
|
|
|
|
2022-05-25 19:22:11 +03:00
|
|
|
AS_IF([test "x$enable_debuginfo" = xyes], [
|
|
|
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "__strip /bin/true"'
|
|
|
|
])
|
|
|
|
|
2020-07-12 02:35:58 +03:00
|
|
|
RPM_DEFINE_UTIL=' --define "_initconfdir $(initconfdir)"'
|
2018-03-26 01:00:47 +03:00
|
|
|
|
|
|
|
dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
|
|
|
|
dnl # their values may not be set when running:
|
|
|
|
dnl #
|
|
|
|
dnl # ./configure --with-config=srpm
|
|
|
|
dnl #
|
|
|
|
AS_IF([test -n "$dracutdir" ], [
|
2020-07-01 19:05:21 +03:00
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_dracutdir $(dracutdir)"'
|
2018-03-26 01:00:47 +03:00
|
|
|
])
|
|
|
|
AS_IF([test -n "$udevdir" ], [
|
2020-07-01 19:05:21 +03:00
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevdir $(udevdir)"'
|
2018-03-26 01:00:47 +03:00
|
|
|
])
|
|
|
|
AS_IF([test -n "$udevruledir" ], [
|
2020-07-01 19:05:21 +03:00
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevruledir $(udevruledir)"'
|
2018-03-26 01:00:47 +03:00
|
|
|
])
|
2020-07-01 19:05:21 +03:00
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_SYSTEMD)'
|
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYZFS)'
|
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PAM)'
|
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYTHON_VERSION)'
|
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYTHON_PKG_VERSION)'
|
2018-01-10 21:49:27 +03:00
|
|
|
|
pyzfs: python3 support (build system)
Almost all of the Python code in the respository has been updated
to be compatibile with Python 2.6, Python 3.4, or newer. The only
exceptions are arc_summery3.py which requires Python 3, and pyzfs
which requires at least Python 2.7. This allows us to maintain a
single version of the code and support most default versions of
python. This change does the following:
* Sets the default shebang for all Python scripts to python3. If
only Python 2 is available, then at install time scripts which
are compatible with Python 2 will have their shebangs replaced
with /usr/bin/python. This is done for compatibility until
Python 2 goes end of life. Since only the installed versions
are changed this means Python 3 must be installed on the system
for test-runner when testing in-tree.
* Added --with-python=<2|3|3.4,etc> configure option which sets
the PYTHON environment variable to target a specific python
version. By default the newest installed version of Python
will be used or the preferred distribution version when
creating pacakges.
* Fixed --enable-pyzfs configure checks so they are run when
--enable-pyzfs=check and --enable-pyzfs=yes.
* Enabled pyzfs for Python 3.4 and newer, which is now supported.
* Renamed pyzfs package to python<VERSION>-pyzfs and updated to
install in the appropriate site location. For example, when
building with --with-python=3.4 a python34-pyzfs will be
created which installs in /usr/lib/python3.4/site-packages/.
* Renamed the following python scripts according to the Fedora
guidance for packaging utilities in /bin
- dbufstat.py -> dbufstat
- arcstat.py -> arcstat
- arc_summary.py -> arc_summary
- arc_summary3.py -> arc_summary3
* Updated python-cffi package name. On CentOS 6, CentOS 7, and
Amazon Linux it's called python-cffi, not python2-cffi. For
Python3 it's called python3-cffi or python3x-cffi.
* Install one version of arc_summary. Depending on the version
of Python available install either arc_summary2 or arc_summary3
as arc_summary. The user output is only slightly different.
Reviewed-by: John Ramsden <johnramsden@riseup.net>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8096
2018-10-31 19:22:59 +03:00
|
|
|
dnl # Override default lib directory on Debian/Ubuntu systems. The
|
|
|
|
dnl # provided /usr/lib/rpm/platform/<arch>/macros files do not
|
|
|
|
dnl # specify the correct path for multiarch systems as described
|
|
|
|
dnl # by the packaging guidelines.
|
2018-02-06 07:42:52 +03:00
|
|
|
dnl #
|
|
|
|
dnl # https://wiki.ubuntu.com/MultiarchSpec
|
|
|
|
dnl # https://wiki.debian.org/Multiarch/Implementation
|
|
|
|
dnl #
|
|
|
|
AS_IF([test "$DEFAULT_PACKAGE" = "deb"], [
|
|
|
|
MULTIARCH_LIBDIR="lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
2020-07-01 19:05:21 +03:00
|
|
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_lib $(MULTIARCH_LIBDIR)"'
|
2018-02-06 07:42:52 +03:00
|
|
|
AC_SUBST(MULTIARCH_LIBDIR)
|
|
|
|
])
|
|
|
|
|
2020-07-14 02:20:27 +03:00
|
|
|
dnl # Make RPM_DEFINE_KMOD additions conditional on CONFIG_KERNEL,
|
|
|
|
dnl # since the values will not be set otherwise. The spec files
|
|
|
|
dnl # provide defaults for them.
|
|
|
|
dnl #
|
|
|
|
RPM_DEFINE_KMOD='--define "_wrong_version_format_terminate_build 0"'
|
|
|
|
AM_COND_IF([CONFIG_KERNEL], [
|
|
|
|
RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernels $(LINUX_VERSION)"'
|
|
|
|
RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "ksrc $(LINUX)"'
|
|
|
|
RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kobj $(LINUX_OBJ)"'
|
2022-02-09 01:17:37 +03:00
|
|
|
RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernel_cc KERNEL_CC=$(KERNEL_CC)"'
|
|
|
|
RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernel_ld KERNEL_LD=$(KERNEL_LD)"'
|
|
|
|
RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernel_llvm KERNEL_LLVM=$(KERNEL_LLVM)"'
|
2020-07-14 02:20:27 +03:00
|
|
|
])
|
2018-01-10 21:49:27 +03:00
|
|
|
|
|
|
|
RPM_DEFINE_DKMS=''
|
2013-02-18 00:10:17 +04:00
|
|
|
|
|
|
|
SRPM_DEFINE_COMMON='--define "build_src_rpm 1"'
|
|
|
|
SRPM_DEFINE_UTIL=
|
|
|
|
SRPM_DEFINE_KMOD=
|
|
|
|
SRPM_DEFINE_DKMS=
|
|
|
|
|
|
|
|
RPM_SPEC_DIR="rpm/generic"
|
|
|
|
AC_ARG_WITH([spec],
|
|
|
|
AS_HELP_STRING([--with-spec=SPEC],
|
2015-03-26 02:59:17 +03:00
|
|
|
[Spec files 'generic|redhat']),
|
2013-02-18 00:10:17 +04:00
|
|
|
[RPM_SPEC_DIR="rpm/$withval"])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether spec files are available])
|
|
|
|
AC_MSG_RESULT([yes ($RPM_SPEC_DIR/*.spec.in)])
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
AC_SUBST(HAVE_RPM)
|
|
|
|
AC_SUBST(RPM)
|
|
|
|
AC_SUBST(RPM_VERSION)
|
|
|
|
|
|
|
|
AC_SUBST(HAVE_RPMBUILD)
|
|
|
|
AC_SUBST(RPMBUILD)
|
|
|
|
AC_SUBST(RPMBUILD_VERSION)
|
2013-02-18 00:10:17 +04:00
|
|
|
|
|
|
|
AC_SUBST(RPM_SPEC_DIR)
|
|
|
|
AC_SUBST(RPM_DEFINE_UTIL)
|
|
|
|
AC_SUBST(RPM_DEFINE_KMOD)
|
|
|
|
AC_SUBST(RPM_DEFINE_DKMS)
|
|
|
|
AC_SUBST(RPM_DEFINE_COMMON)
|
|
|
|
AC_SUBST(SRPM_DEFINE_UTIL)
|
|
|
|
AC_SUBST(SRPM_DEFINE_KMOD)
|
|
|
|
AC_SUBST(SRPM_DEFINE_DKMS)
|
|
|
|
AC_SUBST(SRPM_DEFINE_COMMON)
|
2010-08-26 22:22:58 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl #
|
|
|
|
dnl # Check for dpkg+dpkg-buildpackage to build DEB packages. If these
|
|
|
|
dnl # tools are missing it is non-fatal but you will not be able to build
|
|
|
|
dnl # DEB packages and will be warned if you try too.
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_DPKG], [
|
|
|
|
DPKG=dpkg
|
|
|
|
DPKGBUILD=dpkg-buildpackage
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether $DPKG is available])
|
|
|
|
AS_IF([tmp=$($DPKG --version 2>/dev/null)], [
|
|
|
|
DPKG_VERSION=$(echo $tmp | $AWK '/Debian/ { print $[7] }')
|
|
|
|
HAVE_DPKG=yes
|
|
|
|
AC_MSG_RESULT([$HAVE_DPKG ($DPKG_VERSION)])
|
|
|
|
],[
|
|
|
|
HAVE_DPKG=no
|
|
|
|
AC_MSG_RESULT([$HAVE_DPKG])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether $DPKGBUILD is available])
|
|
|
|
AS_IF([tmp=$($DPKGBUILD --version 2>/dev/null)], [
|
|
|
|
DPKGBUILD_VERSION=$(echo $tmp | \
|
|
|
|
$AWK '/Debian/ { print $[4] }' | cut -f-4 -d'.')
|
|
|
|
HAVE_DPKGBUILD=yes
|
|
|
|
AC_MSG_RESULT([$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)])
|
|
|
|
],[
|
|
|
|
HAVE_DPKGBUILD=no
|
|
|
|
AC_MSG_RESULT([$HAVE_DPKGBUILD])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST(HAVE_DPKG)
|
|
|
|
AC_SUBST(DPKG)
|
|
|
|
AC_SUBST(DPKG_VERSION)
|
|
|
|
|
|
|
|
AC_SUBST(HAVE_DPKGBUILD)
|
|
|
|
AC_SUBST(DPKGBUILD)
|
|
|
|
AC_SUBST(DPKGBUILD_VERSION)
|
2022-12-14 04:33:05 +03:00
|
|
|
AC_SUBST([CFGOPTS], ["$CFGOPTS"])
|
2010-08-26 22:22:58 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl #
|
|
|
|
dnl # Until native packaging for various different packing systems
|
|
|
|
dnl # can be added the least we can do is attempt to use alien to
|
|
|
|
dnl # convert the RPM packages to the needed package type. This is
|
|
|
|
dnl # a hack but so far it has worked reasonable well.
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_ALIEN], [
|
|
|
|
ALIEN=alien
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether $ALIEN is available])
|
|
|
|
AS_IF([tmp=$($ALIEN --version 2>/dev/null)], [
|
|
|
|
ALIEN_VERSION=$(echo $tmp | $AWK '{ print $[3] }')
|
2021-04-09 00:37:51 +03:00
|
|
|
ALIEN_MAJOR=$(echo ${ALIEN_VERSION} | $AWK -F'.' '{ print $[1] }')
|
|
|
|
ALIEN_MINOR=$(echo ${ALIEN_VERSION} | $AWK -F'.' '{ print $[2] }')
|
|
|
|
ALIEN_POINT=$(echo ${ALIEN_VERSION} | $AWK -F'.' '{ print $[3] }')
|
2010-08-26 22:22:58 +04:00
|
|
|
HAVE_ALIEN=yes
|
|
|
|
AC_MSG_RESULT([$HAVE_ALIEN ($ALIEN_VERSION)])
|
|
|
|
],[
|
|
|
|
HAVE_ALIEN=no
|
|
|
|
AC_MSG_RESULT([$HAVE_ALIEN])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST(HAVE_ALIEN)
|
|
|
|
AC_SUBST(ALIEN)
|
|
|
|
AC_SUBST(ALIEN_VERSION)
|
2021-04-09 00:37:51 +03:00
|
|
|
AC_SUBST(ALIEN_MAJOR)
|
|
|
|
AC_SUBST(ALIEN_MINOR)
|
|
|
|
AC_SUBST(ALIEN_POINT)
|
2010-08-26 22:22:58 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl #
|
|
|
|
dnl # Using the VENDOR tag from config.guess set the default
|
|
|
|
dnl # package type for 'make pkg': (rpm | deb | tgz)
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
2020-04-14 21:36:28 +03:00
|
|
|
AC_MSG_CHECKING([os distribution])
|
2020-08-28 19:43:44 +03:00
|
|
|
AC_ARG_WITH([vendor],
|
|
|
|
[AS_HELP_STRING([--with-vendor],
|
|
|
|
[Distribution vendor @<:@default=check@:>@])],
|
|
|
|
[with_vendor=$withval],
|
|
|
|
[with_vendor=check])
|
|
|
|
AS_IF([test "x$with_vendor" = "xcheck"],[
|
|
|
|
if test -f /etc/toss-release ; then
|
|
|
|
VENDOR=toss ;
|
|
|
|
elif test -f /etc/fedora-release ; then
|
|
|
|
VENDOR=fedora ;
|
|
|
|
elif test -f /etc/redhat-release ; then
|
|
|
|
VENDOR=redhat ;
|
|
|
|
elif test -f /etc/gentoo-release ; then
|
|
|
|
VENDOR=gentoo ;
|
|
|
|
elif test -f /etc/arch-release ; then
|
|
|
|
VENDOR=arch ;
|
|
|
|
elif test -f /etc/SuSE-release ; then
|
|
|
|
VENDOR=sles ;
|
|
|
|
elif test -f /etc/slackware-version ; then
|
|
|
|
VENDOR=slackware ;
|
|
|
|
elif test -f /etc/lunar.release ; then
|
|
|
|
VENDOR=lunar ;
|
|
|
|
elif test -f /etc/lsb-release ; then
|
|
|
|
VENDOR=ubuntu ;
|
|
|
|
elif test -f /etc/debian_version ; then
|
|
|
|
VENDOR=debian ;
|
|
|
|
elif test -f /etc/alpine-release ; then
|
|
|
|
VENDOR=alpine ;
|
|
|
|
elif test -f /bin/freebsd-version ; then
|
|
|
|
VENDOR=freebsd ;
|
2022-12-03 04:39:48 +03:00
|
|
|
elif test -f /etc/openEuler-release ; then
|
|
|
|
VENDOR=openeuler ;
|
2020-08-28 19:43:44 +03:00
|
|
|
else
|
|
|
|
VENDOR= ;
|
|
|
|
fi],
|
|
|
|
[ test "x${with_vendor}" != x],[
|
|
|
|
VENDOR="$with_vendor" ],
|
|
|
|
[ VENDOR= ; ]
|
|
|
|
)
|
2010-08-26 22:22:58 +04:00
|
|
|
AC_MSG_RESULT([$VENDOR])
|
|
|
|
AC_SUBST(VENDOR)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([default package type])
|
|
|
|
case "$VENDOR" in
|
2012-02-29 01:23:16 +04:00
|
|
|
toss) DEFAULT_PACKAGE=rpm ;;
|
|
|
|
redhat) DEFAULT_PACKAGE=rpm ;;
|
|
|
|
fedora) DEFAULT_PACKAGE=rpm ;;
|
|
|
|
gentoo) DEFAULT_PACKAGE=tgz ;;
|
2016-03-01 18:36:28 +03:00
|
|
|
alpine) DEFAULT_PACKAGE=tgz ;;
|
2013-02-17 23:11:41 +04:00
|
|
|
arch) DEFAULT_PACKAGE=tgz ;;
|
2012-02-29 01:23:16 +04:00
|
|
|
sles) DEFAULT_PACKAGE=rpm ;;
|
|
|
|
slackware) DEFAULT_PACKAGE=tgz ;;
|
|
|
|
lunar) DEFAULT_PACKAGE=tgz ;;
|
|
|
|
ubuntu) DEFAULT_PACKAGE=deb ;;
|
|
|
|
debian) DEFAULT_PACKAGE=deb ;;
|
2020-04-14 21:36:28 +03:00
|
|
|
freebsd) DEFAULT_PACKAGE=pkg ;;
|
2022-12-03 04:39:48 +03:00
|
|
|
openeuler) DEFAULT_PACKAGE=rpm ;;
|
2012-02-29 01:23:16 +04:00
|
|
|
*) DEFAULT_PACKAGE=rpm ;;
|
2010-08-26 22:22:58 +04:00
|
|
|
esac
|
|
|
|
AC_MSG_RESULT([$DEFAULT_PACKAGE])
|
|
|
|
AC_SUBST(DEFAULT_PACKAGE)
|
2011-03-18 01:02:28 +03:00
|
|
|
|
2011-07-10 19:57:33 +04:00
|
|
|
AC_MSG_CHECKING([default init directory])
|
2020-04-14 21:36:28 +03:00
|
|
|
case "$VENDOR" in
|
2020-07-12 02:35:58 +03:00
|
|
|
freebsd) initdir=$sysconfdir/rc.d ;;
|
|
|
|
*) initdir=$sysconfdir/init.d;;
|
2020-04-14 21:36:28 +03:00
|
|
|
esac
|
2020-07-12 02:35:58 +03:00
|
|
|
AC_MSG_RESULT([$initdir])
|
|
|
|
AC_SUBST(initdir)
|
2011-07-10 19:57:33 +04:00
|
|
|
|
2022-12-03 04:39:48 +03:00
|
|
|
AC_MSG_CHECKING([default shell])
|
2021-10-30 01:34:37 +03:00
|
|
|
case "$VENDOR" in
|
|
|
|
gentoo) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
|
|
|
|
alpine) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
|
|
|
|
*) DEFAULT_INIT_SHELL="/bin/sh" ;;
|
|
|
|
esac
|
2020-07-12 02:35:58 +03:00
|
|
|
|
2022-12-03 04:39:48 +03:00
|
|
|
AC_MSG_RESULT([$DEFAULT_INIT_SHELL])
|
2020-07-12 02:35:58 +03:00
|
|
|
AC_SUBST(DEFAULT_INIT_SHELL)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([default nfs server init script])
|
|
|
|
AS_IF([test "$VENDOR" = "debian"],
|
|
|
|
[DEFAULT_INIT_NFS_SERVER="nfs-kernel-server"],
|
|
|
|
[DEFAULT_INIT_NFS_SERVER="nfs"]
|
|
|
|
)
|
|
|
|
AC_MSG_RESULT([$DEFAULT_INIT_NFS_SERVER])
|
|
|
|
AC_SUBST(DEFAULT_INIT_NFS_SERVER)
|
Base init scripts for SYSV systems
* Based on the init scripts included with Debian GNU/Linux, then take code
from the already existing ones, trying to merge them into one set of
scripts that will work for 'everyone' for better maintainability.
* Add configurable variables to control the workings of the init scripts:
* ZFS_INITRD_PRE_MOUNTROOT_SLEEP
Set a sleep time before we load the module (used primarily by initrd
scripts to allow for slower media (such as USB devices etc) to be
availible before we load the zfs module).
* ZFS_INITRD_POST_MODPROBE_SLEEP
Set a timed sleep in the initrd to after the load of the zfs module.
* ZFS_INITRD_ADDITIONAL_DATASETS
To allow for mounting additional datasets in the initrd. Primarily used
in initrd scripts to allow for when filesystem needed to boot (such as
/usr, /opt, /var etc) isn't directly under the root dataset.
* ZFS_POOL_EXCEPTIONS
Exclude pools from being imported (in the initrd and/or init scripts).
* ZFS_DKMS_ENABLE_DEBUG, ZFS_DKMS_ENABLE_DEBUG_DMU_TX, ZFS_DKMS_DISABLE_STRIP
Set to control how dkms should build the dkms packages.
* ZPOOL_IMPORT_PATH
Set path(s) where "zpool import" should import pools from.
This was previously the job of "USE_DISK_BY_ID" (which is still used
for backwards compatibility) but was renamed to allow for better
control of import path(s).
* If old USE_DISK_BY_ID is set, but not new ZPOOL_IMPORT_PATH, then we
set ZPOOL_IMPORT_PATH to sane defaults just to be on the safe side.
* ZED_ARGS
To allow for local options to zed without having to change the init script.
* The import function, do_import(), imports pools by name instead of '-a'
for better control of pools to import and from where.
* If USE_DISK_BY_ID is set (for backwards compatibility), but isn't 'yes'
then ignore it.
* If pool(s) isn't found with a simple "zpool import" (seen it happen),
try looking for them in /dev/disk/by-id (if it exists). Any duplicates
(pools found with both commands) is filtered out.
* IF we have found extra pool(s) this way, we must force USE_DISK_BY_ID
so that the first, simple "zpool import $pool" is able to find it.
* Fallback on importing the pool using the cache file (if it exists) only
if 'simple' import (either with ZPOOL_IMPORT_PATH or the 'built in'
defaults) didn't work.
* The export function, do_export(), will export all pools imported, EXCEPT
the root pool (if there is one).
* ZED script from the Debian GNU/Linux packages added.
* Refreshed ZED init script from behlendorf@5e7a660 to be portable so it
may be used on both LSB and Redhat style systems.
* If there is no pool(s) imported and zed successfully shut down, we will
unload the zfs modules.
* The function library file for the ZoL init script is installed as
/etc/init.d/zfs-functions.
* The four init scripts, the /etc/{defaults,sysconfig,conf.d}/zfs config file
as well as the common function library is tagged as '%config(noreplace)' in
the rpm rules file to make sure they are not replaced automatically if locally
modifed.
* Pitfals and workarounds:
* If we're running from init, remove stale /etc/dfs/sharetab before importing
pools in the zfs-import init script.
* On Debian GNU/Linux, there's a 'sendsigs' script that will kill basically
everything quite early in the shutdown phase and zed is/should be stopped
much later than that. We don't want zed to be among the ones killed, so add
the zed pid to list of pids for 'sendsigs' to ignore.
* CentOS uses echo_success() and echo_failure() to print out status of
command. These in turn uses "echo -n \0xx[etc]" to move cursor and choose
colour etc. This doesn't work with the modified IFS variable we need to
use in zfs-import for some reason, so work around that when we define
zfs_log_{end,failure}_msg() for RedHat and derivative distributions.
* All scripts passes ShellCheck (with one false positive in do_mount()).
Signed-off-by: Turbo Fredriksson turbo@bayour.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Chris Dunlap <cdunlap@llnl.gov>
Closes #2974
Closes #2107
2015-04-23 21:35:45 +03:00
|
|
|
|
2019-08-30 19:40:30 +03:00
|
|
|
AC_MSG_CHECKING([default init config directory])
|
Base init scripts for SYSV systems
* Based on the init scripts included with Debian GNU/Linux, then take code
from the already existing ones, trying to merge them into one set of
scripts that will work for 'everyone' for better maintainability.
* Add configurable variables to control the workings of the init scripts:
* ZFS_INITRD_PRE_MOUNTROOT_SLEEP
Set a sleep time before we load the module (used primarily by initrd
scripts to allow for slower media (such as USB devices etc) to be
availible before we load the zfs module).
* ZFS_INITRD_POST_MODPROBE_SLEEP
Set a timed sleep in the initrd to after the load of the zfs module.
* ZFS_INITRD_ADDITIONAL_DATASETS
To allow for mounting additional datasets in the initrd. Primarily used
in initrd scripts to allow for when filesystem needed to boot (such as
/usr, /opt, /var etc) isn't directly under the root dataset.
* ZFS_POOL_EXCEPTIONS
Exclude pools from being imported (in the initrd and/or init scripts).
* ZFS_DKMS_ENABLE_DEBUG, ZFS_DKMS_ENABLE_DEBUG_DMU_TX, ZFS_DKMS_DISABLE_STRIP
Set to control how dkms should build the dkms packages.
* ZPOOL_IMPORT_PATH
Set path(s) where "zpool import" should import pools from.
This was previously the job of "USE_DISK_BY_ID" (which is still used
for backwards compatibility) but was renamed to allow for better
control of import path(s).
* If old USE_DISK_BY_ID is set, but not new ZPOOL_IMPORT_PATH, then we
set ZPOOL_IMPORT_PATH to sane defaults just to be on the safe side.
* ZED_ARGS
To allow for local options to zed without having to change the init script.
* The import function, do_import(), imports pools by name instead of '-a'
for better control of pools to import and from where.
* If USE_DISK_BY_ID is set (for backwards compatibility), but isn't 'yes'
then ignore it.
* If pool(s) isn't found with a simple "zpool import" (seen it happen),
try looking for them in /dev/disk/by-id (if it exists). Any duplicates
(pools found with both commands) is filtered out.
* IF we have found extra pool(s) this way, we must force USE_DISK_BY_ID
so that the first, simple "zpool import $pool" is able to find it.
* Fallback on importing the pool using the cache file (if it exists) only
if 'simple' import (either with ZPOOL_IMPORT_PATH or the 'built in'
defaults) didn't work.
* The export function, do_export(), will export all pools imported, EXCEPT
the root pool (if there is one).
* ZED script from the Debian GNU/Linux packages added.
* Refreshed ZED init script from behlendorf@5e7a660 to be portable so it
may be used on both LSB and Redhat style systems.
* If there is no pool(s) imported and zed successfully shut down, we will
unload the zfs modules.
* The function library file for the ZoL init script is installed as
/etc/init.d/zfs-functions.
* The four init scripts, the /etc/{defaults,sysconfig,conf.d}/zfs config file
as well as the common function library is tagged as '%config(noreplace)' in
the rpm rules file to make sure they are not replaced automatically if locally
modifed.
* Pitfals and workarounds:
* If we're running from init, remove stale /etc/dfs/sharetab before importing
pools in the zfs-import init script.
* On Debian GNU/Linux, there's a 'sendsigs' script that will kill basically
everything quite early in the shutdown phase and zed is/should be stopped
much later than that. We don't want zed to be among the ones killed, so add
the zed pid to list of pids for 'sendsigs' to ignore.
* CentOS uses echo_success() and echo_failure() to print out status of
command. These in turn uses "echo -n \0xx[etc]" to move cursor and choose
colour etc. This doesn't work with the modified IFS variable we need to
use in zfs-import for some reason, so work around that when we define
zfs_log_{end,failure}_msg() for RedHat and derivative distributions.
* All scripts passes ShellCheck (with one false positive in do_mount()).
Signed-off-by: Turbo Fredriksson turbo@bayour.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Chris Dunlap <cdunlap@llnl.gov>
Closes #2974
Closes #2107
2015-04-23 21:35:45 +03:00
|
|
|
case "$VENDOR" in
|
2020-07-12 02:35:58 +03:00
|
|
|
alpine) initconfdir=/etc/conf.d ;;
|
|
|
|
gentoo) initconfdir=/etc/conf.d ;;
|
|
|
|
toss) initconfdir=/etc/sysconfig ;;
|
|
|
|
redhat) initconfdir=/etc/sysconfig ;;
|
|
|
|
fedora) initconfdir=/etc/sysconfig ;;
|
|
|
|
sles) initconfdir=/etc/sysconfig ;;
|
2022-12-03 04:39:48 +03:00
|
|
|
openeuler) initconfdir=/etc/sysconfig ;;
|
2020-07-12 02:35:58 +03:00
|
|
|
ubuntu) initconfdir=/etc/default ;;
|
|
|
|
debian) initconfdir=/etc/default ;;
|
|
|
|
freebsd) initconfdir=$sysconfdir/rc.conf.d;;
|
|
|
|
*) initconfdir=/etc/default ;;
|
Base init scripts for SYSV systems
* Based on the init scripts included with Debian GNU/Linux, then take code
from the already existing ones, trying to merge them into one set of
scripts that will work for 'everyone' for better maintainability.
* Add configurable variables to control the workings of the init scripts:
* ZFS_INITRD_PRE_MOUNTROOT_SLEEP
Set a sleep time before we load the module (used primarily by initrd
scripts to allow for slower media (such as USB devices etc) to be
availible before we load the zfs module).
* ZFS_INITRD_POST_MODPROBE_SLEEP
Set a timed sleep in the initrd to after the load of the zfs module.
* ZFS_INITRD_ADDITIONAL_DATASETS
To allow for mounting additional datasets in the initrd. Primarily used
in initrd scripts to allow for when filesystem needed to boot (such as
/usr, /opt, /var etc) isn't directly under the root dataset.
* ZFS_POOL_EXCEPTIONS
Exclude pools from being imported (in the initrd and/or init scripts).
* ZFS_DKMS_ENABLE_DEBUG, ZFS_DKMS_ENABLE_DEBUG_DMU_TX, ZFS_DKMS_DISABLE_STRIP
Set to control how dkms should build the dkms packages.
* ZPOOL_IMPORT_PATH
Set path(s) where "zpool import" should import pools from.
This was previously the job of "USE_DISK_BY_ID" (which is still used
for backwards compatibility) but was renamed to allow for better
control of import path(s).
* If old USE_DISK_BY_ID is set, but not new ZPOOL_IMPORT_PATH, then we
set ZPOOL_IMPORT_PATH to sane defaults just to be on the safe side.
* ZED_ARGS
To allow for local options to zed without having to change the init script.
* The import function, do_import(), imports pools by name instead of '-a'
for better control of pools to import and from where.
* If USE_DISK_BY_ID is set (for backwards compatibility), but isn't 'yes'
then ignore it.
* If pool(s) isn't found with a simple "zpool import" (seen it happen),
try looking for them in /dev/disk/by-id (if it exists). Any duplicates
(pools found with both commands) is filtered out.
* IF we have found extra pool(s) this way, we must force USE_DISK_BY_ID
so that the first, simple "zpool import $pool" is able to find it.
* Fallback on importing the pool using the cache file (if it exists) only
if 'simple' import (either with ZPOOL_IMPORT_PATH or the 'built in'
defaults) didn't work.
* The export function, do_export(), will export all pools imported, EXCEPT
the root pool (if there is one).
* ZED script from the Debian GNU/Linux packages added.
* Refreshed ZED init script from behlendorf@5e7a660 to be portable so it
may be used on both LSB and Redhat style systems.
* If there is no pool(s) imported and zed successfully shut down, we will
unload the zfs modules.
* The function library file for the ZoL init script is installed as
/etc/init.d/zfs-functions.
* The four init scripts, the /etc/{defaults,sysconfig,conf.d}/zfs config file
as well as the common function library is tagged as '%config(noreplace)' in
the rpm rules file to make sure they are not replaced automatically if locally
modifed.
* Pitfals and workarounds:
* If we're running from init, remove stale /etc/dfs/sharetab before importing
pools in the zfs-import init script.
* On Debian GNU/Linux, there's a 'sendsigs' script that will kill basically
everything quite early in the shutdown phase and zed is/should be stopped
much later than that. We don't want zed to be among the ones killed, so add
the zed pid to list of pids for 'sendsigs' to ignore.
* CentOS uses echo_success() and echo_failure() to print out status of
command. These in turn uses "echo -n \0xx[etc]" to move cursor and choose
colour etc. This doesn't work with the modified IFS variable we need to
use in zfs-import for some reason, so work around that when we define
zfs_log_{end,failure}_msg() for RedHat and derivative distributions.
* All scripts passes ShellCheck (with one false positive in do_mount()).
Signed-off-by: Turbo Fredriksson turbo@bayour.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Chris Dunlap <cdunlap@llnl.gov>
Closes #2974
Closes #2107
2015-04-23 21:35:45 +03:00
|
|
|
esac
|
2020-07-12 02:35:58 +03:00
|
|
|
AC_MSG_RESULT([$initconfdir])
|
|
|
|
AC_SUBST(initconfdir)
|
Initramfs scripts for ZoL.
* Supports booting of a ZFS snapshot.
Do this by cloning the snapshot into a dataset. If this, the resulting
dataset, already exists, destroy it. Then mount it on root.
* If snapshot does not exist, use base dataset (the part before '@')
as boot filesystem instead.
* If no snapshot is specified on the 'root=' kernel command line, but there
is an '@', then get a list of snapshots below that filesystem and ask the
user which to use.
* Clone with 'mountpoint=none' and 'canmount=noauto' - we mount manually
and explicitly.
* For sub-filesystems, that doesn't have a mountpoint property set, we use
the 'org.zol:mountpoint' to keep track of it's mountpoint.
* Allow rollback of snapshots instead of clone it and boot from the clone.
* Allow mounting a root- and subfs with mountpoint=legacy set
* Allow mounting a filesystem which is using nativ encryption.
* Support all currently used kernel command line arguments
All the different distributions have their own standard on what to specify
on the kernel command line to boot of a ZFS filesystem.
* Extra options:
* zfsdebug=(on,yes,1) Show extra debugging information
* zfsforce=(on,yes,1) Force import the pool
* rollback=(on,yes,1) Rollback (instead of clone) the snapshot
* Only try to import pool if it haven't already been imported
* This will negate the need to force import a pool that have not been exported cleanly.
* Support exclusion of pools to import by setting ZFS_POOL_EXCEPTIONS in /etc/default/zfs.
* Support additional configuration variable ZFS_INITRD_ADDITIONAL_DATASETS
to mount additional filesystems not located under your root dataset.
* Include /etc/modprobe.d/{zfs,spl}.conf in the initrd if it/they exist.
* Include the udev rule to use by-vdev for pool imports.
* Include the /etc/default/zfs file to the initrd.
* Only try /dev/disk/by-* in the initrd if USE_DISK_BY_ID is set.
* Use /dev/disk/by-vdev before anything.
* Add /dev as a last ditch attempt.
* Fallback to using the cache file if that exist if nothing else worked.
* Use /sbin/modprobe instead of built-in (BusyBox) modprobe.
This gets rid of the message "modprobe: can't load module zcommon".
Thanx to pcoultha for finding this.
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2116
Closes #2114
2014-01-30 20:26:48 +04:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether initramfs-tools is available])
|
|
|
|
if test -d /usr/share/initramfs-tools ; then
|
2020-09-12 18:22:07 +03:00
|
|
|
RPM_DEFINE_INITRAMFS='--define "_initramfs 1"'
|
Initramfs scripts for ZoL.
* Supports booting of a ZFS snapshot.
Do this by cloning the snapshot into a dataset. If this, the resulting
dataset, already exists, destroy it. Then mount it on root.
* If snapshot does not exist, use base dataset (the part before '@')
as boot filesystem instead.
* If no snapshot is specified on the 'root=' kernel command line, but there
is an '@', then get a list of snapshots below that filesystem and ask the
user which to use.
* Clone with 'mountpoint=none' and 'canmount=noauto' - we mount manually
and explicitly.
* For sub-filesystems, that doesn't have a mountpoint property set, we use
the 'org.zol:mountpoint' to keep track of it's mountpoint.
* Allow rollback of snapshots instead of clone it and boot from the clone.
* Allow mounting a root- and subfs with mountpoint=legacy set
* Allow mounting a filesystem which is using nativ encryption.
* Support all currently used kernel command line arguments
All the different distributions have their own standard on what to specify
on the kernel command line to boot of a ZFS filesystem.
* Extra options:
* zfsdebug=(on,yes,1) Show extra debugging information
* zfsforce=(on,yes,1) Force import the pool
* rollback=(on,yes,1) Rollback (instead of clone) the snapshot
* Only try to import pool if it haven't already been imported
* This will negate the need to force import a pool that have not been exported cleanly.
* Support exclusion of pools to import by setting ZFS_POOL_EXCEPTIONS in /etc/default/zfs.
* Support additional configuration variable ZFS_INITRD_ADDITIONAL_DATASETS
to mount additional filesystems not located under your root dataset.
* Include /etc/modprobe.d/{zfs,spl}.conf in the initrd if it/they exist.
* Include the udev rule to use by-vdev for pool imports.
* Include the /etc/default/zfs file to the initrd.
* Only try /dev/disk/by-* in the initrd if USE_DISK_BY_ID is set.
* Use /dev/disk/by-vdev before anything.
* Add /dev as a last ditch attempt.
* Fallback to using the cache file if that exist if nothing else worked.
* Use /sbin/modprobe instead of built-in (BusyBox) modprobe.
This gets rid of the message "modprobe: can't load module zcommon".
Thanx to pcoultha for finding this.
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2116
Closes #2114
2014-01-30 20:26:48 +04:00
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
2020-09-12 18:22:07 +03:00
|
|
|
RPM_DEFINE_INITRAMFS=''
|
Initramfs scripts for ZoL.
* Supports booting of a ZFS snapshot.
Do this by cloning the snapshot into a dataset. If this, the resulting
dataset, already exists, destroy it. Then mount it on root.
* If snapshot does not exist, use base dataset (the part before '@')
as boot filesystem instead.
* If no snapshot is specified on the 'root=' kernel command line, but there
is an '@', then get a list of snapshots below that filesystem and ask the
user which to use.
* Clone with 'mountpoint=none' and 'canmount=noauto' - we mount manually
and explicitly.
* For sub-filesystems, that doesn't have a mountpoint property set, we use
the 'org.zol:mountpoint' to keep track of it's mountpoint.
* Allow rollback of snapshots instead of clone it and boot from the clone.
* Allow mounting a root- and subfs with mountpoint=legacy set
* Allow mounting a filesystem which is using nativ encryption.
* Support all currently used kernel command line arguments
All the different distributions have their own standard on what to specify
on the kernel command line to boot of a ZFS filesystem.
* Extra options:
* zfsdebug=(on,yes,1) Show extra debugging information
* zfsforce=(on,yes,1) Force import the pool
* rollback=(on,yes,1) Rollback (instead of clone) the snapshot
* Only try to import pool if it haven't already been imported
* This will negate the need to force import a pool that have not been exported cleanly.
* Support exclusion of pools to import by setting ZFS_POOL_EXCEPTIONS in /etc/default/zfs.
* Support additional configuration variable ZFS_INITRD_ADDITIONAL_DATASETS
to mount additional filesystems not located under your root dataset.
* Include /etc/modprobe.d/{zfs,spl}.conf in the initrd if it/they exist.
* Include the udev rule to use by-vdev for pool imports.
* Include the /etc/default/zfs file to the initrd.
* Only try /dev/disk/by-* in the initrd if USE_DISK_BY_ID is set.
* Use /dev/disk/by-vdev before anything.
* Add /dev as a last ditch attempt.
* Fallback to using the cache file if that exist if nothing else worked.
* Use /sbin/modprobe instead of built-in (BusyBox) modprobe.
This gets rid of the message "modprobe: can't load module zcommon".
Thanx to pcoultha for finding this.
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2116
Closes #2114
2014-01-30 20:26:48 +04:00
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
2020-09-12 18:22:07 +03:00
|
|
|
AC_SUBST(RPM_DEFINE_INITRAMFS)
|
2023-09-20 20:33:14 +03:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([default bash completion directory])
|
|
|
|
case "$VENDOR" in
|
|
|
|
ubuntu) bashcompletiondir=/usr/share/bash-completion/completions ;;
|
|
|
|
debian) bashcompletiondir=/usr/share/bash-completion/completions ;;
|
|
|
|
freebsd) bashcompletiondir=$sysconfdir/bash_completion.d;;
|
|
|
|
*) bashcompletiondir=/etc/bash_completion.d ;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT([$bashcompletiondir])
|
|
|
|
AC_SUBST(bashcompletiondir)
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl #
|
|
|
|
dnl # Default ZFS package configuration
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_PACKAGE], [
|
2012-01-13 05:24:05 +04:00
|
|
|
ZFS_AC_DEFAULT_PACKAGE
|
2020-04-14 21:36:28 +03:00
|
|
|
AS_IF([test x$VENDOR != xfreebsd], [
|
|
|
|
ZFS_AC_RPM
|
|
|
|
ZFS_AC_DPKG
|
|
|
|
ZFS_AC_ALIEN
|
|
|
|
])
|
2010-08-26 22:22:58 +04:00
|
|
|
])
|