The option was added for distributions/maintainers lacking the linux
headers, while running the test-suite. It also aimed to resolve
licensing and "source-not-included" issues around the cached modules.
At a glance, it seems like only Debian is using the option these days,
Arch is using "any" linux headers available, while Fedora and Gentoo do
not run `make check` all together.
Debian's linter is complaining about "source-is-missing" and
"source-contains-prebuilt-binary", where the maintainer had to disable
those.
Removing the cache will make ^^ obsolete, while also simplifying the
check target. A nice side effect is making the (compressed) release
tarball 20% smaller.
Distributions are welcome to do something like Arch or not run the
target all together.
We are already running it in CI for Arch, Debian, Fedora and Ubuntu,
where more can be added as needed.
Effectively this reverts commit
23603f1f837caeff45c6960722c2cad690db801d
Lintian overrides:
https://salsa.debian.org/md/kmod/-/commit/
8d6fc9e90b12fe88476c6c8f53ae25f9a0d5d634
Arch reference:
https://gitlab.archlinux.org/archlinux/packaging/packages/kmod/-/commit/
b2d37d2bcc0ca2ef6187ce115ef8da105019d49f
The autopkgtest's copy of lsmod, ideally should use SPDX license
identifiers like we did in kmod v33.
Autopkgtest lsmod:
https://salsa.debian.org/md/kmod/-/commit/
11793a49f6b65af8c442397a845e8b65008d0630
Cc: Marco d'Itri <md@linux.it>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/86
[ Fixup flag being passed in CI ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libssl-dev \
libtool \
libzstd-dev \
+ linux-headers-generic \
scdoc \
zlib1g-dev \
zstd
- # not used by default in Debian since it builds with --disable-test-modules
- # developers should have it though
- # apt-get install linux-headers-generic
test: 'no'
- container: 'debian:unstable'
test: 'yes'
- configure: '--disable-test-modules'
container:
image: ${{ matrix.container }}
$(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \
$(RM) -rf testsuite/module-playground && \
mkdir -p testsuite/ && \
- cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \
- find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \
+ cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND); \
fi
-if BUILD_MODULES
$(MAKE) -C $(MODULE_PLAYGROUND)
-else
- $(MAKE) -C $(MODULE_PLAYGROUND) FAKE_BUILD=1
-endif
rootfs: build-module-playground
EXTRA_DIST += \
- testsuite/module-playground/cache \
testsuite/module-playground/dummy.pkcs7 \
testsuite/module-playground/dummy.sha1 \
testsuite/module-playground/dummy.sha256 \
])])
AM_CONDITIONAL([BUILD_MANPAGES], [test "x$enable_manpages" = "xyes"])
-AC_ARG_ENABLE([test-modules],
- AS_HELP_STRING([--disable-test-modules], [disable building test modules during make check: cached modules will be used @<:@default=enabled@:>@]),
- [], enable_test_modules=yes)
-AM_CONDITIONAL([BUILD_MODULES], [test "x$enable_test_modules" = "xyes"])
-
AC_ARG_ENABLE([logging],
AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
[], enable_logging=yes)
coverage: ${enable_coverage}
doc: ${enable_gtk_doc}
man: ${enable_manpages}
- test-modules: ${enable_test_modules}
features: ${with_features}
])
*.ko
!mod-simple-*.ko
-!cache/*.ko
.cache.mk
*.mod.c
.tmp_versions
# normal makefile
KDIR ?= $(module_prefix)/lib/modules/`uname -r`/build
KVER ?= `uname -r`
-ifeq ($(FAKE_BUILD),)
- FAKE_BUILD=0
-endif
ARCH_SPECIFIC_MODULES := mod-simple-x86_64.ko mod-simple-i386.ko mod-simple-sparc64.ko
MY_MODULES := $(filter-out $(ARCH_SPECIFIC_MODULES),$(wildcard *.ko))
$(eval arch=$(patsubst mod-simple-%.ko,%,$@))
$(MAKE) KDIR=$(KDIR_$(arch)) ARCH=$(arch) CROSS_COMPILE=$(CROSS_COMPILE_$(arch)) -f Makefile.arch
-ifeq ($(FAKE_BUILD),0)
modules:
$(MAKE) -C $(KDIR) M=$$PWD
-else
-modules:
- @echo " CP cache/*.ko"
- @cp cache/*.ko .
-endif
arch-modules: $(ARCH_SPECIFIC_MODULES)