Add default config file, /etc/depmod.d/dist.conf

External modules packaging depends on the search order provided by
RHEL default config which is missing now from CentOS Stream.

Add and install the file.

Signed-off-by: Yauheni Kaliuta <ykaliuta@fedoraproject.org>
This commit is contained in:
Yauheni Kaliuta 2021-08-10 13:04:55 +03:00
parent 6aa03ba354
commit 35bc85d1e4

View File

@ -4,8 +4,10 @@
# turn it on there by default.
%if 0%{?rhel}
%bcond_without weak_modules
%bcond_without dist_conf
%else
%bcond_with weak_modules
%bcond_with dist_conf
%endif
@ -18,6 +20,7 @@ License: GPLv2+
URL: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
Source1: weak-modules
Source2: depmod.conf.dist
Exclusiveos: Linux
BuildRequires: gcc
@ -92,6 +95,10 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules
%endif
%if %{with dist_conf}
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
%endif
%files
%dir %{_sysconfdir}/depmod.d
%dir %{_sysconfdir}/modprobe.d
@ -107,6 +114,9 @@ install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules
%{_sbindir}/weak-modules
%endif
%{_datadir}/bash-completion/
%if %{with dist_conf}
%{_sysconfdir}/depmod.d/dist.conf
%endif
%attr(0644,root,root) %{_mandir}/man5/*.5*
%attr(0644,root,root) %{_mandir}/man8/*.8*
%doc NEWS README TODO