|
@@ -1,39 +1,59 @@
|
|
-Summary: Dynamic Kernel Module Support Framework
|
|
|
|
-Summary(ja): DKMS (ダイナミックカーネルモジュールサポート) フレームワーク
|
|
|
|
-Name: dkms
|
|
|
|
-Version: 2.0.21.1
|
|
|
|
-Release: 9%{?_dist_release}
|
|
|
|
-License: GPLv2+
|
|
|
|
-Group: System Environment/Base
|
|
|
|
-URL: http://linux.dell.com/dkms
|
|
|
|
-Source0: http://linux.dell.com/dkms/permalink/dkms-%{version}.tar.gz
|
|
|
|
-
|
|
|
|
-Patch100: dkms-2.0.21.1-mkrpm-vine.patch
|
|
|
|
-Patch101: dkms-2.0.21.1-mkkmp-vine.patch
|
|
|
|
-Patch102: dkms-2.0.21.1-autoinstaller-vine.patch
|
|
|
|
-Patch103: dkms-2.0.21.1-prerm-vine.patch
|
|
|
|
-Patch104: dkms-2.0.21.1-fix-autoinstaller-message.patch
|
|
|
|
-
|
|
|
|
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
-BuildArch: noarch
|
|
|
|
-
|
|
|
|
-Provides: dkms-minimal = %{version}
|
|
|
|
-
|
|
|
|
-Requires: sed gawk findutils tar cpio gzip grep mktemp
|
|
|
|
-Requires: coreutils
|
|
|
|
-Requires: bash > 1.99
|
|
|
|
-Requires: kernel-devel
|
|
|
|
-Requires: build-essential
|
|
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
|
|
+Summary: Dynamic Kernel Module Support Framework
|
|
|
|
+Summary(ja): DKMS (ダイナミックカーネルモジュールサポート) フレームワーク
|
|
|
|
+Name: dkms
|
|
|
|
+Version: 2.8.1
|
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
|
+Group: System Environment/Base
|
|
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+Packager: shaolin, daisuke
|
|
|
|
+
|
|
|
|
+License: GPLv2+
|
|
|
|
+URL: https://github.com/dell/dkms/
|
|
|
|
+Source0: https://github.com/dell/dkms/archive/v%{version}.tar.gz#/dkms-%{version}.tar.gz
|
|
|
|
+
|
|
|
|
+# git HEAD at 2020-05-01
|
|
|
|
+Patch0: dkms-2.8.1-20200501.patch
|
|
|
|
+Patch100: dkms-2.8.1-mkrpm-vine.patch
|
|
|
|
+Patch101: dkms-2.8.1-mkkmp-vine.patch
|
|
|
|
+Patch102: dkms-2.8.1-autoinstaller-vine.patch
|
|
|
|
+Patch103: dkms-2.8.1-prerm-vine.patch
|
|
|
|
+
|
|
|
|
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
+BuildArch: noarch
|
|
|
|
+
|
|
|
|
+Provides: dkms-minimal = %{version}
|
|
|
|
+
|
|
|
|
+Requires: bash
|
|
|
|
+Requires: build-essential
|
|
|
|
+Requires: coreutils
|
|
|
|
+Requires: cpio
|
|
|
|
+Requires: elfutils-libelf-devel
|
|
|
|
+Requires: file
|
|
|
|
+Requires: findutils
|
|
|
|
+Requires: gawk
|
|
|
|
+Requires: gcc
|
|
|
|
+Requires: grep
|
|
|
|
+Requires: gzip
|
|
|
|
+Requires: kernel-devel
|
|
|
|
+Requires: sed
|
|
|
|
+Requires: tar
|
|
|
|
+Requires: which
|
|
%if "%{?_dist_release}" >= "vl7"
|
|
%if "%{?_dist_release}" >= "vl7"
|
|
-Requires: kmod
|
|
|
|
|
|
+Requires: kmod
|
|
%else
|
|
%else
|
|
-Requires: module-init-tools
|
|
|
|
|
|
+Requires: module-init-tools
|
|
|
|
+%endif
|
|
|
|
+%if %{with systemd}
|
|
|
|
+BuildRequires: systemd
|
|
|
|
+%{?systemd_requires}
|
|
|
|
+%else
|
|
|
|
+Requires(post): chkconfig
|
|
|
|
+Requires(preun): chkconfig
|
|
|
|
+Requires(postun): chkconfig
|
|
%endif
|
|
%endif
|
|
-
|
|
|
|
-Vendor: Project Vine
|
|
|
|
-Distribution: Vine Linux
|
|
|
|
-Packager: shaolin, daisuke
|
|
|
|
-
|
|
|
|
|
|
|
|
%description
|
|
%description
|
|
This package contains the framework for the Dynamic
|
|
This package contains the framework for the Dynamic
|
|
@@ -49,106 +69,91 @@ module RPMS as originally developed by Dell.
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q
|
|
%setup -q
|
|
|
|
+%patch0 -p1
|
|
|
|
+
|
|
%patch100 -p1
|
|
%patch100 -p1
|
|
%patch101 -p1
|
|
%patch101 -p1
|
|
%patch102 -p1
|
|
%patch102 -p1
|
|
%patch103 -p1 -b .prerm-vine
|
|
%patch103 -p1 -b .prerm-vine
|
|
-%patch104 -p1
|
|
|
|
|
|
+
|
|
|
|
|
|
%build
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
|
-make install-redhat DESTDIR=$RPM_BUILD_ROOT \
|
|
|
|
- SBIN=$RPM_BUILD_ROOT%{_sbindir} \
|
|
|
|
- VAR=$RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} \
|
|
|
|
- MAN=$RPM_BUILD_ROOT%{_mandir}/man8 \
|
|
|
|
- ETC=$RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
|
|
|
|
- BASHDIR=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d \
|
|
|
|
- LIBDIR=$RPM_BUILD_ROOT%{_prefix}/lib/%{name}
|
|
|
|
|
|
+rm -rf %{buildroot}
|
|
|
|
+%if %{with systemd}
|
|
|
|
+make install-redhat-systemd \
|
|
|
|
+ SYSTEMD=%{buildroot}%{_unitdir} \
|
|
|
|
+%else
|
|
|
|
+make install-redhat-sysv \
|
|
|
|
+%endif
|
|
|
|
+ DESTDIR=%{buildroot} \
|
|
|
|
+ LIBDIR=%{buildroot}%{_prefix}/lib/%{name}
|
|
|
|
+
|
|
|
|
+install -p -m 755 -D kernel_install.d_dkms \
|
|
|
|
+ %{buildroot}%{_prefix}/lib/kernel/install.d/40-%{name}.install
|
|
|
|
+sed -i -e 's|/usr/bin/bash|/bin/bash|g' \
|
|
|
|
+ %{buildroot}%{_prefix}/lib/kernel/install.d/40-%{name}.install
|
|
|
|
|
|
|
|
|
|
%clean
|
|
%clean
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
+rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%post
|
|
%post
|
|
-[ -e /sbin/dkms ] && mv -f /sbin/dkms /sbin/dkms.old 2>/dev/null
|
|
|
|
|
|
+#[ -e /sbin/dkms ] && mv -f /sbin/dkms /sbin/dkms.old 2>/dev/null
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_post %{name}.service
|
|
|
|
+%else
|
|
# enable on initial install
|
|
# enable on initial install
|
|
[ $1 -lt 2 ] && /sbin/chkconfig dkms_autoinstaller on ||:
|
|
[ $1 -lt 2 ] && /sbin/chkconfig dkms_autoinstaller on ||:
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
|
%preun
|
|
%preun
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun %{name}.service
|
|
|
|
+%else
|
|
# remove on uninstall
|
|
# remove on uninstall
|
|
-[ $1 -lt 1 ] && /sbin/chkconfig dkms_autoinstaller off ||:
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-%triggerpostun -- %{name} < 1.90.00-1
|
|
|
|
-for dir in `find %{_localstatedir}/%{name} -type d -maxdepth 1 -mindepth 1`; do
|
|
|
|
- mv -f $dir %{_localstatedir}/lib/%{name}
|
|
|
|
-done
|
|
|
|
-[ -e %{_sysconfdir}/dkms_framework.conf ] && ! [ -e %{_sysconfdir}/%{name}/framework.conf ] && mkdir %{_sysconfdir}/%{name} && cp -a %{_sysconfdir}/dkms_framework.conf %{_sysconfdir}/%{name}/framework.conf
|
|
|
|
-arch_used=""
|
|
|
|
-[ `uname -m` == "x86_64" ] && [ `cat /proc/cpuinfo | grep -c "Intel"` -gt 0 ] && arch_used="ia32e" || arch_used=`uname -m`
|
|
|
|
-echo ""
|
|
|
|
-echo "ALERT! ALERT! ALERT!"
|
|
|
|
-echo ""
|
|
|
|
-echo "You are using a version of DKMS which does not support multiple system"
|
|
|
|
-echo "architectures. Your DKMS tree will now be modified to add this support."
|
|
|
|
-echo ""
|
|
|
|
-echo "The upgrade will assume all built modules are for arch: $arch_used"
|
|
|
|
-current_kernel=`uname -r`
|
|
|
|
-dkms_tree="%{_localstatedir}/lib/%{name}"
|
|
|
|
-source_tree="%{_prefix}/src"
|
|
|
|
-tmp_location="/tmp"
|
|
|
|
-dkms_frameworkconf="%{_sysconfdir}/%{name}/framework.conf"
|
|
|
|
-. $dkms_frameworkconf 2>/dev/null
|
|
|
|
-echo ""
|
|
|
|
-echo "Fixing directories."
|
|
|
|
-for directory in `find $dkms_tree -type d -name "module" -mindepth 3 -maxdepth 4`; do
|
|
|
|
- dir_to_fix=`echo $directory | sed 's#/module$##'`
|
|
|
|
- echo "Creating $dir_to_fix/$arch_used..."
|
|
|
|
- mkdir $dir_to_fix/$arch_used
|
|
|
|
- mv -f $dir_to_fix/* $dir_to_fix/$arch_used 2>/dev/null
|
|
|
|
-done
|
|
|
|
-echo ""
|
|
|
|
-echo "Fixing symlinks."
|
|
|
|
-for symlink in `find $dkms_tree -type l -name "kernel*" -mindepth 2 -maxdepth 2`; do
|
|
|
|
- symlink_kernelname=`echo $symlink | sed 's#.*/kernel-##'`
|
|
|
|
- dir_of_symlink=`echo $symlink | sed 's#/kernel-.*$##'`
|
|
|
|
- cd $dir_of_symlink
|
|
|
|
- read_link="$symlink"
|
|
|
|
- while [ -L "$read_link" ]; do
|
|
|
|
- read_link=`ls -l $read_link | sed 's/.*-> //'`
|
|
|
|
- done
|
|
|
|
- if [ `echo $read_link | sed 's#/# #g' | wc -w | awk {'print $1'}` -lt 3 ]; then
|
|
|
|
- echo "Updating $symlink..."
|
|
|
|
- ln -sf $read_link/$arch_used kernel-$symlink_kernelname-$arch_used
|
|
|
|
- rm -f $symlink
|
|
|
|
- fi
|
|
|
|
- cd -
|
|
|
|
-done
|
|
|
|
-echo ""
|
|
|
|
|
|
+[ $1 -lt 1 -o -x /bin/systemctl ] && /sbin/chkconfig dkms_autoinstaller off ||:
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%postun
|
|
|
|
+%systemd_postun %{name}.service
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%{_sbindir}/%{name}
|
|
|
|
-%{_localstatedir}/lib/%{name}
|
|
|
|
-/etc/init.d/dkms_autoinstaller
|
|
|
|
|
|
+%license COPYING
|
|
|
|
+%doc sample.spec sample.conf AUTHORS README.md
|
|
%{_prefix}/lib/%{name}
|
|
%{_prefix}/lib/%{name}
|
|
-%{_mandir}/*/*
|
|
|
|
|
|
+%{_prefix}/lib/kernel/install.d/40-%{name}.install
|
|
|
|
+%{_mandir}/man8/dkms.8*
|
|
|
|
+%{_sbindir}/%{name}
|
|
|
|
+%{_sharedstatedir}/%{name}
|
|
%config(noreplace) %{_sysconfdir}/%{name}
|
|
%config(noreplace) %{_sysconfdir}/%{name}
|
|
-%doc sample.spec sample.conf AUTHORS COPYING README.dkms
|
|
|
|
-%doc sample-suse-9-mkkmp.spec sample-suse-10-mkkmp.spec
|
|
|
|
-# these dirs are for plugins - owned by other packages
|
|
|
|
%{_sysconfdir}/kernel/postinst.d/%{name}
|
|
%{_sysconfdir}/kernel/postinst.d/%{name}
|
|
%{_sysconfdir}/kernel/prerm.d/%{name}
|
|
%{_sysconfdir}/kernel/prerm.d/%{name}
|
|
-%{_sysconfdir}/bash_completion.d/%{name}
|
|
|
|
|
|
+%dir %{_datadir}/bash-completion
|
|
|
|
+%dir %{_datadir}/bash-completion/completions
|
|
|
|
+%{_datadir}/bash-completion/completions/%{name}
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_unitdir}/%{name}.service
|
|
|
|
+%else
|
|
|
|
+%{_initdir}/dkms_autoinstaller
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Fri May 01 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.1-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- updated Patch100-103.
|
|
|
|
+- dropped Patch104
|
|
|
|
+- added systemd support (disabled as default).
|
|
|
|
+
|
|
* Wed Oct 02 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.21.1-9
|
|
* Wed Oct 02 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.21.1-9
|
|
- add R: build-essential
|
|
- add R: build-essential
|
|
|
|
|
|
@@ -481,7 +486,7 @@ echo ""
|
|
- mkrpm handles --source-only
|
|
- mkrpm handles --source-only
|
|
- Updated manpage
|
|
- Updated manpage
|
|
|
|
|
|
-* Fri Jun 17 2004 Gary Lerhaupt <gary_lerhaupt@dell.com> 1.93.04-1
|
|
|
|
|
|
+* Thu Jun 17 2004 Gary Lerhaupt <gary_lerhaupt@dell.com> 1.93.04-1
|
|
- Started adding mkrpm
|
|
- Started adding mkrpm
|
|
|
|
|
|
* Wed Jun 16 2004 Gary Lerhaupt <gary_lerhaupt@dell.com> 1.93.01-1
|
|
* Wed Jun 16 2004 Gary Lerhaupt <gary_lerhaupt@dell.com> 1.93.01-1
|
|
@@ -633,7 +638,7 @@ echo ""
|
|
- Added kernel config prepping for hugemem kernel (thanks Amit Bhutani)
|
|
- Added kernel config prepping for hugemem kernel (thanks Amit Bhutani)
|
|
- modules.conf only now gets changed during install or uninstall of active module
|
|
- modules.conf only now gets changed during install or uninstall of active module
|
|
|
|
|
|
-* Tue Nov 03 2003 Gary Lerhaupt <gary_lerhaupt@dell.com> 0.44.05-1
|
|
|
|
|
|
+* Mon Nov 03 2003 Gary Lerhaupt <gary_lerhaupt@dell.com> 0.44.05-1
|
|
- Changed MODULES_CONF_ALIAS_TYPE to an array in dkms.conf
|
|
- Changed MODULES_CONF_ALIAS_TYPE to an array in dkms.conf
|
|
- Added MODULES_CONF_OBSOLETES array in dkms.conf
|
|
- Added MODULES_CONF_OBSOLETES array in dkms.conf
|
|
- Reworked modules_conf_modify to make use of OBSOLETES logic
|
|
- Reworked modules_conf_modify to make use of OBSOLETES logic
|
|
@@ -801,7 +806,7 @@ echo ""
|
|
* Wed May 14 2003 Gary Lerhaupt <gary_lerhaupt@dell.com> 0.28.05-1
|
|
* Wed May 14 2003 Gary Lerhaupt <gary_lerhaupt@dell.com> 0.28.05-1
|
|
- Fixed a typo in the man page.
|
|
- Fixed a typo in the man page.
|
|
|
|
|
|
-* Tue May 05 2003 Gary Lerhaupt <gary_lerhaupt@dell.com> 0.28.04-1
|
|
|
|
|
|
+* Mon May 05 2003 Gary Lerhaupt <gary_lerhaupt@dell.com> 0.28.04-1
|
|
- Fixed ldtarball/mktarball to obey source_tree & dkms_tree (Reported By: Jordan Hargrave <jordan_hargrave@dell.com>)
|
|
- Fixed ldtarball/mktarball to obey source_tree & dkms_tree (Reported By: Jordan Hargrave <jordan_hargrave@dell.com>)
|
|
- Added DKMS mailing list to man page
|
|
- Added DKMS mailing list to man page
|
|
|
|
|