2011-12-18 21:28:33 +01:00
|
|
|
#
|
|
|
|
# spec file for package kmod
|
|
|
|
#
|
2023-05-04 13:44:04 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2011-12-18 21:28:33 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-07 20:01:50 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-12-18 21:28:33 +01:00
|
|
|
#
|
2012-03-10 19:27:40 +01:00
|
|
|
|
|
|
|
|
2021-10-28 10:47:47 +02:00
|
|
|
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
|
2021-08-27 10:06:00 +02:00
|
|
|
%define use_zstd 1
|
|
|
|
%endif
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
Name: kmod
|
2012-02-08 03:47:37 +01:00
|
|
|
%define lname libkmod2
|
2022-06-30 18:22:34 +02:00
|
|
|
Version: 30
|
2015-04-21 18:22:25 +02:00
|
|
|
Release: 0
|
2011-12-18 21:28:33 +01:00
|
|
|
Summary: Utilities to load modules into the kernel
|
2021-05-28 00:33:54 +02:00
|
|
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
2011-12-18 21:28:33 +01:00
|
|
|
Group: System/Kernel
|
2019-02-08 02:25:26 +01:00
|
|
|
URL: https://www.kernel.org/pub/linux/utils/kernel/kmod/
|
2012-04-18 13:15:28 +02:00
|
|
|
|
|
|
|
#Git-Web: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary
|
|
|
|
#Git-Clone: git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod
|
2017-07-06 12:22:24 +02:00
|
|
|
Source: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.xz
|
|
|
|
Source2: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.sign
|
2022-03-28 20:21:02 +02:00
|
|
|
Source3: %name.keyring
|
2019-05-01 11:18:19 +02:00
|
|
|
Patch1: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
|
|
|
|
Patch2: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
|
|
|
|
Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
|
|
|
|
Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch
|
|
|
|
Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
|
|
|
|
Patch6: 0012-modprobe-print-unsupported-status.patch
|
2020-11-06 12:44:26 +01:00
|
|
|
Patch7: usr-lib-modprobe.patch
|
2021-01-13 10:00:05 +01:00
|
|
|
Patch8: no-stylesheet-download.patch
|
2022-06-30 20:53:58 +02:00
|
|
|
Patch9: 0001-testsuite-repair-read-of-uninitialized-memory.patch
|
2023-05-31 10:46:22 +02:00
|
|
|
Patch10: testsuite-Move-setup-rootfs-logic-from-Makefile-to-s.patch
|
|
|
|
Patch11: usr-lib-modules.patch
|
2013-09-02 23:39:27 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2021-09-07 00:59:50 +02:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
2019-02-13 00:23:22 +01:00
|
|
|
BuildRequires: libopenssl-devel >= 1.1.0
|
2013-09-02 23:39:27 +02:00
|
|
|
BuildRequires: libtool
|
2021-01-13 10:00:05 +01:00
|
|
|
BuildRequires: libxslt-tools
|
2012-03-03 21:52:30 +01:00
|
|
|
BuildRequires: pkgconfig >= 0.21
|
2012-02-07 01:59:10 +01:00
|
|
|
BuildRequires: xz
|
2016-07-21 11:52:34 +02:00
|
|
|
BuildRequires: pkgconfig(liblzma) >= 4.99
|
2021-08-27 10:06:00 +02:00
|
|
|
%if 0%{?use_zstd}
|
2021-06-07 09:57:02 +02:00
|
|
|
BuildRequires: pkgconfig(libzstd)
|
2021-08-27 10:06:00 +02:00
|
|
|
Provides: kmod-zstd
|
|
|
|
%endif
|
2021-06-07 11:26:21 +02:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2017-08-29 15:42:37 +02:00
|
|
|
Requires(post): coreutils
|
2020-07-07 15:03:45 +02:00
|
|
|
Obsoletes: kmod-compat < %version-%release
|
|
|
|
Provides: kmod-compat = %version-%release
|
2021-12-06 18:01:53 +01:00
|
|
|
# kmod and libkmod have no dependency but we want to provide
|
|
|
|
# same features across kmod provided tools and tools linking to libkmod
|
|
|
|
Conflicts: %lname < %version-%release
|
|
|
|
Conflicts: %lname > %version-%release
|
2020-07-07 15:03:45 +02:00
|
|
|
Requires: suse-module-tools
|
|
|
|
Obsoletes: module-init-tools < 3.16
|
|
|
|
Provides: module-init-tools = 3.16
|
|
|
|
Provides: modutils
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
kmod is a set of tools to handle common tasks with Linux kernel
|
|
|
|
modules like insert, remove, list, check properties, resolve
|
|
|
|
dependencies and aliases.
|
|
|
|
|
|
|
|
These tools are designed on top of libkmod, a library that is shipped
|
|
|
|
with kmod. The aim is to be compatible with tools, configurations and
|
|
|
|
indexes from module-init-tools project.
|
|
|
|
|
2017-07-07 01:44:38 +02:00
|
|
|
%package bash-completion
|
|
|
|
Summary: Bash completion routines for the kmod utilities
|
2021-05-28 00:33:54 +02:00
|
|
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
2017-07-07 01:44:38 +02:00
|
|
|
Group: System/Shells
|
|
|
|
BuildArch: noarch
|
2021-01-31 01:43:05 +01:00
|
|
|
Requires: %{name}
|
|
|
|
Requires: bash-completion
|
|
|
|
Supplements: (%{name} and bash-completion)
|
2017-07-07 01:44:38 +02:00
|
|
|
|
|
|
|
%description bash-completion
|
|
|
|
Contains bash completion support for kmod utilities.
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%package -n %lname
|
|
|
|
Summary: Library to interact with Linux kernel modules
|
2018-03-09 09:52:43 +01:00
|
|
|
License: LGPL-2.1-or-later
|
2011-12-18 21:28:33 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
libkmod was created to allow programs to easily insert, remove and
|
|
|
|
list modules, also checking its properties, dependencies and aliases.
|
|
|
|
|
|
|
|
%package -n libkmod-devel
|
|
|
|
Summary: Development files for libkmod
|
2018-03-09 09:52:43 +01:00
|
|
|
License: LGPL-2.1-or-later
|
2012-02-07 01:59:10 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-02-03 15:31:53 +01:00
|
|
|
Requires: %lname = %version
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%description -n libkmod-devel
|
|
|
|
libkmod was created to allow programs to easily insert, remove and
|
|
|
|
list modules, also checking its properties, dependencies and aliases.
|
|
|
|
|
2012-02-08 03:47:37 +01:00
|
|
|
This package contains the development headers for the library found
|
|
|
|
in %lname.
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%prep
|
2018-12-07 20:15:18 +01:00
|
|
|
%autosetup -p1
|
2023-05-29 11:49:12 +02:00
|
|
|
%if 0%{?suse_version} < 1550
|
2023-05-31 10:46:22 +02:00
|
|
|
%patch11 -p1 -R
|
2023-05-29 11:49:12 +02:00
|
|
|
%endif
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%build
|
2022-06-30 18:22:34 +02:00
|
|
|
GTKDOCIZE=/bin/true autoreconf -fi
|
2016-07-21 11:52:34 +02:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now"
|
2011-12-18 21:28:33 +01:00
|
|
|
# The extra --includedir gives us the possibility to detect dependent
|
2020-07-28 12:20:39 +02:00
|
|
|
# packages which fail to properly use pkgconfig, cf. bugzilla.opensuse.org/795968
|
2012-04-18 13:05:36 +02:00
|
|
|
%configure \
|
2016-07-21 11:52:34 +02:00
|
|
|
--with-xz \
|
|
|
|
--with-zlib \
|
2019-02-13 00:23:22 +01:00
|
|
|
--with-openssl \
|
2021-08-27 10:06:00 +02:00
|
|
|
%if 0%{?use_zstd}
|
2021-06-07 09:57:02 +02:00
|
|
|
--with-zstd \
|
2021-08-27 10:06:00 +02:00
|
|
|
%endif
|
2015-04-21 18:20:20 +02:00
|
|
|
--includedir="%_includedir/kmod" \
|
2012-09-16 03:49:28 +02:00
|
|
|
--with-rootlibdir="%_libdir" \
|
|
|
|
--bindir="%_bindir"
|
2021-05-28 00:33:54 +02:00
|
|
|
%make_build
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%install
|
2016-07-21 13:27:03 +02:00
|
|
|
b="%buildroot"
|
|
|
|
%make_install
|
2012-09-16 03:49:28 +02:00
|
|
|
rm -f "$b/%_libdir"/*.la
|
|
|
|
|
2017-07-07 01:44:38 +02:00
|
|
|
mkdir -p "$b/%_sbindir" "$b/sbin"
|
2012-03-10 19:27:40 +01:00
|
|
|
for i in depmod insmod lsmod modinfo modprobe rmmod; do
|
2016-07-21 13:27:03 +02:00
|
|
|
ln -s "%_bindir/kmod" "$b/%_sbindir/$i"
|
2023-01-04 12:09:43 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2016-07-21 13:27:03 +02:00
|
|
|
ln -s "%_bindir/kmod" "$b/sbin/$i"
|
2020-11-20 11:52:59 +01:00
|
|
|
%endif
|
2016-07-21 13:27:03 +02:00
|
|
|
done
|
|
|
|
mkdir -p "$b/%_bindir" "$b/bin"
|
2012-09-16 03:49:28 +02:00
|
|
|
for i in lsmod; do
|
2016-07-21 13:27:03 +02:00
|
|
|
ln -s "%_bindir/kmod" "$b/%_bindir/$i"
|
2023-01-04 12:09:43 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2016-07-21 13:27:03 +02:00
|
|
|
ln -s "%_bindir/kmod" "$b/bin/$i"
|
2020-11-20 11:52:59 +01:00
|
|
|
%endif
|
2016-07-21 13:27:03 +02:00
|
|
|
done
|
2012-09-16 03:49:28 +02:00
|
|
|
|
2015-04-02 21:02:46 +02:00
|
|
|
%post
|
|
|
|
%{?regenerate_initrd_post}
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
2016-07-21 13:27:03 +02:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
2011-12-18 21:28:33 +01:00
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
2012-09-16 03:49:28 +02:00
|
|
|
%_bindir/kmod
|
2017-07-07 01:44:38 +02:00
|
|
|
%_bindir/lsmod
|
|
|
|
%_sbindir/depmod
|
|
|
|
%_sbindir/insmod
|
|
|
|
%_sbindir/lsmod
|
|
|
|
%_sbindir/modinfo
|
|
|
|
%_sbindir/modprobe
|
|
|
|
%_sbindir/rmmod
|
|
|
|
%_mandir/man[58]/*.[58]*
|
2023-01-04 12:09:43 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2020-07-07 15:03:45 +02:00
|
|
|
/bin/lsmod
|
|
|
|
/sbin/depmod
|
|
|
|
/sbin/insmod
|
|
|
|
/sbin/lsmod
|
|
|
|
/sbin/modinfo
|
|
|
|
/sbin/modprobe
|
|
|
|
/sbin/rmmod
|
2020-11-20 11:52:59 +01:00
|
|
|
%endif
|
2017-07-07 01:44:38 +02:00
|
|
|
|
|
|
|
%files bash-completion
|
2013-09-02 23:39:27 +02:00
|
|
|
%_datadir/bash-completion/
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%files -n %lname
|
2012-03-10 19:27:40 +01:00
|
|
|
%_libdir/libkmod.so.2*
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%files -n libkmod-devel
|
|
|
|
%_includedir/*
|
2012-02-08 03:47:37 +01:00
|
|
|
%_libdir/pkgconfig/libkmod.pc
|
2011-12-18 21:28:33 +01:00
|
|
|
%_libdir/libkmod.so
|
|
|
|
|
|
|
|
%changelog
|