Compare commits
32 Commits
2.4.0-2mam
...
main
Author | SHA1 | Date | |
---|---|---|---|
f52d918f87 | |||
8d4376633e | |||
802a6c6d43 | |||
296841b6e1 | |||
cb22cfdf9d | |||
e230f4d2a5 | |||
2b0d0fa2ea | |||
223355e91a | |||
38423317f1 | |||
0212d38c37 | |||
47d55cd392 | |||
fd85d71196 | |||
fc61af1eb4 | |||
8166f7916b | |||
f4125dfa1d | |||
16c384e363 | |||
2dd1bf2ba7 | |||
26ef2c2c29 | |||
0c781b3c42 | |||
4bb326c814 | |||
88685065e6 | |||
dd66ef62ba | |||
cc8016903e | |||
553afe8dff | |||
b3f19eef0a | |||
c3b044f955 | |||
71a14e4661 | |||
0b68c7dc41 | |||
4e3e384172 | |||
db037fd0f1 | |||
7ff13c8911 | |||
11a24034b3 |
@ -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 ]];
|
||||
}
|
||||
|
11
dkms.service
11
dkms.service
@ -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
152
dkms.spec
@ -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
|
||||
|
61
dkms.systemd
61
dkms.systemd
@ -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:
|
Loading…
x
Reference in New Issue
Block a user