--- /dev/null
+kmod (34.2-2) unstable; urgency=medium
+
+ * kmod.initramfs-hook: if compressed modules have been copied to the
+ initramfs and CONFIG_MODULE_DECOMPRESS=n (which is not the default
+ in Debian kernels) then also copy the compression libraries needed
+ by kmod to load them. (Closes: #1099801)
+
+ -- Marco d'Itri <md@linux.it> Fri, 25 Apr 2025 11:50:41 +0200
+
+kmod (34.2-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Marco d'Itri <md@linux.it> Sun, 30 Mar 2025 03:59:19 +0200
+
+kmod (34.1-2) unstable; urgency=medium
+
+ * Do not delete the init script symlinks if some other package is providing
+ that init script. (Closes: #1100035)
+
+ -- Marco d'Itri <md@linux.it> Wed, 12 Mar 2025 14:33:48 +0100
+
+kmod (34.1-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Load the decompression libraries on demand with dlopen(3).
+
+ -- Marco d'Itri <md@linux.it> Thu, 06 Mar 2025 07:42:03 +0100
+
+kmod (34-3) unstable; urgency=medium
+
+ * Breaks/Replaces bash-completion. (Closes: #1098953)
+ * Delete /etc/rcS.d/[SK]*kmod too on upgrades. (Closes: #1098941)
+
+ -- Marco d'Itri <md@linux.it> Fri, 28 Feb 2025 02:39:04 +0100
+
+kmod (34-2) unstable; urgency=medium
+
+ * Added Debian patch fix_riscv64_tests to wrap riscv_hwprobe(2) on
+ riscv64 systems, which caused the tests to fail.
+ * Do not Build-Depend on the missing linux-headers-generic package on sh4
+ and x32.
+
+ -- Marco d'Itri <md@linux.it> Tue, 25 Feb 2025 21:21:39 +0100
+
+kmod (34-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Marco d'Itri <md@linux.it> Tue, 25 Feb 2025 12:40:52 +0100
+
+kmod (33+20241031-1) experimental; urgency=medium
+
+ * New upstream snapshot.
+
+ -- Marco d'Itri <md@linux.it> Sun, 03 Nov 2024 18:31:39 +0100
+
+kmod (33+20241024-1) experimental; urgency=medium
+
+ * New upstream snapshot.
+ * Build the package with Meson.
+
+ -- Marco d'Itri <md@linux.it> Sun, 27 Oct 2024 00:14:55 +0200
+
+kmod (33+20240816-3) unstable; urgency=medium
+
+ * Avoid a cosmetic postinst error message on new installs.
+ (Closes: #1079307)
+ * Merge some packaging improvements courtesy of Guillem Jover.
+ (Closes: #1079627)
+
+ -- Marco d'Itri <md@linux.it> Mon, 26 Aug 2024 08:16:59 +0200
+
+kmod (33+20240816-2) unstable; urgency=medium
+
+ * Make libkmod2 Conflict with dracut-install (<= 103-1), because it
+ uses a @LIBKMOD_5 symbol which was mistakely introduced in 32+20240327-1
+ and then removed again in 33+20240816-1. (Closes: #1079022)
+ * Make libkmod-dev Break/Replace kmod (<< 33+20240816-2), because kmod.pc
+ was moved from kmod to libkmod-dev. (Closes: #1079103)
+
+ -- Marco d'Itri <md@linux.it> Tue, 20 Aug 2024 12:14:18 +0200
+
+kmod (33+20240816-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+
+ -- Marco d'Itri <md@linux.it> Sun, 18 Aug 2024 23:23:48 +0200
+
+kmod (32+20240611-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * Enable again the test suite on non-i386 32 bit architectures.
+ (Closes: #1065973)
+
+ -- Marco d'Itri <md@linux.it> Wed, 12 Jun 2024 18:06:46 +0200
+
+kmod (32+20240327-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * Disable the test suite on non-i386 32 bit architectures. (See #1065973.)
+
+ -- Marco d'Itri <md@linux.it> Sun, 26 May 2024 05:23:33 +0200
+
+kmod (32-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Remove the new upstream symlinks in /usr/bin/. (Closes: #1064798)
+
+ -- Marco d'Itri <md@linux.it> Sat, 09 Mar 2024 04:56:40 +0100
+
+kmod (31+20240202-2) unstable; urgency=medium
+
+ * Stop using /usr/lib/modules/ because it requires coordination with other
+ packages. (Closes: #1063749)
+
+ -- Marco d'Itri <md@linux.it> Tue, 13 Feb 2024 17:33:24 +0100
+
+kmod (31+20240202-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+
+ -- Marco d'Itri <md@linux.it> Sat, 10 Feb 2024 20:10:16 +0100
+
+kmod (31-1) unstable; urgency=medium
+
+ [ Marco d'Itri ]
+ * New upstream release.
+
+ [ Helmut Grohne ]
+ * DEP17: Move all files to /usr/. (Closes: #1059920)
+
+ -- Marco d'Itri <md@linux.it> Thu, 04 Jan 2024 20:10:38 +0100
+
+kmod (30+20230601-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload with maintainer approval.
+ * Enable xz support in the udeb. This is needed since linux 6.6.8-1 hit
+ unstable, as its binary packages now ship compressed modules.
+ * Declare minimal version for the liblzma-dev build-dep accordingly.
+
+ -- Cyril Brulebois <kibi@debian.org> Sun, 24 Dec 2023 00:08:19 +0100
+
+kmod (30+20230601-2) unstable; urgency=medium
+
+ * kmod.postinst: run restorecon after creating /etc/modules.
+
+ -- Marco d'Itri <md@linux.it> Sat, 23 Sep 2023 00:39:17 +0200
+
+kmod (30+20230601-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * On new systems and if /etc/modules was not been modified locally then
+ replace it with a comment which explains that it is obsolete.
+ * Remove the related modules(5) man pages.
+ * Make the init script ignore /lib/modules-load.d/. (Closes: #1050427)
+
+ -- Marco d'Itri <md@linux.it> Sat, 26 Aug 2023 02:38:18 +0200
+
+kmod (30+20230519-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+
+ -- Marco d'Itri <md@linux.it> Sun, 11 Jun 2023 00:34:33 +0200
+
+kmod (30+20221128-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * Add a dependency on pkg-config | pkgconf. (Closes: #1023895)
+
+ -- Marco d'Itri <md@linux.it> Sat, 10 Dec 2022 01:02:24 +0100
+
+kmod (30+20220905-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * Remove the dependency on lsb-base. (Closes: #1020605)
+ * Update the copyright file. (Closes: #1021033)
+
+ -- Marco d'Itri <md@linux.it> Sat, 08 Oct 2022 05:07:42 +0200
+
+kmod (30+20220630-3) unstable; urgency=high
+
+ * Make test suite failures non-fatal on mipsel, because some tests
+ have been broken on it for years but since no tests were actually
+ being run before version 30+20220630-1 then nobody noticed.
+
+ -- Marco d'Itri <md@linux.it> Sat, 30 Jul 2022 02:25:29 +0200
+
+kmod (30+20220630-2) unstable; urgency=medium
+
+ [ Marco d'Itri ]
+ * Implemented the generation of a less strict shlibs file to benefit
+ udebs.
+
+ [ Helmut Grohne ]
+ * Annotated the zstd dependency with <!nocheck>. (Closes: #1014437)
+
+ [ Witold Baryluk ]
+ * Allow USB audio devices to be the first sound device, because nowadays
+ they are more common and this is what the other distributions do.
+
+ -- Marco d'Itri <md@linux.it> Tue, 12 Jul 2022 01:58:34 +0200
+
+kmod (30+20220630-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * Enabled support for zstd. (Closes: #990092)
+ * kmod.postinst: removed code to handle upgrades from Debian <= 8.
+ (Closes: #1009349, #1000659)
+ * Changed the $PATH in the init script to include /usr/. (Closes: #993297)
+ * Enabled the test suite.
+
+ -- Marco d'Itri <md@linux.it> Sun, 03 Jul 2022 13:28:18 +0200
+
+kmod (29-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Marco d'Itri <md@linux.it> Tue, 17 Aug 2021 09:04:37 +0200
+
+kmod (28-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Fixed modinfo -F for built-in modules. (Closes: #970871)
+
+ -- Marco d'Itri <md@linux.it> Fri, 08 Jan 2021 02:37:04 +0100
+
+kmod (27+20200310-2) unstable; urgency=medium
+
+ * Re-upload to unstable.
+
+ -- Marco d'Itri <md@linux.it> Sat, 18 Apr 2020 17:53:55 +0200
+
+kmod (27+20200310-1) experimental; urgency=medium
+
+ * New upstream snapshot.
+ * Split kmod-udeb off of libkmod2-udeb and actually ship the libraries
+ in libkmod2-udeb. (Closes: #953952)
+
+ -- Marco d'Itri <md@linux.it> Sun, 12 Apr 2020 00:59:25 +0200
+
+kmod (27-2) unstable; urgency=medium
+
+ * Drop the verbose_missing_bin patch, which became too much noisy after
+ new files were introduced by 5.3 kernels. (Closes: #949444)
+
+ -- Marco d'Itri <md@linux.it> Fri, 13 Mar 2020 22:53:37 +0100
+
+kmod (27-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Reset the SELinux file attributes in the initramfs. (Closes: #948366)
+
+ -- Marco d'Itri <md@linux.it> Wed, 19 Feb 2020 04:56:30 +0100
+
+kmod (26+20191223-1) unstable; urgency=medium
+
+ [ Debian Janitor ]
+ * Trim trailing whitespace.
+ * Use secure URI in debian/watch.
+ * Rely on pre-initialized dpkg-architecture variables.
+ * Set upstream metadata fields: Repository.
+
+ [ Marco d'Itri ]
+ * New upstream snapshot.
+
+ -- Marco d'Itri <md@linux.it> Mon, 06 Jan 2020 01:59:49 +0100
+
+kmod (26-3) unstable; urgency=medium
+
+ * Create again /etc/modprobe.d/. (Closes: #940221)
+ * Do not reference removed options support in modules(5). (Closes: #931136)
+
+ -- Marco d'Itri <md@linux.it> Tue, 17 Sep 2019 21:40:12 +0200
+
+kmod (26-2) unstable; urgency=medium
+
+ * Removed --add-udeb from dh_makeshlibs, since libkmod2-udeb does not
+ actually contain a library. (Closes: #939779)
+ * Switched to dh.
+
+ -- Marco d'Itri <md@linux.it> Wed, 11 Sep 2019 09:29:57 +0200
+
+kmod (26-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Removed patch check_builtin_kver, which was needed to support 2.6.32
+ kernels.
+ * Link with OpenSSL to support parsing modules signatures.
+
+ -- Marco d'Itri <md@linux.it> Sun, 10 Feb 2019 00:00:31 +0100
+
+kmod (25-2) unstable; urgency=medium
+
+ * Moved the libraries to /usr/lib/. (Closes: #894566)
+
+ -- Marco d'Itri <md@linux.it> Sat, 17 Nov 2018 01:56:00 +0100
+
+kmod (25-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Enabled support for xz-compressed modules. (Closes: #772628)
+
+ -- Marco d'Itri <md@linux.it> Sun, 21 Jan 2018 01:02:46 +0100
+
+kmod (24-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Marco d'Itri <md@linux.it> Mon, 27 Feb 2017 02:50:32 +0100
+
+kmod (23-2) unstable; urgency=medium
+
+ * Backported upstream commit 6b77f18 to stop depmod crashing after
+ detecting a dependency cycle. (Closes: #846888)
+ * Enabled hardening=+bindnow.
+
+ -- Marco d'Itri <md@linux.it> Mon, 26 Dec 2016 03:42:54 +0100
+
+kmod (23-1) unstable; urgency=medium
+
+ * New upstream release. (Closes: #837626)
+
+ -- Marco d'Itri <md@linux.it> Tue, 27 Sep 2016 01:40:32 +0200
+
+kmod (22-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Set $SOURCE_DATE_EPOCH in debian/rules for reproducibility.
+ (Closes: #783152)
+ * Remove the module-init-tools transitional package.
+
+ -- Marco d'Itri <md@linux.it> Sun, 20 Dec 2015 17:04:10 +0100
+
+kmod (21-1) unstable; urgency=medium
+
+ * New upstream release. Fixes:
+ + spurious spaces in lsmod output. (Closes: #782692)
+ + a missing comman in rmmod(8). (Closes: #787548)
+ * kmod.init: support the modules-load.d directories in /usr.
+ (Closes: #673747)
+ * Build the developers' documentation with gtk-doc. (Closes: #789462)
+
+ -- Marco d'Itri <md@linux.it> Sun, 05 Jul 2015 21:18:24 +0200
+
+kmod (20-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Marco d'Itri <md@linux.it> Sun, 08 Mar 2015 19:10:08 +0100
+
+kmod (18-3) unstable; urgency=high
+
+ * postinst: do not use autodie. (Closes: #762974)
+ * postinst: do not create an empty etc-modules-parameters.conf.
+
+ -- Marco d'Itri <md@linux.it> Sat, 27 Sep 2014 08:01:49 +0200
+
+kmod (18-2) unstable; urgency=medium
+
+ * postinst: move any modules parameters from /etc/modules to a new
+ /etc/modprobe.d/etc-modules-parameters.conf file. (Closes: #627949)
+ * initramfs-hook: do not fail if /lib/modprobe.d/ is empty.
+ * Add the man page for kmod(8). (Closes: #665873)
+ * Document depmod --show in depmod(8). (Closes: #687435)
+
+ -- Marco d'Itri <md@linux.it> Wed, 17 Sep 2014 03:50:34 +0200
+
+kmod (18-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Marco d'Itri <md@linux.it> Sat, 21 Jun 2014 04:27:39 +0200
+
+kmod (17-2) unstable; urgency=medium
+
+ * Build-Depend on gtk-doc-tools. (Closes: #747005)
+
+ -- Marco d'Itri <md@linux.it> Sun, 04 May 2014 20:38:42 +0200
+
+kmod (17-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Declared that kmod Breaks oss-compat 4. (Closes: #736748)
+ * Merged the few useful directives from the alsa-base package and added
+ a versioned Breaks to force it to be unistalled.
+
+ -- Marco d'Itri <md@linux.it> Thu, 01 May 2014 21:10:36 +0200
+
+kmod (16-2) unstable; urgency=medium
+
+ * Always Build-Depend on xsltproc. (Closes: #733760)
+
+ -- Marco d'Itri <md@linux.it> Thu, 02 Jan 2014 04:04:26 +0100
+
+kmod (16-1) unstable; urgency=low
+
+ * New upstream release. (Closes: #716739)
+ + Improves error messages. (Closes: #676387)
+ + Fixes modprobe -f. (Closes: #720599)
+ * Added an example to modules(5), patch by Regid Ichira. (Closes: #711468)
+
+ -- Marco d'Itri <md@linux.it> Tue, 31 Dec 2013 03:56:44 +0100
+
+kmod (9-3) unstable; urgency=low
+
+ * Added backported patch dot_kcmdline: correctly parse kcmdline parameters
+ containing a dot. (Closes: #689872)
+ * Added backported patch bad_alias_assertion: stop modprobe from aborting
+ from an assertion because of some invalid but common configuration
+ directives. (Closes: #674110)
+ * Removed the nfs4 alias from aliases.conf as requested by the kernel
+ team. (Closes: #683972)
+ * Removed the unnecessary build-dependency on perl. (Closes: #697750)
+
+ -- Marco d'Itri <md@linux.it> Sun, 07 Apr 2013 18:19:01 +0200
+
+kmod (9-2) unstable; urgency=low
+
+ * Backported upstream fixes to make modprobe work like in module-init-tools
+ and not load a blacklisted module even if modprobe is invoked with one of
+ its aliases.
+ * Report an error when some .bin files do not exist. (Closes: #684901)
+ * Really build the udeb with -Os -fomit-frame-pointer.
+
+ -- Marco d'Itri <md@linux.it> Mon, 27 Aug 2012 00:40:18 +0200
+
+kmod (9-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Marco d'Itri <md@linux.it> Mon, 25 Jun 2012 02:48:38 +0200
+
+kmod (8-2) unstable; urgency=medium
+
+ * Implemented systemd-compatible processing of modules-load.d directories,
+ courtesy of Josh Triplett. (Closes: #672960)
+ * Properly fix kmod on ia64 with backported patch commit-d30319e.
+
+ -- Marco d'Itri <md@linux.it> Sun, 20 May 2012 23:19:47 +0200
+
+kmod (8-1) unstable; urgency=medium
+
+ * New upstream release. Fixes:
+ + An unclear error message. (Closes: #668216)
+ * Moved libkmod.pc to the multiarch directory. (Closes: #670005)
+ * Do not warn about a missing modules.builtin file for kernel versions
+ < 2.6.33. (Closes: #670965)
+ * Removed patch work_around_linking_issues, which is properly fixed by
+ upstream patch commit-9625375.
+ * Made the init script exit without processing /etc/modules if the
+ /etc/modules-load.d/modules.conf symlink exists.
+
+ -- Marco d'Itri <md@linux.it> Mon, 14 May 2012 02:45:06 +0200
+
+kmod (6-2) unstable; urgency=low
+
+ * Applied a few upstream changesets to fix:
+ + depmod correctly processing a kernel versions different from the
+ running one. (Closes: #662891)
+ + modprobe -q still too much verbose. (Closes: #662822)
+ + modprobe -r removing only the first argument. (Closes: #662984)
+ * Restored the code from the old module-init-tools package which deletes
+ obsolete conffiles. Abort upgrading from releases older than lenny.
+ (Closes: #663159)
+
+ -- Marco d'Itri <md@linux.it> Fri, 16 Mar 2012 02:21:00 +0100
+
+kmod (6-1.1) unstable; urgency=low
+
+ * Non-maintainer upload with maintainer approval.
+ * Work around FTBFS on ia64 (probable toolchain bug) due to undefined
+ references to kmod_log when linking tools/kmod: Add libkmod-private.la
+ to kmod's LDADD variable to ensure that linking happens properly.
+ + Patch: work_around_linking_issues; tested on merulo.
+
+ -- Cyril Brulebois <kibi@debian.org> Wed, 07 Mar 2012 01:40:37 +0000
+
+kmod (6-1) unstable; urgency=low
+
+ * New upstream release. Fixes:
+ + Documented the modprobe.blacklist parameter. (Closes: #630338)
+
+ -- Marco d'Itri <md@linux.it> Sat, 03 Mar 2012 16:53:33 +0100
+
+kmod (5-2) experimental; urgency=high
+
+ * Added patch check_if_exists to fix loops caused by install directives.
+ (Closes: #659838)
+
+ -- Marco d'Itri <md@linux.it> Sun, 19 Feb 2012 13:07:21 +0100
+
+kmod (5-1) experimental; urgency=low
+
+ * New upstream release. (Closes: #659195)
+
+ -- Marco d'Itri <md@linux.it> Sun, 12 Feb 2012 04:48:24 +0100
+
+kmod (3-1) experimental; urgency=low
+
+ * Initial release. (Closes: #652284)
+ * When replacing module-init-tools:
+ - /etc/modules is preserved
+ - /etc/modprobe.d/aliases.conf is deleted if unmodified, otherwise it
+ is renamed to aliases-m-i-t.conf and will be used by kmod
+ - /etc/init.d/module-init-tools is deleted if unmodified, otherwise it
+ is renamed to /etc/init.d/module-init-tools.dpkg-bak
+
+ -- Marco d'Itri <md@linux.it> Sun, 08 Jan 2012 20:47:12 +0100
--- /dev/null
+Source: kmod
+Section: admin
+Priority: important
+Maintainer: Marco d'Itri <md@linux.it>
+Build-Depends: debhelper-compat (= 13),
+ meson,
+ pahole <!nocheck>,
+ pkgconf,
+ liblzma-dev (>= 5.4.5-0.2),
+ libssl-dev,
+ libzstd-dev, zstd <!nocheck>,
+ linux-headers-generic [!armel !i386 !mips64el !sh4 !x32] <!nocheck>,
+ linux-headers-mips64r6el [mips64el] <!nocheck>,
+ linux-headers-rpi [armel] <!nocheck>,
+ linux-headers-sh7785lcr [sh4] <!nocheck>,
+ gtk-doc-tools <!nodoc>,
+ scdoc,
+Standards-Version: 4.7.2.0
+Rules-Requires-Root: no
+Vcs-Git: https://salsa.debian.org/md/kmod.git
+Vcs-Browser: https://salsa.debian.org/md/kmod
+
+Package: kmod
+Architecture: linux-any
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Breaks: bash-completion (<< 1:2.16.0-1)
+Replaces: bash-completion (<< 1:2.16.0-1)
+Description: tools for managing Linux kernel modules
+ This package contains a set of programs for loading, inserting, and
+ removing kernel modules for Linux.
+ It replaces module-init-tools.
+
+Package: libkmod2
+Section: libs
+Priority: optional
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: libkmod shared library
+ This library provides an API for insertion, removal, configuration and
+ listing of kernel modules.
+
+Package: libkmod-dev
+Section: libdevel
+Priority: optional
+Architecture: linux-any
+Multi-Arch: same
+Depends: ${misc:Depends}, libkmod2 (= ${binary:Version})
+Breaks: kmod (<< 33+20240816-2)
+Replaces: kmod (<< 33+20240816-2)
+Description: libkmod development files
+ This package contains the files needed for developing applications that
+ use libkmod.
+
+Package: kmod-udeb
+Package-Type: udeb
+Section: debian-installer
+Architecture: linux-any
+Build-Profiles: <!noudeb>
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: libkmod shared library
+ This is a minimal version of kmod, only for use in the installation system.
+
+Package: libkmod2-udeb
+Package-Type: udeb
+Section: debian-installer
+Architecture: linux-any
+Build-Profiles: <!noudeb>
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: libkmod shared library
+ This is a minimal version of libkmod2, only for use in the installation system.
--- /dev/null
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://www.kernel.org/pub/linux/utils/kernel/kmod/
+
+Files: *
+Copyright: (C) 2011-2013 ProFUSION embedded systems
+ (C) 2013-2016 Intel Corporation. All rights reserved.
+ (C) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
+ (C) 2019 Alexey Gladkov <gladkov.alexey@gmail.com>
+ (C) 2012 Pedro Pedruzzi
+ (C) 2013 Michal Marek, SUSE
+License: LGPL-2.1+
+
+Files: shell-completion/bash/kmod
+Copyright: 2010 Ran Benita
+ (C) 2013 Intel Corporation. All rights reserved.
+License: LGPL-2.1+
+
+Files: tools/*
+Copyright: (C) 2011-2013 ProFUSION embedded systems.
+ (C) 2014-2016 Intel Corporation. All rights reserved.
+ (C) 2012-2013 Lucas De Marchi <lucas.de.marchi@gmail.com>
+ (C) 2012 Pedro Pedruzzi
+License: GPL-2+
+
+License: GPL-2+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+Comment:
+ On Debian systems the complete text of the license can be found in
+ /usr/share/common-licenses/GPL-2 .
+
+License: LGPL-2.1+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+Comment:
+ On Debian systems the complete text of the license can be found in
+ /usr/share/common-licenses/LGPL-2.1 .
--- /dev/null
+# These are the standard aliases and dependencies.
+# This file does not need to be modified.
+
+# prevent unusual drivers from appearing as the first sound device ###########
+options snd-pcsp index=-2
+options cx88_alsa index=-2
+options snd-atiixp-modem index=-2
+options snd-intel8x0m index=-2
+options snd-via82xx-modem index=-2
--- /dev/null
+[DEFAULT]
+upstream-tag = v%(version)s
+pristine-tar = False
+compression = xz
+
+[pq]
+patch-numbers = False
--- /dev/null
+#!/usr/bin/perl
+# print the highest package version found in the symbols file read as input
+
+use v5.30;
+use warnings;
+
+use Dpkg::Version;
+
+my $highest = 0;
+while (<>) {
+ my ($version) = /^\s+\S+\s+(\S+)$/;
+ next if not $version;
+ next if version_compare($highest, $version) == 1;
+ $highest = $version;
+}
+
+die 'could not find a version number in the input' if not $highest;
+
+say $highest;
+
--- /dev/null
+etc/depmod.d/
+etc/modprobe.d/
+usr/lib/depmod.d/
+usr/lib/modprobe.d/
+usr/bin/kmod
+usr/sbin/
--- /dev/null
+/usr/bin/kmod /usr/bin/lsmod
--- /dev/null
+#!/bin/sh -e
+# Copy the compatibility symlinks until initramfs-tools will be converted
+# to use the kmod program.
+
+if [ "$1" = "prereqs" ]; then exit 0; fi
+
+. /usr/share/initramfs-tools/hook-functions
+
+copy_exec /usr/bin/kmod
+cp -aZ /usr/sbin/modprobe /usr/sbin/rmmod "$DESTDIR/usr/sbin/"
+
+mkdir -p "$DESTDIR/usr/lib/modprobe.d/"
+if [ "$(echo /usr/lib/modprobe.d/*)" != "/usr/lib/modprobe.d/*" ]; then
+ cp -aZ /usr/lib/modprobe.d/* "$DESTDIR/usr/lib/modprobe.d/"
+fi
+
+kconfig_yes() {
+ [ -e "/boot/config-$version" ] || return 1
+ egrep -q "^$1=y$" "/boot/config-$version" || return 1
+ return 0
+}
+
+# If CONFIG_MODULE_DECOMPRESS=n and compressed modules have been copied to
+# the initramfs then also copy the library that kmod will use with dlopen(3)
+# to uncompress them.
+if ! kconfig_yes CONFIG_MODULE_DECOMPRESS; then
+ if [ "$(find $DESTDIR/lib/modules/ -name "*.xz")" ]; then
+ copy_exec /usr/lib/*-linux-gnu/liblzma.so.5
+ fi
+ if [ "$(find $DESTDIR/lib/modules/ -name "*.zst")" ]; then
+ copy_exec /usr/lib/*-linux-gnu/libzstd.so.1
+ fi
+fi
+
--- /dev/null
+etc/depmod.d/
+etc/modprobe.d/
+usr/lib/depmod.d/
+debian/extra/aliases.conf usr/lib/modprobe.d/
+usr/bin/kmod
+usr/sbin/
+usr/share/bash-completion/
+usr/share/fish/vendor_functions.d/
+usr/share/zsh/site-functions/
--- /dev/null
+/usr/bin/kmod /usr/bin/lsmod
--- /dev/null
+rm_conffile /etc/init.d/kmod 34-1~
--- /dev/null
+usr/share/man/man5/*.5
+usr/share/man/man8/*.8
--- /dev/null
+#!/bin/sh -e
+
+delete_old_etc_modules() {
+ [ -e /etc/modules ] || return 0
+ # normalize the files by ignoring empty lines
+ local modules_hash="$(sed -e '/^$/d' /etc/modules | md5sum | cut -d ' ' -f1)"
+
+ case "$modules_hash" in
+ 330dcf902eae56682d44133c168fee89) ;;
+ 6e5894c5d926d1e69968e64e3ffa1cbd) ;;
+ *) return ;;
+ esac
+
+ # delete the unmodified /etc/modules
+ rm -f /etc/modules
+}
+
+create_etc_modules() {
+ [ -e /etc/modules ] && return 0
+ cat <<END > /etc/modules
+# /etc/modules is obsolete and has been replaced by /etc/modules-load.d/.
+# Please see modules-load.d(5) and modprobe.d(5) for details.
+#
+# Updating this file still works, but it is undocumented and unsupported.
+END
+ chmod 644 /etc/modules
+ if which restorecon > /dev/null 2>&1; then
+ restorecon /etc/modules
+ fi
+}
+
+sysvinit_cleanup() {
+ [ "$2" ] || return 0
+
+ dpkg --compare-versions $2 lt 34-3~ || return 0
+ # update-rc.d removes symlinks even if LSB initscript exists, contrary to
+ # update-rc-d(8). See #680293. Can be removed once it is fixed.
+ [ -f /etc/init.d/kmod ] && return 0
+ update-rc.d kmod remove || true
+}
+
+case "$1" in
+ configure)
+ sysvinit_cleanup "$@"
+ delete_old_etc_modules
+ create_etc_modules
+esac
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ purge)
+ rm -f /etc/modules
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+/usr/share/doc/libkmod2/
--- /dev/null
+usr/include/
+usr/lib/*/libkmod.so
+usr/lib/*/pkgconfig/libkmod.pc
+usr/share/gtk-doc/
+usr/share/pkgconfig/kmod.pc
--- /dev/null
+usr/lib/*/libkmod.so.2 usr/lib/
+usr/lib/*/libkmod.so.2.* usr/lib/
--- /dev/null
+usr/lib/*/libkmod.so.2
+usr/lib/*/libkmod.so.2.*
--- /dev/null
+libkmod.so.2 libkmod2 #MINVER#
+* Build-Depends-Package: libkmod-dev
+ LIBKMOD_22@LIBKMOD_22 22~
+ LIBKMOD_30@LIBKMOD_30 33~
+ LIBKMOD_33@LIBKMOD_33 33~
+ LIBKMOD_5@LIBKMOD_5 5~
+ LIBKMOD_6@LIBKMOD_6 6~
+ kmod_config_get_aliases@LIBKMOD_5 5~
+ kmod_config_get_blacklists@LIBKMOD_5 5~
+ kmod_config_get_install_commands@LIBKMOD_5 5~
+ kmod_config_get_options@LIBKMOD_5 5~
+ kmod_config_get_remove_commands@LIBKMOD_5 5~
+ kmod_config_get_softdeps@LIBKMOD_5 5~
+ kmod_config_get_weakdeps@LIBKMOD_33 33~
+ kmod_config_iter_free_iter@LIBKMOD_5 5~
+ kmod_config_iter_get_key@LIBKMOD_5 5~
+ kmod_config_iter_get_value@LIBKMOD_5 5~
+ kmod_config_iter_next@LIBKMOD_5 5~
+ kmod_dump_index@LIBKMOD_5 5~
+ kmod_get_dirname@LIBKMOD_22 22~
+ kmod_get_log_priority@LIBKMOD_5 5~
+ kmod_get_userdata@LIBKMOD_5 5~
+ kmod_list_last@LIBKMOD_5 5~
+ kmod_list_next@LIBKMOD_5 5~
+ kmod_list_prev@LIBKMOD_5 5~
+ kmod_load_resources@LIBKMOD_5 5~
+ kmod_module_apply_filter@LIBKMOD_6 6~
+ kmod_module_dependency_symbol_get_bind@LIBKMOD_5 5~
+ kmod_module_dependency_symbol_get_crc@LIBKMOD_5 5~
+ kmod_module_dependency_symbol_get_symbol@LIBKMOD_5 5~
+ kmod_module_dependency_symbols_free_list@LIBKMOD_5 5~
+ kmod_module_get_dependencies@LIBKMOD_5 5~
+ kmod_module_get_dependency_symbols@LIBKMOD_5 5~
+ kmod_module_get_filtered_blacklist@LIBKMOD_5 5~
+ kmod_module_get_holders@LIBKMOD_5 5~
+ kmod_module_get_info@LIBKMOD_5 5~
+ kmod_module_get_initstate@LIBKMOD_5 5~
+ kmod_module_get_install_commands@LIBKMOD_5 5~
+ kmod_module_get_module@LIBKMOD_5 5~
+ kmod_module_get_name@LIBKMOD_5 5~
+ kmod_module_get_options@LIBKMOD_5 5~
+ kmod_module_get_path@LIBKMOD_5 5~
+ kmod_module_get_refcnt@LIBKMOD_5 5~
+ kmod_module_get_remove_commands@LIBKMOD_5 5~
+ kmod_module_get_sections@LIBKMOD_5 5~
+ kmod_module_get_size@LIBKMOD_5 5~
+ kmod_module_get_softdeps@LIBKMOD_5 5~
+ kmod_module_get_symbols@LIBKMOD_5 5~
+ kmod_module_get_versions@LIBKMOD_5 5~
+ kmod_module_get_weakdeps@LIBKMOD_33 33~
+ kmod_module_info_free_list@LIBKMOD_5 5~
+ kmod_module_info_get_key@LIBKMOD_5 5~
+ kmod_module_info_get_value@LIBKMOD_5 5~
+ kmod_module_initstate_str@LIBKMOD_5 5~
+ kmod_module_insert_module@LIBKMOD_5 5~
+ kmod_module_new_from_loaded@LIBKMOD_5 5~
+ kmod_module_new_from_lookup@LIBKMOD_5 5~
+ kmod_module_new_from_name@LIBKMOD_5 5~
+ kmod_module_new_from_name_lookup@LIBKMOD_30 33~
+ kmod_module_new_from_path@LIBKMOD_5 5~
+ kmod_module_probe_insert_module@LIBKMOD_5 5~
+ kmod_module_ref@LIBKMOD_5 5~
+ kmod_module_remove_module@LIBKMOD_5 5~
+ kmod_module_section_free_list@LIBKMOD_5 5~
+ kmod_module_section_get_address@LIBKMOD_5 5~
+ kmod_module_section_get_name@LIBKMOD_5 5~
+ kmod_module_symbol_get_crc@LIBKMOD_5 5~
+ kmod_module_symbol_get_symbol@LIBKMOD_5 5~
+ kmod_module_symbols_free_list@LIBKMOD_5 5~
+ kmod_module_unref@LIBKMOD_5 5~
+ kmod_module_unref_list@LIBKMOD_5 5~
+ kmod_module_version_get_crc@LIBKMOD_5 5~
+ kmod_module_version_get_symbol@LIBKMOD_5 5~
+ kmod_module_versions_free_list@LIBKMOD_5 5~
+ kmod_new@LIBKMOD_5 5~
+ kmod_ref@LIBKMOD_5 5~
+ kmod_set_log_fn@LIBKMOD_5 5~
+ kmod_set_log_priority@LIBKMOD_5 5~
+ kmod_set_userdata@LIBKMOD_5 5~
+ kmod_unload_resources@LIBKMOD_5 5~
+ kmod_unref@LIBKMOD_5 5~
+ kmod_validate_resources@LIBKMOD_5 5~
--- /dev/null
+commit da2654b78ce3af083e42c2f7512d09082b872676
+Author: Yannick Le Pennec <yannick.lepennec@live.fr>
+Date: Mon Mar 24 18:35:53 2025 +0100
+
+ tools/rmmod: fix garbled error message
+
+ a6f9cd0 ("tools/rmmod: consistently use ERR logging facility") fixed
+ the split between syslog and stderr of various error message substrings
+ by calling the ERR macro instead of writing directly to stderr, but in
+ doing so also completely mangled the output because the ERR macro
+ decorates its arguments:
+
+ $ rmmod iwlwifi
+ rmmod: ERROR: Module iwlwifi is in use by:rmmod: ERROR: iwlmvmrmmod: ERROR:
+
+ And in syslog:
+
+ $ rmmod -s iwlwifi
+ 2025-03-24T17:22:34.878318+01:00 mangolassi rmmod: ERROR: Module iwlwifi is in use by:
+ 2025-03-24T17:22:34.889145+01:00 mangolassi rmmod: ERROR: iwlmvm
+ 2025-03-24T17:22:34.889224+01:00 mangolassi rmmod: ERROR:
+
+ This commit fixes that by building the holder names list with a strbuf
+ and then passes the whole thing at once to ERR.
+
+ Fixes: a6f9cd0 ("tools/rmmod: consistently use ERR logging facility")
+ Signed-off-by: Yannick Le Pennec <yannick.lepennec@live.fr>
+ Link: https://lore.kernel.org/r/VI1PR02MB48291E3BDB7E764ED67154949BA42@VI1PR02MB4829.eurprd02.prod.outlook.com
+ Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
+ Link: https://github.com/kmod-project/kmod/pull/328
+
+diff --git a/tools/rmmod.c b/tools/rmmod.c
+index 962d850..61f2e00 100644
+--- a/tools/rmmod.c
++++ b/tools/rmmod.c
+@@ -15,6 +15,7 @@
+ #include <sys/types.h>
+
+ #include <shared/macro.h>
++#include <shared/strbuf.h>
+
+ #include <libkmod/libkmod.h>
+
+@@ -63,16 +64,18 @@ static int check_module_inuse(struct kmod_module *mod)
+
+ holders = kmod_module_get_holders(mod);
+ if (holders != NULL) {
++ DECLARE_STRBUF_WITH_STACK(buf, 128);
+ struct kmod_list *itr;
+
+- ERR("Module %s is in use by:", kmod_module_get_name(mod));
+-
+ kmod_list_foreach(itr, holders) {
+ struct kmod_module *hm = kmod_module_get_module(itr);
+- ERR(" %s", kmod_module_get_name(hm));
++ strbuf_pushchar(&buf, ' ');
++ strbuf_pushchars(&buf, kmod_module_get_name(hm));
+ kmod_module_unref(hm);
+ }
+- ERR("\n");
++
++ ERR("Module %s is in use by:%s\n", kmod_module_get_name(mod),
++ strbuf_str(&buf));
+
+ kmod_module_unref_list(holders);
+ return -EBUSY;
--- /dev/null
+Description: wrap riscv_hwprobe(2)
+Author: Aurelien Jarno <aurel32@debian.org>
+
+--- a/testsuite/init_module.c
++++ b/testsuite/init_module.c
+@@ -364,6 +364,19 @@ TS_EXPORT long int syscall(long int __sy
+ return nextlib_syscall(__NR_gettid);
+ }
+
++#ifdef __NR_riscv_hwprobe
++ if (__sysno == __NR_riscv_hwprobe) {
++ /*
++ * RISC-V Hardware Probing Interface. This might be used by
++ * some libraries (e.g. openssl) to probe the hardware
++ * capabilities. Just pretend the syscall doesn't exist, this
++ * will just fallback to less optimized code.
++ */
++ errno = ENOSYS;
++ return -1;
++ }
++#endif
++
+ /*
+ * FIXME: no way to call the libc function due since this is a
+ * variadic argument function and we don't have a vsyscall() variant
--- /dev/null
+da2654b
+fix_riscv64_tests
--- /dev/null
+#!/usr/bin/make -f
+
+export KDIR = $(shell find /usr/lib/modules/ -maxdepth 2 -mindepth 2 -type l -name build | sort | tail -1)
+
+# Disable the test suite if the kernel headers are not available
+ifeq (,$(KDIR))
+ DEB_BUILD_OPTIONS+=nocheck
+endif
+
+ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
+BUILD_UDEB := 1
+endif
+
+KMOD_ENABLE_DOCS=$(if $(filter nodoc,$(DEB_BUILD_PROFILES)),false,true)
+KMOD_ENABLE_TESTS=$(if $(filter nocheck,$(DEB_BUILD_PROFILES)),false,true)
+
+D := $(CURDIR)/debian/kmod
+DK := $(CURDIR)/debian/libkmod2
+DD := $(CURDIR)/debian/libkmod-dev
+DU := $(CURDIR)/debian/kmod-udeb
+DKU := $(CURDIR)/debian/libkmod2-udeb
+TU := $(CURDIR)/debian/tmp-udeb
+
+CONFFLAGS =
+CONFFLAGS_deb = $(CONFFLAGS) \
+ -D build-tests=$(KMOD_ENABLE_TESTS) \
+ -D docs=$(KMOD_ENABLE_DOCS) \
+ -D openssl=enabled \
+ -D dlopen=all \
+ -D zlib=disabled \
+ -D xz=enabled \
+ -D zstd=enabled
+CONFFLAGS_udeb = $(CONFFLAGS) \
+ -D docs=false \
+ -D openssl=disabled \
+ -D zlib=disabled \
+ -D xz=enabled \
+ -D zstd=disabled
+
+##############################################################################
+ifdef BUILD_UDEB
+ BUILD_UDEB_TARGET := build-udeb/.stamp-build
+endif
+
+##############################################################################
+%:
+ dh $@ --buildsystem=meson
+
+execute_before_dh_clean:
+ rm -rf build-*deb $(TU)
+
+# ignore dh_autoreconf until the autoconf-based build system will be removed
+override_dh_autoreconf:
+
+build-deb/build.ninja:
+ $(shell DEB_BUILD_MAINT_OPTIONS="hardening=+bindnow" \
+ dpkg-buildflags --export=configure || true) \
+ dh_auto_configure --builddir=build-deb -- $(CONFFLAGS_deb)
+
+build-udeb/build.ninja:
+ $(subst -O2,-Os -fomit-frame-pointer,$(shell DEB_BUILD_MAINT_OPTIONS="hardening=-all" \
+ dpkg-buildflags --export=configure || true)) \
+ dh_auto_configure --builddir=build-udeb -- $(CONFFLAGS_udeb)
+
+override_dh_auto_configure:
+
+build-deb/.stamp-build: build-deb/build.ninja
+ dh_auto_build --builddir=build-deb
+ touch $@
+
+build-udeb/.stamp-build: build-udeb/build.ninja
+ # ignore the blhc false positives (see CONFFLAGS_udeb)
+ @echo 'blhc: ignore-line-regexp: .* [^ ]*cc .+ -Os -fomit-frame-pointer .+'
+ @echo 'blhc: ignore-line-regexp: *(LD|CC) .+/build-deb/testsuite/.+'
+ dh_auto_build --builddir=build-udeb
+ touch $@
+
+override_dh_auto_build: build-deb/.stamp-build $(BUILD_UDEB_TARGET)
+
+override_dh_auto_test:
+ dh_auto_test --builddir=build-deb
+
+override_dh_auto_install:
+ dh_auto_install --builddir=build-deb
+ifdef BUILD_UDEB
+ cd build-udeb && DESTDIR=$(TU) meson install --tags runtime
+endif
+
+override_dh_install:
+ifneq (,$(filter nodoc, $(DEB_BUILD_OPTIONS)))
+ # create an empty directory which will be installed by dh_install
+ mkdir debian/tmp/usr/share/gtk-doc/
+endif
+ dh_install -Nkmod-udeb -Nlibkmod2-udeb
+ sed -i -re '/^Requires.private:/d' \
+ $(DD)/usr/lib/*/pkgconfig/libkmod.pc
+ifdef BUILD_UDEB
+ dh_install --sourcedir=$(TU) -pkmod-udeb -plibkmod2-udeb
+ egrep -i '^[a-z]' debian/extra/aliases.conf > $(DU)/usr/lib/modprobe.d/aliases.conf
+endif
+
+override_dh_installdocs:
+ dh_installdocs -pkmod -plibkmod-dev --link-doc=libkmod2
+ dh_installdocs -plibkmod2
+ cp libkmod/README $(DD)/usr/share/doc/libkmod2/README.libkmod
+
+override_dh_installchangelogs:
+ dh_installchangelogs NEWS
+
+override_dh_makeshlibs:
+ dh_makeshlibs -V'libkmod2 (>= $(shell perl debian/highest_symbol_version debian/libkmod2.symbols))' -- -c4
+
+override_dh_shlibdeps:
+ dh_shlibdeps -- --warnings=7
+
--- /dev/null
+---
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
--- /dev/null
+3.0 (quilt)
--- /dev/null
+Tests: lsmod
+Restrictions: isolation-container
+Depends: build-essential, libkmod-dev, pkgconf
--- /dev/null
+#!/bin/sh -e
+
+TEST_DIR=$(readlink -f $(dirname $0))
+
+if [ -z "$AUTOPKGTEST_TMP" ]; then
+ AUTOPKGTEST_TMP=$(mktemp -d)
+ trap 'rm -rf $AUTOPKGTEST_TMP' 0
+fi
+cd $AUTOPKGTEST_TMP
+
+if [ "${DEB_HOST_GNU_TYPE:-}" ]; then
+ CC="$DEB_HOST_GNU_TYPE-${CC:-gcc}"
+ PKG_CONFIG="$DEB_HOST_GNU_TYPE-pkg-config"
+else
+ CC="${CC:-gcc}"
+ PKG_CONFIG=pkg-config
+fi
+
+echo '1..2'
+
+$CC -o lsmod $TEST_DIR/lsmod.c \
+ $($PKG_CONFIG --cflags --libs libkmod)
+echo "ok 1 - build"
+
+./lsmod
+echo "ok 2 - run"
+
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
+ */
+
+/*
+ * The file is verbatum copy of upstream lsmod.c, where deviations from upstream
+ * are within UPSTREAM ifdef blocks.
+ */
+
+#include <errno.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef UPSTREAM
+#include <libkmod/libkmod.h>
+
+#include "kmod.h"
+
+static int do_lsmod(int argc, char *argv[])
+#else
+#include <libkmod.h>
+
+int main(int argc, char *argv[])
+#endif
+{
+ struct kmod_ctx *ctx;
+ const char *null_config = NULL;
+ struct kmod_list *list, *itr;
+ int err;
+
+ if (argc != 1) {
+ fprintf(stderr, "Usage: %s\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ ctx = kmod_new(NULL, &null_config);
+ if (ctx == NULL) {
+ fputs("Error: kmod_new() failed!\n", stderr);
+ return EXIT_FAILURE;
+ }
+
+ err = kmod_module_new_from_loaded(ctx, &list);
+ if (err < 0) {
+ fprintf(stderr, "Error: could not get list of modules: %s\n",
+ strerror(-err));
+ kmod_unref(ctx);
+ return EXIT_FAILURE;
+ }
+
+ puts("Module Size Used by");
+
+ kmod_list_foreach(itr, list) {
+ struct kmod_module *mod = kmod_module_get_module(itr);
+ const char *name = kmod_module_get_name(mod);
+ int use_count = kmod_module_get_refcnt(mod);
+ long size = kmod_module_get_size(mod);
+ struct kmod_list *holders, *hitr;
+ int first = 1;
+
+ printf("%-19s %8ld %d", name, size, use_count);
+ holders = kmod_module_get_holders(mod);
+ kmod_list_foreach(hitr, holders) {
+ struct kmod_module *hm = kmod_module_get_module(hitr);
+
+ if (!first) {
+ putchar(',');
+ } else {
+ putchar(' ');
+ first = 0;
+ }
+
+ fputs(kmod_module_get_name(hm), stdout);
+ kmod_module_unref(hm);
+ }
+ putchar('\n');
+ kmod_module_unref_list(holders);
+ kmod_module_unref(mod);
+ }
+ kmod_module_unref_list(list);
+ kmod_unref(ctx);
+
+ return EXIT_SUCCESS;
+}
+
+#ifdef UPSTREAM
+const struct kmod_cmd kmod_cmd_compat_lsmod = {
+ .name = "lsmod",
+ .cmd = do_lsmod,
+ .help = "compat lsmod command",
+};
+
+const struct kmod_cmd kmod_cmd_list = {
+ .name = "list",
+ .cmd = do_lsmod,
+ .help = "list currently loaded modules",
+};
+#endif
--- /dev/null
+Bug-Database: https://github.com/kmod-project/kmod/issues
+Bug-Submit: https://github.com/kmod-project/kmod/issues/new
+Repository: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
+Repository-Browse: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
--- /dev/null
+version=4
+https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-([\d\.]+)\.tar\.xz