cloop-src fails to build a module for Linux 6.1 in bookworm
(and of course also for 6.12 in trixie).
The attached patch adds an autopkgtest that tries to compile the module
s.t. such breakage can be detected more quickly in the future.
Shouldn't this package have a corresponding -dkms package?
I: Trying to build cloop-src for 6.1.0-29-amd64
Extracting the package tarball, /usr/src/cloop.tar.xz, please wait...
rm -rf *.ko debian/cloop-module-6.1.0-29-amd64
/usr/bin/make -f debian/rules kdist_clean kdist_config binary-modules
make[1]: Entering directory '/usr/src/modules/cloop'
rm -rf *.ko debian/cloop-module-6.1.0-29-amd64
+ for templ in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.config /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postrm /usr/src/modules/cloop/debian/cloop-module-_KVERS_.templ
ates
++ echo /usr/src/modules/cloop/debian/cloop-module-_KVERS_.config
++ sed -e s/_KVERS_/6.1.0-29-amd64/g
+ cp /usr/src/modules/cloop/debian/cloop-module-_KVERS_.config /usr/src/modules/cloop/debian/cloop-module-6.1.0-29-amd64.config
+ for templ in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.config /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postrm /usr/src/modules/cloop/debian/cloop-module-_KVERS_.templ
ates
++ sed -e s/_KVERS_/6.1.0-29-amd64/g
++ echo /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in
+ cp /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in /usr/src/modules/cloop/debian/cloop-module-6.1.0-29-amd64.postinst.modules.in
+ for templ in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.config /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postrm /usr/src/modules/cloop/debian/cloop-module-_KVERS_.templ
ates
++ echo /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postrm
++ sed -e s/_KVERS_/6.1.0-29-amd64/g
+ cp /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postrm /usr/src/modules/cloop/debian/cloop-module-6.1.0-29-amd64.postrm
+ for templ in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.config /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postrm /usr/src/modules/cloop/debian/cloop-module-_KVERS_.templ
ates
++ sed -e s/_KVERS_/6.1.0-29-amd64/g
++ echo /usr/src/modules/cloop/debian/cloop-module-_KVERS_.templates
+ cp /usr/src/modules/cloop/debian/cloop-module-_KVERS_.templates /usr/src/modules/cloop/debian/cloop-module-6.1.0-29-amd64.templates
+ for templ in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in /usr/src/modules/cloop/debian/control.modules.in
+ : generate /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst
+ test '!' -e /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst
+ sed -e 's/##KVERS##/6.1.0-29-amd64/g ;s/#KVERS#/6.1.0-29-amd64/g ; s/_KVERS_/6.1.0-29-amd64/g ; s/##KDREV##/6.1.123-1/g ; s/#KDREV#/6.1.123-1/g ; s/_KDREV_/6.1.123-1/g '
+ for templ in /usr/src/modules/cloop/debian/cloop-module-_KVERS_.postinst.modules.in /usr/src/modules/cloop/debian/control.modules.in
+ : generate /usr/src/modules/cloop/debian/control
+ test '!' -e /usr/src/modules/cloop/debian/control
+ test -e /usr/src/modules/cloop/debian/control.backup
+ cp /usr/src/modules/cloop/debian/control /usr/src/modules/cloop/debian/control.backup
+ sed -e 's/##KVERS##/6.1.0-29-amd64/g ;s/#KVERS#/6.1.0-29-amd64/g ; s/_KVERS_/6.1.0-29-amd64/g ; s/##KDREV##/6.1.123-1/g ; s/#KDREV#/6.1.123-1/g ; s/_KDREV_/6.1.123-1/g '
/usr/bin/make module KERNEL_DIR=/lib/modules/6.1.0-29-amd64/build KVERSION=6.1.0-29-amd64
make[2]: Entering directory '/usr/src/modules/cloop'
Building for Kernel Patchlevel 6
/usr/bin/make modules -C /lib/modules/6.1.0-29-amd64/build M=/usr/src/modules/cloop
make[3]: Entering directory '/usr/src/linux-headers-6.1.0-29-amd64'
CC [M] /usr/src/modules/cloop/cloop.o
/usr/src/modules/cloop/cloop.c: In function ‘cloop_queue_rq’:
/usr/src/modules/cloop/cloop.c:471:32: error: ‘struct request’ has no member named ‘rq_disk’
471 | struct cloop_device *clo = req->rq_disk->private_data;
| ^~
/usr/src/modules/cloop/cloop.c: In function ‘cloop_alloc’:
/usr/src/modules/cloop/cloop.c:1175:2: error: implicit declaration of function ‘blk_cleanup_disk’; did you mean ‘blk_alloc_disk’? [-Werror=implicit-function-declaration]
1175 | blk_cleanup_disk(clo->clo_disk);
| ^~~~~~~~~~~~~~~~
| blk_alloc_disk
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-6.1.0-29-common/scripts/Makefile.build:255: /usr/src/modules/cloop/cloop.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.1.0-29-common/Makefile:2034: /usr/src/modules/cloop] Error 2
make[3]: Leaving directory '/usr/src/linux-headers-6.1.0-29-amd64'
make[2]: *** [Makefile:47: cloop.ko] Error 2
make[2]: Leaving directory '/usr/src/modules/cloop'
make[1]: *** [debian/rules:13: binary-modules] Error 2
make[1]: Leaving directory '/usr/src/modules/cloop'
make: *** [/usr/share/modass/include/common-rules.mk:56: kdist_build] Error 2
ESC[7mBUILD FAILED!
ESC[27mSee /var/cache/modass/cloop-src.buildlog.6.1.0-29-amd64.1738806017 for details.
Build failed. Press Return to continue...
Andreas
tags 1095263 + help thanks Hallo, * Andreas Beckmann [Thu, Feb 06 2025, 03:00:26AM]: Yes. I tried to add latest API adjustments but it is still failing. Currently pushed to https://github.com/Code7R/cloop/tree/bugfix/linux_IO_API_adjustments but it is still not working with kernel versions beyond 6.7 or so. I am strugling with the queue limit setup API changes which happened somewhere between 6.8 and 6.10, and it's not trivial. If there is real interest in keeping this package alive, I would probably ask for help later. Okay. Maybe, but IMHO there is not much public interest in that kernel module except for very specialized Live Linux distros, i.e. I cannot remember anyone reporting this wish. @Klaus: do we actually need cloop nowadays? It is an isolated project, and there is at least one alternative called squashfs, which is apparently well maintained and supports modern compression (Zstandard). https://github.com/Code7R/cloop/blob/bugfix/linux_IO_API_adjustments/cloop.c#L1187 which probably needs more than a call there. Just judging by what ZFS people had to change last year, i.e. https://github.com/openzfs/zfs/commit/b409892ae5028965a6fe98dde1346594807e6e45 . Repro like: make module KERNEL_DIR=/usr/src/linux KVERSION=6.13.0-rc4+ Best regards, Eduard.
I just checked Knoppix 9.1, which is the latest public release dated January 2021, and it uses cloop. I think all the other live distros have switched to squashfs however :) Best, Chris