rpms/akmods/F-14 akmods,1.6,1.7 akmods.spec,1.8,1.9

Richard Shaw hobbes1069 at rpmfusion.org
Thu Nov 24 18:04:46 CET 2011


Author: hobbes1069

Update of /cvs/free/rpms/akmods/F-14
In directory se02.es.rpmfusion.net:/tmp/cvs-serv25693

Modified Files:
	akmods akmods.spec 
Log Message:
* Tue Nov 24 2011 Richard Shaw <hobbes1069 at gmail.com> - 0.3.8-3
- Kmod can be newer than akmod due to rebuilds for new kernels (#2063)



Index: akmods
===================================================================
RCS file: /cvs/free/rpms/akmods/F-14/akmods,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- akmods	19 Nov 2011 23:53:02 -0000	1.6
+++ akmods	24 Nov 2011 17:04:46 -0000	1.7
@@ -36,7 +36,7 @@
 
 # global vars
 myprog="akmods"
-myver="0.3.7"
+myver="0.3.8"
 kmodlogfile=
 continue_line=""
 tmpdir=
@@ -326,15 +326,14 @@
 		# Versions are the same. Nothing to do.
 		return 0
 	elif [ "$retvalue" == 11 ]; then
-		# kmod is newer, this nomally shouldn't happen.
-		akmods_echo 1 2 -n "Warning: installed kmod is newer then the akmod"
+		# kmod is newer, nothing to do.
 		return 0
 	elif [ "$retvalue" == 12 ]; then
 		# akmod is newer, need to build kmod.
 		return 1
 	else
 		# Something went wrong
-		akmods_echo 1 2 -n "Error: Could not determine if akmod is newer then the installed kmod"
+		akmods_echo 1 2 -n "Error: Could not determine if akmod is newer than the installed kmod"
 		akmods_echo 1 2 --failure
 		return 0
 	fi
@@ -371,7 +370,7 @@
 					akmods_echo 1 2 "directories are missing:" 
 					akmods_echo 1 2 "/usr/src/kernels/${this_kernelver}/" 
 					akmods_echo 1 2 -n "/lib/modules/${this_kernelver}/build/" 
-					akmods_echo 1 2 "Is the correct kernel-devel package installed?"
+					akmods_echo 1 2 -n "Is the correct kernel-devel package installed?"
 					akmods_echo 1 2 --failure
 					return 1
 				fi


Index: akmods.spec
===================================================================
RCS file: /cvs/free/rpms/akmods/F-14/akmods.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- akmods.spec	19 Nov 2011 23:53:02 -0000	1.8
+++ akmods.spec	24 Nov 2011 17:04:46 -0000	1.9
@@ -1,6 +1,6 @@
 Name:           akmods
-Version:        0.3.7
-Release:        2%{?dist}
+Version:        0.3.8
+Release:        3%{?dist}
 Summary:        Automatic kmods build and install tool 
 
 Group:          System Environment/Kernel
@@ -13,6 +13,7 @@
 Source3:        akmodsbuild.1
 Source4:        akmodsinit
 Source6:        akmodsposttrans
+Source7:        akmods.service
 
 BuildArch:      noarch
 
@@ -38,11 +39,20 @@
 # we create a special user that used by akmods to build kmod packages
 Requires(pre):  shadow-utils
 
+%if %fedora <= 15
 # for the akmods init script:
 Requires(post):  /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
 
+%else
+# systemd unit requirements.
+BuildRequires:  systemd-units
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+%endif
+
 
 %description
 Akmods startup script will rebuild akmod packages during system 
@@ -63,7 +73,11 @@
 install -D -p -m 0755 %{SOURCE0} %{buildroot}%{_sbindir}/akmods
 install -D -p -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/akmodsbuild
 install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_mandir}/man1/akmodsbuild.1
+%if %fedora <= 15
 install -D -p -m 0755 %{SOURCE4} %{buildroot}%{_initrddir}/akmods
+%else
+install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/akmods.service
+%endif
 # %%{_sysconfdir}/kernel/posttrans.d/ should be owned my mkinitrd #441111
 install -D -p -m 0755 %{SOURCE6} %{buildroot}/%{_sysconfdir}/kernel/postinst.d/akmods
 
@@ -76,6 +90,7 @@
     -c "User is used by akmods to build akmod packages" akmods
 
 %post
+%if %fedora <= 15
 # add init script
 /sbin/chkconfig --add akmods
 # enable init script; users that installed akmods directly or indirectly
@@ -83,11 +98,26 @@
 if [ $1 = 1 ]; then
    /sbin/chkconfig akmods on
 fi
+%else
+# Systemd
+if [ $1 -eq 1 ] ; then 
+    # Initial installation
+    /bin/systemctl enable akmods.service >/dev/null 2>&1 || :
+fi
+%endif
 
 %preun
+%if %fedora <= 15
 if [ $1 = 0 ]; then
    /sbin/chkconfig --del akmods
 fi
+%else
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable akmods.service > /dev/null 2>&1 || :
+    /bin/systemctl stop akmods.service > /dev/null 2>&1 || :
+fi
+%endif
 
 
 %files 
@@ -95,14 +125,23 @@
 %attr(-,akmods,akmods) %{_localstatedir}/cache/akmods
 %{_bindir}/akmodsbuild
 %{_sbindir}/akmods
+%if %fedora <= 15
 %{_initrddir}/akmods
+%else
+%{_unitdir}/akmods.service
+%endif
 %{_sysconfdir}/kernel/postinst.d/akmods
 %{_mandir}/man1/*
 
 
 %changelog
-* Tue Nov 15 2011 Richard Shaw <hobbes1069 at gmail.com> - 0.3.7-2
-- Fix rpmdev-vercmp handling.
+* Tue Nov 24 2011 Richard Shaw <hobbes1069 at gmail.com> - 0.3.8-3
+- Kmod can be newer than akmod due to rebuilds for new kernels (#2063)
+
+* Mon Nov 21 2011 Richard Shaw <hobbes1069 at gmail.com> - 0.3.8-2
+- Add hint about kernel-devel package if rebuild fails due to lack of required
+  development files.
+- Move logging from /var/cache/akmods/akmods.log to /var/log/akmods.log.
 
 * Fri Sep 23 2011 Richard Shaw <hobbes1069 at gmail.com> - 0.3.7-1
 - Update to 0.3.7



More information about the rpmfusion-commits mailing list