Opened 3 months ago

Closed 3 months ago

#5540 closed enhancement (fixed)

kmod-33

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 12.2
Component: Book Version: git
Severity: normal Keywords:
Cc:

Description

New version.

Change History (11)

comment:1 by Joe Locash, 3 months ago

kmod now needs scdoc (https://git.sr.ht/~sircmpwn/scdoc/) to build man pages or configure bombs:

configure: error: *** scdoc needed for building manpages. Either install it or pass --disable-manpages

comment:2 by Bruce Dubbs, 3 months ago

I really don't want to add another package to build man pages. There are 11 man pages (about 50 KB) so we will need to create them and download them from anduin similar to what we do for systemd,

comment:3 by Xi Ruoyao, 3 months ago

I'd prefer just adding scdoc. To create the man page tarball we need to add scdoc into BLFS anyway, so creating the man page tarball will +1 tarball in LFS, +1 tarball in BLFS, and +some manual steps to the edtiors. But adding scdoc will only +1 tarball in LFS.

And it looks like scdoc does not have any dependency other than Binutils/GCC/Glibc.

comment:4 by Xi Ruoyao, 3 months ago

Another option is just not to install the man pages. I don't think the man pages of kmod very informative anyway.

comment:5 by Xi Ruoyao, 3 months ago

One annoying thing about scdoc is the upstream download URL https://git.sr.ht/~sircmpwn/scdoc/archive/1.11.3.tar.gz contains a stupid filename. And unlike GitHub, "https://git.sr.ht/~sircmpwn/scdoc/archive/1.11.3/scdoc-1.11.3.tar.gz" won't work. We can use http://ftp.debian.org/debian/pool/main/s/scdoc/scdoc_1.11.3.orig.tar.gz instead (like iso-codes).

Version 0, edited 3 months ago by Xi Ruoyao (next)

comment:6 by Bruce Dubbs, 3 months ago

I agree about the scdoc tarball download. That's one strike against it.

I've already built the man pages and uploaded the tarball to anduin. About 60 KB. I didn't bother to compress it. I don't want to skip the man pages for completeness.

tar -C /usr/share/man -xvf ../kmod-manpages-33.tar

How is a separate tarball for man pages different from the systemd man pages?

in reply to:  6 comment:7 by Xi Ruoyao, 3 months ago

Replying to Bruce Dubbs:

I agree about the scdoc tarball download. That's one strike against it.

I've already built the man pages and uploaded the tarball to anduin. About 60 KB. I didn't bother to compress it. I don't want to skip the man pages for completeness.

tar -C /usr/share/man -xvf ../kmod-manpages-33.tar

How is a separate tarball for man pages different from the systemd man pages?

The difference is systemd man pages need 4 packages. If it only needed one, we would (and should) just add this package as well.

Last edited 3 months ago by Xi Ruoyao (previous) (diff)

comment:8 by Xi Ruoyao, 3 months ago

And 60 KB is even larger than the scdoc tarball (16 KB).

comment:9 by Bruce Dubbs, 3 months ago

kmod 33

Improvements

  • Allow to handle compressed modules even without decompression libraries linked in. Previously we would detect if the kernel supported the decompression algorithm and pass the module directly through finit_module(). However it wouldn't consider the file if the respective decompression library was compiled out. Now it's possible to completely disable all libraries and still have module load working with libkmod.

Tools that inspect module content themselves like modinfo and depmod won't work if the decompression library is not enabled.

  • Add weak dependencies - these are similar to pre softdep, but they don't cause the dependency to be loaded by libkmod: when a module has a weak dependency, it is expected that module may or may not be used, with decision happening in runtime by the kernel. It's purpose is to be informational for other tools like ones used to create initramfs, so the module is made available before switch_root(), but doesn't imply it to be loaded when not needed.
  • Improve compatibility with non-gnu libc like musl and uClibc. Now it's possible to build and use libkmod and tools without any additional compat patches.
  • Move manpages from xsltproc to scdoc, which is now needed during build.
  • Improve documentation in manpages, fixing typos, rewording sentences, detailing how configuration files are handled with precedence order and making all the manpages more consistent on how to reference options, environment variables, configuration, authors, etc.
  • Speed up zstd decompression, particularly when not using glibc.
  • Stop parsing .alias files from modprobe.d directories. Configuration files were always documented as needing the .conf extension. For compatibility reason with module-init-tools, kmod also parsed .alias files. However that was also done in module-init-tools for compatibility reasons and not documented anywhere. From inspection on what distros are using, none use .alias files in practice, so stop parsing those files and follow what's documented.
  • Adopt SPDX for license and cleanup comments on individual files.
  • Since kmod 29 there's a github mirror for the repository. Now it's also used for issues and improvement tracking. With that, the old TODO file has been removed and distros/users are encouraged to file issues in github.

Bug fixes

  • Move kmod.pc to the right dir, ${datadir}/pkgconfig, as it's related to kmod, not libkmod.
  • Fix error handling while loading a file and mmap fails.
  • Fix error handling while handling errors from the decompression libraries.
  • Add missing documentation for KMOD_INDEX_MODULES_BUILTIN that was added in v27 breaking the ABI. A wide search has found one external tool using it, which hasn't been updated in the past 12 years. It was deemed safe to simply update the documentation to include the missing enum.
  • Move kmod_module_new_from_name_lookup() to the correct symbol version. It was added by mistake to @LIBKMOD_5 when v30 got released. No external user of this API was found, so it was considered safe to just move it.

Others

  • Overwrite symlinks when installing tools.
  • General cleanup of how (de)compression libraries are integrated.
  • Add CI infrastructure to automatically test in several distros before applying commit series. Currently the latest versions of Alpine, Archlinux, Fedora and Ubuntu are covered. More distros are easy to add as they are all containerized.

comment:10 by Bruce Dubbs, 3 months ago

Owner: changed from lfs-book to Bruce Dubbs
Status: newassigned

comment:11 by Bruce Dubbs, 3 months ago

Resolution: fixed
Status: assignedclosed

Fixed at commit 4c522f3775.

Note: See TracTickets for help on using tickets.