%global __requires_exclude /bin/awk Summary: Dynamic Kernel Module Support Framework Name: dkms Version: 2.0.19 URL: http://linux.dell.com/dkms Release: %mkrel 40 License: GPL Group: System/Base BuildArch: noarch Requires: kernel-devel Recommends: kernel-devel-latest Requires: %{name}-minimal = %{version}-%{release} Requires(pre): rpm-helper Requires(post): rpm-helper >= %{rpmhelper_required_version} Requires(preun): rpm-helper >= %{rpmhelper_required_version} Requires: patch Source: http://linux.dell.com/dkms/%{name}-%{version}.tar.gz Source1: template-dkms-mkrpm.spec Source2: dkms.depmod.conf Source3: autoload.awk Patch1: dkms-2.0.19-norpm.patch Patch2: dkms-2.0.19-mgaify.patch Patch3: dkms-fix-kernel-make-prepare.patch Patch4: dkms-2.0.17.6-compressed-module.patch Patch5: dkms-2.0.19-weak_module_name.patch Patch7: dkms-2.0.19-procconfig.patch Patch8: dkms-2.0.19-mdkrpm-split-ver-rel.patch Patch9: dkms-2.0.19-bash-completion-update.patch Patch10: dkms-2.0.19-binary_only.patch Patch11: dkms-2.0.17.5-min-max-kernel.patch Patch12: dkms-2.0.17.6-test-dkms.conf-existence.patch Patch13: dkms-2.0.17.6-status_default.patch Patch14: dkms-2.0.17.6-stdout.patch Patch15: dkms-2.0.19-no_custom_rpm_provides.patch Patch16: dkms-2.0.19-binary.patch Patch17: dkms-2.0.19-autoalias.patch Patch18: dkms-2.0.19-mkrpm_status.patch Patch19: dkms-2.0.19-skip-unused-check.patch Patch20: dkms-2.0.19-uninstall-speedup.patch Patch21: dkms-2.0.19-init-mdv-interactive.patch Patch22: dkms-symvers.patch Patch23: dkms-2.0.19-autoload_instead_of_udevadm.patch Patch24: dkms-2.0.19-suggest-devel-not-source.patch Patch25: dkms-2.0.19-xz-support.patch # (doktor5000) remove explicit usage of " > /dev/stdout" as standard output # this breaks systemd logging and is unnecessary for standard output Patch26: dkms-2.0.19-mga-remove_dev_stdout_output_loc.patch Patch27: dkms-2.0.19-parallel-build.patch Patch28: dkms-no-autoload-during-install.patch Patch29: dkms-display-bootsplash-message.patch %define _dkmsdir %{_localstatedir}/lib/%{name} %define _dkmsbinarydir %{_localstatedir}/lib/%{name}-binary %description This package contains the framework for the Dynamic Kernel Module Support (DKMS) method for installing module RPMS as originally developed by the Dell Computer Corporation. This package is intended for building binary kernel modules with dkms source packages installed %package minimal Summary: Dynamic Kernel Module Support Framework - minimal package License: GPL Group: System/Base Requires: lsb-release Requires(preun): rpm-helper Requires(post): rpm-helper %description minimal This package contains the framework for the Dynamic Kernel Module Support (DKMS) method for installing module RPMS as originally developed by the Dell Computer Corporation. This package is intended for installing binary module RPMS as created by dkms. %prep %setup -q %patch1 -p1 -b .norpm %patch2 -p1 -b .mdkize %patch3 -p1 -b .fix-kernel-make-prepare %patch4 -p1 -b .compressed-module %patch5 -p1 -b .weak_module_name %patch7 -p1 -b .procconfig %patch8 -p1 -b .mdkrpm-split-ver-rel %patch9 -p1 -b .bash-completion-update %patch10 -p1 -b .binary_only %patch11 -p1 -b .min-max-kernel %patch12 -p1 -b .test-dkmsconf %patch13 -p1 -b .status_default %patch14 -p1 -b .stdout %patch15 -p1 -b .no_custom_rpm_provides %patch16 -p1 -b .binary %patch17 -p0 -b .autoalias %patch18 -p1 -b .mkrpm %patch19 -p1 -b .versionsanity %patch20 -p1 -b .uninst-speedup %patch21 -p1 -b .mdv-interactive %patch22 -p1 -b .symvers %patch23 -p1 -b .autoload_instead_of_udevadm %patch24 -p1 -b .suggest-devel %patch25 -p1 -b .xz-support %patch26 -p1 -b .dev_stdout_output_loc %patch27 -p1 -b .parallel-build %patch28 -p1 -b .no-autoload-during-install %patch29 -p1 -b .display-bootsplash-message sed -i -e 's,/var/%{name},%{_dkmsdir},g;s,init.d/dkms_autoinstaller,init.d/%{name},g' \ dkms_autoinstaller \ dkms_framework.conf \ kernel_*.d_dkms \ %{name}.8 \ dkms %install mkdir -p %{buildroot}%{_mandir}/man8 %makeinstall_std INITD=%{buildroot}%{_initrddir} install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/ install -m 755 dkms_mkkerneldoth %{buildroot}/%{_sbindir}/dkms_mkkerneldoth install -m 755 %{SOURCE3} %{buildroot}/%{_sbindir}/dkms_autoload mv %{buildroot}%{_initrddir}/dkms_autoinstaller %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_dkmsbinarydir} mkdir -p %{buildroot}%{_sysconfdir}/depmod.d install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/depmod.d/%{name}.conf # (doktor5000) systemd service file to run dkms_autoinstaller on every boot # necessary to rebuild dkms modules for kernels booting the first time mkdir -p %{buildroot}%{_unitdir} cat << 'EOF' > %{buildroot}%{_unitdir}/%{name}-autorebuild.service [Unit] Description=run dkms_autoinstaller on every boot to rebuild dkms modules for newly booted kernels DefaultDependencies=no Conflicts=shutdown.target Before=basic.target shutdown.target After=local-fs.target [Service] ExecStart=%{_sbindir}/dkms-autorebuild.sh Type=oneshot RemainAfterExit=yes [Install] Alias=dkms_autoinstaller.service WantedBy=basic.target EOF # (doktor5000) split out from /etc/init.d/mandrake_everytime / mandriva-everytime.service # triggered by above systemd service on every boot (mga# cat << 'EOF' > %{buildroot}%{_sbindir}/%{name}-autorebuild.sh #!/bin/sh # start dkms module build for newly booted kernels via %{name}-autorebuild.service # rebuild can be disabled by setting DKMS_ONBOOT=no in /etc/sysconfig/system [ -r /etc/sysconfig/system ] && . /etc/sysconfig/system DKMS_TOOL=%{_sbindir}/dkms_autoinstaller if [ "$DKMS_ONBOOT" != "no" ] && [ -x $DKMS_TOOL ]; then # dkms_autoinstaller evaluates $verbose so enable it here for complete logging verbose=yes $DKMS_TOOL start fi EOF chmod 755 %{buildroot}%{_sbindir}/%{name}-autorebuild.sh %define _dkms_autorebuild_installed %{_localstatedir}/lib/rpm-state/dkms-autorebuild-installed %pre if [ $1 -eq 2 ] ; then if [ -f %{_unitdir}/%{name}-autorebuild.service ] ; then touch %{_dkms_autorebuild_installed} fi fi %post if [ -f %{_dkms_autorebuild_installed} ] ; then # We are upgrading from a version that included the dkms-autorebuild # service. rm %{_dkms_autorebuild_installed} else # We are either installing or upgrading from a version that didn't # include the dkms-autorebuild service. Force it to be installed. set -- 1 fi %_post_service %{name}-autorebuild %preun %_preun_service %{name}-autorebuild %triggerpostun -- dkms < 2.0.19-11 rm -f /etc/rc.d/*/{K,S}??dkms %files %doc %attr (-,root,root) sample.spec sample.conf AUTHORS COPYING template-dkms-mkrpm.spec %{_sbindir}/dkms_autoinstaller %{_unitdir}/%{name}-autorebuild.service %{_sbindir}/%{name}-autorebuild.sh %files minimal %{_sbindir}/dkms %{_dkmsdir} %dir %{_dkmsbinarydir} %{_sbindir}/dkms_mkkerneldoth %{_sbindir}/dkms_autoload %{_mandir}/man8/dkms.8* %config(noreplace) %{_sysconfdir}/dkms # these dirs are for plugins - owned by other packages %{_sysconfdir}/kernel/postinst.d/%{name} %{_sysconfdir}/kernel/prerm.d/%{name} %{_sysconfdir}/bash_completion.d/%{name} %{_sysconfdir}/depmod.d/%{name}.conf %changelog * Sat Jun 08 2019 tmb <tmb> 2.0.19-40.mga7 + Revision: 1399702 - rollback to Mageia 6 dkms for Mga7 release - rebase P15 - drop min/max kernel version support (never used) - rebase P10 - drop obsolete P5 - rebase P1, drop obsolete stuff - add proper Mageia detection to new codepaths. (we now ignore the obsolete prepare_kernel() and dkms_mkkerneldoth) - drop the now obsolete: P2, P7, P8, P21, P24 - switch back to udevadm (and drop P23 and S3) - drop P12 (dkms.conf existence check), similar code merged upstream - drop P14, P26 (obsolete) - drop P13 (obsolete) - drop P2, similar code merged upstream - rebase and move P3 to P101 (kernel prepare target) - use autopatch - drop P25 (gzip support), alternative code merged upstream - drop P25 (xz support), alternative code merged upstream - drop P27 (parallel build), merged upstream - update url - update to 2.6.1 + umeabot <umeabot> - Mageia 7 Mass Rebuild - Mageia 7 Mass Rebuild * Sat May 13 2017 martinw <martinw> 2.0.19-39.mga6 + Revision: 1100846 - ensure dkms-autorebuild service is enabled when first installed (mga#20796) - display bootsplash message when building/installing modules during boot o this can take some time, so let the user know it's happening * Sat May 06 2017 martinw <martinw> 2.0.19-38.mga6 + Revision: 1099399 - don't autoload modules when performing an install or upgrade o the installer doesn't like having its framebuffer device changed underneath it (mga#20368) * Wed Jun 15 2016 tmb <tmb> 2.0.19-37.mga6 + Revision: 1021517 - enable parallel build support when building drivers + umeabot <umeabot> - Mageia 6 Mass Rebuild * Tue Nov 24 2015 doktor5000 <doktor5000> 2.0.19-35.mga6 + Revision: 905765 - split out dkms_autoinstaller from /etc/init.d/mandrake_everytime (mga#17194) o split into %%{_sbindir}/%%{name}-autorebuild.sh o added systemd service to trigger autorebuild script on every boot o added versionned Requires on rpm-helper per policy o added short explanation about DKMS_ONBOOT=no in /etc/sysconfig/system o enabled undocumented verbose call of %%{_sbindir}/dkms_autoinstaller - added dkms-2.0.19-mga-remove_dev_stdout_output_loc.patch to remove explicit usage of " > /dev/stdout" as stdout in %%{_sbindir}/dkms_autoinstaller o breaks systemd logging and unnecessary for output to stdout * Wed Oct 15 2014 umeabot <umeabot> 2.0.19-34.mga5 + Revision: 749517 - Second Mageia 5 Mass Rebuild * Fri Sep 19 2014 tv <tv> 2.0.19-33.mga5 + Revision: 697380 - filter /bin/awk requires * Tue Sep 16 2014 umeabot <umeabot> 2.0.19-32.mga5 + Revision: 678762 - Mageia 5 Mass Rebuild + tv <tv> - s/uggests:/Recommends:/ * Fri Oct 18 2013 umeabot <umeabot> 2.0.19-31.mga4 + Revision: 503893 - Mageia 4 Mass Rebuild * Fri Jan 11 2013 umeabot <umeabot> 2.0.19-30.mga3 + Revision: 348832 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Mar 16 2012 anssi <anssi> 2.0.19-29.mga2 + Revision: 223658 - fix udevadm output ordering assumptions in dkms_autoload (was causing at least nouveau inadvertently being loaded after nvidia-current build on one system) * Thu Mar 01 2012 tmb <tmb> 2.0.19-28.mga2 + Revision: 216457 - fix xz call to force overwrite of output file and (de)compress links (like gzip) * Thu Mar 01 2012 tmb <tmb> 2.0.19-27.mga2 + Revision: 216453 - add xz support (P25) * Sun Dec 25 2011 tmb <tmb> 2.0.19-26.mga2 + Revision: 187518 - fix kernel flavours to match what we actually ship - drop buildroot and defattr - make sure we always warn about missing -devel files, not source * Sun Nov 27 2011 pterjan <pterjan> 2.0.19-25.mga2 + Revision: 172472 - Do not create Module.symvers in / when a module has no built_module_location (#3418) * Tue May 10 2011 tmb <tmb> 2.0.19-24.mga1 + Revision: 97079 - make error message point out missing kernel-devel files, not kernel-source * Sun Apr 17 2011 anssi <anssi> 2.0.19-23.mga1 + Revision: 87221 - use display_driver_helper for loading display modules * Sat Jan 22 2011 ahmad <ahmad> 2.0.19-22.mga1 + Revision: 33288 - regenerate patch2 - remove wrongly inserted line (thanks, Anssi) - adapt the package to Mageia - imported package dkms