OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-367-g8a98342

Gerrit Code Review gerrit@openafs.org
Tue, 25 Jun 2024 19:23:08 -0400


The following commit has been merged in the master branch:
commit 8a983426fbec9d435a68e1aaab023901a73cd7a1
Author: Michael Meffie <mmeffie@sinenomine.net>
Date:   Tue Jul 5 13:08:27 2022 -0400

    cf: Fail configure --enable-kernel-module on missing Linux headers
    
    The kernel module build can be disabled with the configure option
    --disable-kernel-module ever since commit 62994d919d (allow-disabling-
    kernel-module-compilation-20010705).  That commit also added a feature
    to automatically disable the Linux kernel module build when the Linux
    kernel headers are not found.
    
    Unfortunately, even when --enable-kernel-module is specified, configure
    will disable the Linux kernel module build when the Linux headers are
    not found, instead of failing configure.  The build will complete
    successfully, but the kernel module will be missing.  When installing
    from a source build, the build and install will complete without errors,
    but the client will fail to start due to the missing kernel module.
    
    Change the --enable-kernel-module to be an autodetect option by default.
    When --enable-kernel-module is specified and no Linux kernel headers are
    found, configure will fail (AC_MSG_ERROR), instead of disabling the
    kernel module build.
    
    This change makes --enable-kernel-module to be more consistent with the
    other --enable-feature options which do probing, keeps the build system
    behavior the same by default, and allows builders to specify
    --enable-kernel-module to indicate the build must result in a kernel
    module.
    
    This commit keeps the check to fail configure when a path to the Linux
    kernel header files are specified with the --with-linux-kernel-headers
    but the headers were not found.  Change the error message to avoid
    printing the old /usr/src/linux path, since that was incorrect.
    
    Add a check to fail configure when a path to the Linux kernel build
    directory is specified with --with-linux-kernel-build but the Linux
    kernel build files are not found. This check was probably missed when
    the --with-linux-kernel-build option was added.
    
    Move the OPENAFS_LINUX_KERNEL_PATH macro to be after the AC_MSG_RESULT
    so the "checking your OS" is resolved before checking the Linux kernel
    header and build paths. This cleans up the output when there is a
    warning or error and will make it possible to add AC_MSG_CHECKING() in
    OPENAFS_LINUX_KERNEL_PATH in the future.
    
    Rename the existing OPENAFS_LINUX_KERNEL_PATH to the internal macro
    _OPENAFS_LINUX_KERNEL_PATH, and add a new OPENAFS_LINUX_KERNEL_PATH
    macro which checks and resolves the --enable-kernel-module option.  The
    _OPENAFS_LINUX_KERNEL_PATH macro can be improved in a future change.
    
    Change the configure summary to check the ENABLE_KERNEL_MODULE (upper
    case) variable instead of the enable_kernel_module (lower case) to
    indicate when the kernel module build is enabled.  This avoids the need
    to change enable_kernel_module on non-Linux platforms.
    
    Change-Id: Ieebc98425e0dea5de36f213b0c168db3202af644
    Reviewed-on: https://gerrit.openafs.org/15050
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>

 src/cf/linux-kernel-path.m4 | 74 +++++++++++++++++++++++++++++++++++++++------
 src/cf/options.m4           | 13 +++++---
 src/cf/ostype.m4            |  4 +--
 src/cf/summary.m4           |  5 ++-
 4 files changed, 77 insertions(+), 19 deletions(-)

-- 
OpenAFS Master Repository