rpms/akmods/devel akmods-shutdown, NONE, 1.1 akmods-shutdown.service, NONE, 1.1 akmods.spec, 1.15, 1.16 akmodsposttrans, 1.2, 1.3

Richard Shaw hobbes1069 at rpmfusion.org
Sat Dec 22 17:02:20 CET 2012


Author: hobbes1069

Update of /cvs/free/rpms/akmods/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv26415

Modified Files:
	akmods.spec akmodsposttrans 
Added Files:
	akmods-shutdown akmods-shutdown.service 
Log Message:
* Fri Jun 01 2012 Richard Shaw <hobbes1069 at gmail.com> - 0.5.1-1
- Add service file to run again on shutdown.
- Add conditional for Fedora 18 to specify correct systemd graphical service.



--- NEW FILE akmods-shutdown ---
#!/bin/bash
#
# akmods-shutdown - Helper script to build kernel modules on shutdown
# Copyright (c) 2012 Richard shaw <hobbes1069 at gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

echo "Building modules for all installed kernels."
for kernel in /usr/src/kernels/*; do
	kernel=$(basename $kernel)
	/usr/sbin/akmods --force --kernels $kernel
done



--- NEW FILE akmods-shutdown.service ---
[Unit]
Description=Builds and install new kmods from akmod packages
Before=shutdown.service reboot.service halt.service
Conflicts=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=-/usr/sbin/akmods --from-init

[Install]
WantedBy=multi-user.target


Index: akmods.spec
===================================================================
RCS file: /cvs/free/rpms/akmods/devel/akmods.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- akmods.spec	12 Apr 2012 22:25:58 -0000	1.15
+++ akmods.spec	22 Dec 2012 16:02:20 -0000	1.16
@@ -1,6 +1,6 @@
 Name:           akmods
-Version:        0.4.0
-Release:        4%{?dist}
+Version:        0.5.1
+Release:        1%{?dist}
 Summary:        Automatic kmods build and install tool 
 
 Group:          System Environment/Kernel
@@ -10,8 +10,10 @@
 Source1:        akmods.1
 Source2:        akmodsbuild
 Source3:        akmodsbuild.1
-Source4:        akmods.service
+Source4:        akmods.service.in
 Source5:        akmodsposttrans
+Source6:        akmods-shutdown
+Source7:        akmods-shutdown.service
 
 BuildArch:      noarch
 
@@ -49,7 +51,11 @@
 
 
 %prep
-echo nothing to prep
+%if 0%{?fedora} >= 18
+sed -i "s|@SERVICE@|display-manager.service|" %{SOURCE4}
+%else
+sed -i "s|@SERVICE@|prefdm.service|" %{SOURCE4}
+%endif
 
 
 %build
@@ -63,8 +69,10 @@
 install -D -pm 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/akmods.1
 install -D -pm 0755 %{SOURCE2} %{buildroot}%{_bindir}/akmodsbuild
 install -D -pm 0644 %{SOURCE3} %{buildroot}%{_mandir}/man1/akmodsbuild.1
+install -D -pm 0755 %{SOURCE6} %{buildroot}%{_bindir}/akmods-shutdown
 install -D -pm 0644 %{SOURCE4} %{buildroot}%{_unitdir}/akmods.service
-install -D -pm 0755 %{SOURCE5} %{buildroot}%{_sysconfdir}/kernel/postinst.d/akmods
+install -D -pm 0644 %{SOURCE7} %{buildroot}%{_unitdir}/akmods-shutdown.service
+install -D -pm 0755 %{SOURCE5} %{buildroot}%{_sysconfdir}/kernel/postinst.d/akmodsposttrans
 
 
 %pre
@@ -79,6 +87,7 @@
 if [ $1 -eq 1 ] ; then 
     # Initial installation
     /bin/systemctl enable akmods.service >/dev/null 2>&1 || :
+    /bin/systemctl enable akmods-shutdown.service >/dev/null 2>&1 || :
 fi
 
 %preun
@@ -86,20 +95,28 @@
     # Package removal, not upgrade
     /bin/systemctl --no-reload disable akmods.service > /dev/null 2>&1 || :
     /bin/systemctl stop akmods.service > /dev/null 2>&1 || :
+    /bin/systemctl --no-reload disable akmods-shutdown.service > /dev/null 2>&1 || :
+    /bin/systemctl stop akmods-shutdown.service > /dev/null 2>&1 || :
 fi
 
 
 %files 
 %{_bindir}/akmodsbuild
+%{_bindir}/akmods-shutdown
 %{_sbindir}/akmods
-%{_sysconfdir}/kernel/postinst.d/akmods
+%{_sysconfdir}/kernel/postinst.d/akmodsposttrans
 %{_unitdir}/akmods.service
+%{_unitdir}/akmods-shutdown.service
 %{_usrsrc}/akmods
 %attr(-,akmods,akmods) %{_localstatedir}/cache/akmods
 %{_mandir}/man1/*
 
 
 %changelog
+* Fri Jun 01 2012 Richard Shaw <hobbes1069 at gmail.com> - 0.5.1-1
+- Add service file to run again on shutdown.
+- Add conditional for Fedora 18 to specify correct systemd graphical service.
+
 * Thu Apr 12 2012 Nicolas Chauvet <kwizart at gmail.com> - 0.4.0-4
 - Rebuilt
 


Index: akmodsposttrans
===================================================================
RCS file: /cvs/free/rpms/akmods/devel/akmodsposttrans,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- akmodsposttrans	1 Feb 2009 13:21:31 -0000	1.2
+++ akmodsposttrans	22 Dec 2012 16:02:20 -0000	1.3
@@ -1,6 +1,6 @@
 #!/bin/bash -
 #
-# akmodposttras - Calls akmods for newly installed kernels
+# akmodposttrans - Calls akmods for newly installed kernels
 #
 # Copyright (c) 2009 Thorsten Leemhuis <fedora at leemhuis.info>
 #


More information about the rpmfusion-commits mailing list