Package Details: linux-hardened-lts 6.6.65.hardened1-1

Git Clone URL: https://aur.archlinux.org/linux-hardened-lts.git (read-only, click to copy)
Package Base: linux-hardened-lts
Description: The Security-Hardened Linux LTS kernel and modules
Upstream URL: https://github.com/anthraxx/linux-hardened
Licenses: GPL-2.0-only
Provides: KSMBD-MODULE, VIRTUALBOX-GUEST-MODULES, WIREGUARD-MODULE
Submitter: zlima12
Maintainer: zlima12
Last Packager: zlima12
Votes: 1
Popularity: 0.82
First Submitted: 2024-11-18 03:19 (UTC)
Last Updated: 2024-12-12 07:46 (UTC)

Dependencies (20)

Required by (6)

Sources (5)

Latest Comments

acrion commented on 2025-06-12 09:18 (UTC)

ZFS DKMS compilation fails due to broken Kconfig references in headers package. The current PKGBUILD breaks ZFS DKMS module compilation by removing architecture directories that are still referenced in Kconfig files.

When attempting to install zfs-dkms with linux-hardened-lts-headers, the DKMS build fails during the configure phase with:

configure: error: 
        *** This kernel does not include the required loadable module
        *** support!
        ***
        *** To build OpenZFS as a loadable Linux kernel module
        *** enable loadable module support by setting
        *** `CONFIG_MODULES=y` in the kernel configuration and run
        *** `make modules_prepare` in the Linux source tree.

However, CONFIG_MODULES=y is correctly set in the kernel config.

The issue occurs in the _package-headers() function when removing architecture directories:

echo "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
  [[ $arch = */x86/ ]] && continue
  echo "Removing $(basename "$arch")"
  rm -r "$arch"
done

This removes arch/arm/ but leaves references to it in Kconfig files. When ZFS configure scripts run make scripts, it fails with:

crypto/Kconfig:1426: can't open file "arch/arm/crypto/Kconfig"
make[3]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
Reproduction Steps
  1. Install linux-hardened-lts and linux-hardened-lts-headers
  2. Attempt to install zfs-dkms
  3. DKMS build fails during configure phase

Full DKMS error:

==> dkms install --no-depmod zfs/2.3.2 -k 6.6.65-hardened1-1-hardened-lts
==> WARNING: `dkms install --no-depmod zfs/2.3.2 -k 6.6.65-hardened1-1-hardened-lts' exited 1

Make scripts error:

cd /lib/modules/6.6.65-hardened1-1-hardened-lts/build
make scripts
crypto/Kconfig:1426: can't open file "arch/arm/crypto/Kconfig"
make[3]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
Suggested Fix

Option 1: Remove cross-architecture references from problematic Kconfig files:

# After copying files but before removing architectures
sed -i '/source.*arch\/arm\/crypto\/Kconfig/d' "$builddir/crypto/Kconfig"
sed -i '/source.*arch\/.*\/crypto\/Kconfig/d' "$builddir/crypto/Kconfig"

Option 2: Keep minimal dummy Kconfig files for referenced architectures:

# Before removing architectures, create dummy files for cross-references
for missing_arch in arm arm64; do
  mkdir -p "$builddir/arch/$missing_arch/crypto"
  echo "# Minimal Kconfig for headers compatibility" > "$builddir/arch/$missing_arch/crypto/Kconfig"
done

This affects any DKMS module that requires a functional kernel build environment. ZFS is a prominent example, but other out-of-tree modules may be similarly affected.

Note that linux-lts-headers works fine with ZFS, so this appears to be specific to the architecture removal process in the hardened headers package.

Environment: Arch Linux, kernel 6.6.65-hardened1-1-hardened-lts, zfs-dkms 2.3.2-1