Compare commits

...

32 Commits

Author SHA1 Message Date
f52d918f87 automatic version update by autodist [release 3.2.1-1mamba;Tue May 13 2025] 2025-05-13 09:18:32 +02:00
8d4376633e automatic version update by autodist [release 3.2.0-1mamba;Thu May 08 2025] 2025-05-08 15:47:09 +02:00
802a6c6d43 automatic version update by autodist [release 3.1.8-1mamba;Sat Apr 12 2025] 2025-04-13 11:06:40 +02:00
296841b6e1 automatic version update by autodist [release 3.1.7-1mamba;Thu Apr 03 2025] 2025-04-04 09:48:43 +02:00
cb22cfdf9d automatic version update by autodist [release 3.1.6-1mamba;Tue Mar 11 2025] 2025-03-11 18:13:04 +01:00
e230f4d2a5 automatic version update by autodist [release 3.1.5-1mamba;Sun Feb 02 2025] 2025-02-03 10:11:37 +01:00
2b0d0fa2ea automatic version update by autodist [release 3.1.4-1mamba;Mon Dec 23 2024] 2024-12-23 09:06:42 +01:00
223355e91a automatic version update by autodist [release 3.1.3-1mamba;Tue Dec 03 2024] 2024-12-08 12:07:05 +01:00
38423317f1 automatic version update by autodist [release 3.1.2-1mamba;Tue Nov 26 2024] 2024-11-27 00:58:52 +01:00
0212d38c37 automatic version update by autodist [release 3.1.1-1mamba;Tue Oct 22 2024] 2024-10-23 11:04:30 +02:00
47d55cd392 automatic version update by autodist [release 3.1.0-1mamba;Sat Oct 05 2024] 2024-10-05 10:48:58 +02:00
fd85d71196 automatic version update by autodist [release 3.0.13-1mamba;Fri Mar 08 2024] 2024-03-09 11:43:21 +01:00
fc61af1eb4 automatic version update by autodist [release 3.0.12-1mamba;Mon Oct 02 2023] 2024-01-05 21:49:49 +01:00
8166f7916b automatic version update by autodist [release 3.0.11-1mamba;Fri Apr 28 2023] 2024-01-05 21:49:49 +01:00
f4125dfa1d automatic version update by autodist [release 3.0.10-1mamba;Wed Jan 04 2023] 2024-01-05 21:49:48 +01:00
16c384e363 automatic version update by autodist [release 3.0.9-1mamba;Wed Dec 07 2022] 2024-01-05 21:49:48 +01:00
2dd1bf2ba7 automatic version update by autodist [release 3.0.8-1mamba;Sun Oct 30 2022] 2024-01-05 21:49:48 +01:00
26ef2c2c29 automatic version update by autodist [release 3.0.7-1mamba;Thu Sep 29 2022] 2024-01-05 21:49:48 +01:00
0c781b3c42 automatic version update by autodist [release 3.0.6-1mamba;Sun Jul 17 2022] 2024-01-05 21:49:48 +01:00
4bb326c814 automatic version update by autodist [release 3.0.5-1mamba;Thu Jun 30 2022] 2024-01-05 21:49:48 +01:00
88685065e6 automatic version update by autodist [release 3.0.4-1mamba;Wed Jun 22 2022] 2024-01-05 21:49:48 +01:00
dd66ef62ba automatic version update by autodist [release 3.0.3-1mamba;Fri Dec 17 2021] 2024-01-05 21:49:48 +01:00
cc8016903e automatic version update by autodist [release 2.8.7-1mamba;Sun Oct 03 2021] 2024-01-05 21:49:48 +01:00
553afe8dff update to 2.8.6 [release 2.8.6-1mamba;Sun Sep 12 2021] 2024-01-05 21:49:48 +01:00
b3f19eef0a automatic version update by autodist [release 2.8.5-1mamba;Wed Aug 25 2021] 2024-01-05 21:49:47 +01:00
c3b044f955 automatic version update by autodist [release 2.8.4-1mamba;Fri Dec 18 2020] 2024-01-05 21:49:47 +01:00
71a14e4661 patched to automatically fix dkms.conf containing SUBDIRS by replacing with M as required since kernel 5.4 [release 2.8.3-2mamba;Fri Jul 24 2020] 2024-01-05 21:49:47 +01:00
0b68c7dc41 automatic version update by autodist [release 2.8.3-1mamba;Fri Jul 17 2020] 2024-01-05 21:49:47 +01:00
4e3e384172 automatic version update by autodist [release 2.8.1-1mamba;Sat Nov 02 2019] 2024-01-05 21:49:47 +01:00
db037fd0f1 automatic version update by autodist [release 2.7.1-1mamba;Wed Jun 12 2019] 2024-01-05 21:49:47 +01:00
7ff13c8911 clean broken links in /var/lib/dkms in posttrans [release 2.5-2mamba;Sat Jan 13 2018] 2024-01-05 21:49:47 +01:00
11a24034b3 automatic version update by autodist [release 2.5-1mamba;Sun Dec 24 2017] 2024-01-05 21:49:47 +01:00
4 changed files with 116 additions and 127 deletions

View File

@ -1,19 +0,0 @@
--- dkms-2.4.0/dkms.orig 2017-06-18 16:14:10.760200880 +0200
+++ dkms-2.4.0/dkms 2017-06-18 16:17:02.255901350 +0200
@@ -515,7 +515,7 @@
[[ $3 ]] && read_conf_file="$3"
[[ -r $read_conf_file ]] || die 4 $"Could not locate dkms.conf file." \
- $"File: $conf does not exist."
+ $"File: $read_conf_file does not exist."
[[ $last_mvka = $module/$module_version/$1/$2 && \
$last_mvka_conf = $(readlink -f $read_conf_file) ]] && return
@@ -1558,6 +1558,7 @@
is_module_added() {
[[ $1 && $2 ]] || return 1
[[ -d $dkms_tree/$1/$2 ]] || return 2
+ [[ -d $dkms_tree/$1/$2/source/ ]] || return 2
[[ -L $dkms_tree/$1/$2/source || -d $dkms_tree/$1/$2/source ]];
}

View File

@ -1,11 +0,0 @@
[Unit]
Description=Dynamic Kernel Modules System
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/scripts/dkms start
ExecStop=/usr/lib/systemd/scripts/dkms stop
[Install]
WantedBy=multi-user.target

152
dkms.spec
View File

@ -1,40 +1,31 @@
Name: dkms
Version: 2.4.0
Release: 2mamba
Version: 3.2.1
Release: 1mamba
Summary: Dynamic Kernel Module Support
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Ercole 'ercolinux' Carpanetto <ercole69@gmail.com>
URL: http://linux.dell.com/projects.shtml#dkms
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/dell/dkms
Source: https://github.com/dell/dkms.git/v%{version}/dkms-%{version}.tar.bz2
Source1: dkms.service
Source2: dkms.systemd
Patch0: dkms-2.4.0-dont_fail_if_module_source_removed.patch
License: GPL
BuildArch: noarch
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires: kernelheaders
Requires: gcc
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
DKMS stands for Dynamic Kernel Module Support. It is designed to create a framework where kernel dependent module source can reside so that it is very easy to rebuild modules as you upgrade kernels. This will allow Linux vendors to provide driver drops without having to wait for new kernel releases while also taking out the guesswork for customers attempting to recompile modules for new kernels.
%prep
%setup -q
%patch0 -p1
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
make install-redhat-systemd DESTDIR=%{buildroot} SYSTEMD=%{buildroot}%{_unitdir}
#install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/dkms.service
#install -D -m0755 %{SOURCE2} %{buildroot}%{_prefix}/lib/systemd/scripts/dkms
#rm -f %{buildroot}%{_initrddir}/dkms_autoinstaller
make install-redhat SBIN=%{_bindir} DESTDIR=%{buildroot}
install -d %{buildroot}%{_presetdir}
cat > %{buildroot}%{_presetdir}/50-dkms.preset << _EOF
@ -62,37 +53,126 @@ fi
:
%posttrans
# clean old sysv broken links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
# clean old badly uninstalled modules
find /var/lib/dkms/*/*/source -xtype l | while read line; do ls -ld ${line/source}; done
find /var/lib/dkms -xtype l -exec rm -f {} \;
:
%files
%defattr(-,root,root)
%{_sysconfdir}/dkms/template-dkms-mkrpm.spec
%{_sysconfdir}/dkms/template-dkms-redhat-kmod.spec
%{_sysconfdir}/bash_completion.d/dkms
%dir %{_sysconfdir}/dkms
%{_sysconfdir}/dkms/framework.conf
%{_sysconfdir}/kernel/postinst.d/dkms
%{_sysconfdir}/kernel/prerm.d/dkms
%{_sbindir}/dkms
%dir %{_prefix}/lib/dkms
%{_prefix}/lib/dkms/common.postinst
%{_prefix}/lib/dkms/dkms_autoinstaller
%{_prefix}/lib/dkms/find-provides
%{_prefix}/lib/dkms/lsb_release
%{_prefix}/lib/dkms/mkkerneldoth
%dir %{_localstatedir}/lib/dkms
%{_localstatedir}/lib/dkms/dkms_dbversion
%{_bindir}/dkms
%{_presetdir}/50-dkms.preset
%{_unitdir}/dkms.service
#%{_prefix}/lib/systemd/scripts/dkms
%dir %{_prefix}/lib/dkms
%{_prefix}/lib/dkms/common.postinst
%{_prefix}/lib/kernel/install.d/40-dkms.install
%dir %{_localstatedir}/lib/dkms
%{_datadir}/bash-completion/completions/dkms
%{_datadir}/zsh/site-functions/_dkms
%{_mandir}/man8/dkms.8*
%doc AUTHORS COPYING
#README.dkms TODO
%doc COPYING
%changelog
* Tue May 13 2025 Automatic Build System <autodist@openmamba.org> 3.2.1-1mamba
- automatic version update by autodist
* Thu May 08 2025 Automatic Build System <autodist@openmamba.org> 3.2.0-1mamba
- automatic version update by autodist
* Sat Apr 12 2025 Automatic Build System <autodist@openmamba.org> 3.1.8-1mamba
- automatic version update by autodist
* Thu Apr 03 2025 Automatic Build System <autodist@openmamba.org> 3.1.7-1mamba
- automatic version update by autodist
* Tue Mar 11 2025 Automatic Build System <autodist@openmamba.org> 3.1.6-1mamba
- automatic version update by autodist
* Sun Feb 02 2025 Automatic Build System <autodist@openmamba.org> 3.1.5-1mamba
- automatic version update by autodist
* Mon Dec 23 2024 Automatic Build System <autodist@openmamba.org> 3.1.4-1mamba
- automatic version update by autodist
* Tue Dec 03 2024 Automatic Build System <autodist@openmamba.org> 3.1.3-1mamba
- automatic version update by autodist
* Tue Nov 26 2024 Automatic Build System <autodist@openmamba.org> 3.1.2-1mamba
- automatic version update by autodist
* Tue Oct 22 2024 Automatic Build System <autodist@openmamba.org> 3.1.1-1mamba
- automatic version update by autodist
* Sat Oct 05 2024 Automatic Build System <autodist@openmamba.org> 3.1.0-1mamba
- automatic version update by autodist
* Fri Mar 08 2024 Automatic Build System <autodist@openmamba.org> 3.0.13-1mamba
- automatic version update by autodist
* Mon Oct 02 2023 Automatic Build System <autodist@mambasoft.it> 3.0.12-1mamba
- automatic version update by autodist
* Fri Apr 28 2023 Automatic Build System <autodist@mambasoft.it> 3.0.11-1mamba
- automatic version update by autodist
* Wed Jan 04 2023 Automatic Build System <autodist@mambasoft.it> 3.0.10-1mamba
- automatic version update by autodist
* Wed Dec 07 2022 Automatic Build System <autodist@mambasoft.it> 3.0.9-1mamba
- automatic version update by autodist
* Sun Oct 30 2022 Automatic Build System <autodist@mambasoft.it> 3.0.8-1mamba
- automatic version update by autodist
* Thu Sep 29 2022 Automatic Build System <autodist@mambasoft.it> 3.0.7-1mamba
- automatic version update by autodist
* Sun Jul 17 2022 Automatic Build System <autodist@mambasoft.it> 3.0.6-1mamba
- automatic version update by autodist
* Thu Jun 30 2022 Automatic Build System <autodist@mambasoft.it> 3.0.5-1mamba
- automatic version update by autodist
* Wed Jun 22 2022 Automatic Build System <autodist@mambasoft.it> 3.0.4-1mamba
- automatic version update by autodist
* Fri Dec 17 2021 Automatic Build System <autodist@mambasoft.it> 3.0.3-1mamba
- automatic version update by autodist
* Wed Dec 01 2021 Automatic Build System <autodist@mambasoft.it> 3.0.2-1mamba
- automatic version update by autodist
* Sun Oct 03 2021 Automatic Build System <autodist@mambasoft.it> 2.8.7-1mamba
- automatic version update by autodist
* Sun Sep 12 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.6-1mamba
- update to 2.8.6
* Wed Aug 25 2021 Automatic Build System <autodist@mambasoft.it> 2.8.5-1mamba
- automatic version update by autodist
* Fri Dec 18 2020 Automatic Build System <autodist@mambasoft.it> 2.8.4-1mamba
- automatic version update by autodist
* Fri Jul 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.3-2mamba
- patched to automatically fix dkms.conf containing SUBDIRS by replacing with M as required since kernel 5.4
* Fri Jul 17 2020 Automatic Build System <autodist@mambasoft.it> 2.8.3-1mamba
- automatic version update by autodist
* Sat Nov 02 2019 Automatic Build System <autodist@mambasoft.it> 2.8.1-1mamba
- automatic version update by autodist
* Wed Jun 12 2019 Automatic Build System <autodist@mambasoft.it> 2.7.1-1mamba
- automatic version update by autodist
* Sat Jan 13 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5-2mamba
- clean broken links in /var/lib/dkms in posttrans
* Sun Dec 24 2017 Automatic Build System <autodist@mambasoft.it> 2.5-1mamba
- automatic version update by autodist
* Sun Jun 18 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.0-2mamba
- reapply patch to skip modules with sources removed and cleanup old broken modules in posttrans
@ -120,7 +200,7 @@ find /var/lib/dkms/*/*/source -xtype l | while read line; do ls -ld ${line/sourc
* Fri Oct 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.0.2-1mamba
- update to 2.2.0.2
* Fri Apr 04 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 2.0.21.1-2mamba
* Sat Apr 04 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 2.0.21.1-2mamba
- modified Group and Packager
* Wed Apr 01 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 2.0.21.1-1mamba

View File

@ -1,61 +0,0 @@
#!/bin/bash
. /etc/default/dkms
# list dkms modules for the current running kernel
list_dkms_modules() {
shopt -s nullglob
declare -a DKMS_MOULES
# dkms status needs uname -r to list correctly intalled version for current kernel
local modules_path=($(dkms status -k "$(uname -r)"|sed -rn 's#(.*), (.*), (.*), (.*): installed#\1/\2/\3/\4#p'))
for p in "${modules_path[@]}"; do
for m in /var/lib/dkms/"$p"/module/*.ko{,gz}; do
m=${m##*/}
m=${m%.gz}
m=${m%.ko}
DKMS_MODULES+=("$m")
done
done
}
# load installed kernel modules for the current kernel version
load_dkms_modules() {
local ret=0
list_dkms_modules
for m in "${DKMS_MODULES[@]}"; do
modprobe "$m"
ret+=$?
done
return $ret
}
# unload installed kernel modules for the current kernel version
unload_dkms_modules() {
list_dkms_modules
# ask for removal
for m in "${DKMS_MODULES[@]}"; do
modprobe --remove --quiet "$m"
done
# check modules are unloaded
# sometimes modprobe -r fail but modules are removed
for m in "${DKMS_MODULES[@]}"; do
[[ -e /sys/modules/$m ]] && return 1
done
return 0
}
case "$1" in
start)
dkms autoinstall -k "$(uname -r)"
[[ $LOAD =~ [Yy][Ee][Ss] ]] && load_dkms_modules
;;
stop)
[[ $UNLOAD =~ [Yy][Ee][Ss] ]] && unload_dkms_modules
;;
*)
echo "usage: $0 {start|stop}" >&2
;;
esac
:
# vim:set ts=2 sw=2 ft=sh et: