SPECS: VirtualBox.spec - be consistent with Rs for kernel modules (vboxadd ...

hawk hawk at pld-linux.org
Mon Nov 24 12:08:15 CET 2008


Author: hawk                         Date: Mon Nov 24 11:08:15 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- be consistent with Rs for kernel modules (vboxadd has commented one)
- added init script for vboxvfs module, users are not allowed to load it
- vboxvfs module requires vboxadd to be loaded before so R it

---- Files affected:
SPECS:
   VirtualBox.spec (1.154 -> 1.155) 

---- Diffs:

================================================================
Index: SPECS/VirtualBox.spec
diff -u SPECS/VirtualBox.spec:1.154 SPECS/VirtualBox.spec:1.155
--- SPECS/VirtualBox.spec:1.154	Mon Nov 24 09:40:40 2008
+++ SPECS/VirtualBox.spec	Mon Nov 24 12:08:09 2008
@@ -44,8 +44,9 @@
 # Source2-md5:	9802f674c8eebdf22d5323aabee995ec
 Source3:	%{pname}-vboxdrv.init
 Source4:	%{pname}-vboxadd.init
-Source5:	%{pname}.desktop
-Source6:	%{pname}.sh
+Source5:	%{pname}-vboxvfs.init
+Source6:	%{pname}.desktop
+Source7:	%{pname}.sh
 Patch0:		%{pname}-configure.patch
 Patch1:		%{pname}-qt-paths.patch
 Patch2:		%{pname}-shared-libstdc++.patch
@@ -182,7 +183,7 @@
 Requires:	dev >= 2.9.0-7
 %if %{with dist_kernel}
 %requires_releq_kernel
-#Requires(postun):	%%releq_kernel
+Requires(postun):	%releq_kernel
 %endif
 Provides:	kernel(vboxadd) = %{version}-%{rel}
 
@@ -218,6 +219,7 @@
 Group:		Base/Kernel
 Requires(post,postun):	/sbin/depmod
 Requires:	dev >= 2.9.0-7
+Requires:	kernel%{_alt_kernel}-misc-vboxadd
 %if %{with dist_kernel}
 %requires_releq_kernel
 Requires(postun):	%releq_kernel
@@ -318,7 +320,7 @@
 	$RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \
 	$RPM_BUILD_ROOT%{_libdir}/VirtualBox
 
-install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/VirtualBox-wrapper.sh
+install %{SOURCE7} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/VirtualBox-wrapper.sh
 for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox,vditool}; do
 	install out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f
 	ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f
@@ -353,7 +355,7 @@
 %endif
 
 install out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png
-install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop
+install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop
 
 install -d $RPM_BUILD_ROOT/etc/udev/rules.d
 install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules
@@ -363,6 +365,7 @@
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv
 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd
+install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs
 %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc
 %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc
 %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc
@@ -422,10 +425,18 @@
 
 %post	-n kernel%{_alt_kernel}-misc-vboxvfs
 %depmod %{_kernel_ver}
+/sbin/chkconfig --add vboxvfs
+%service vboxvfs restart "VirtualBox OSE guest additions VFS driver"
 
 %postun	-n kernel%{_alt_kernel}-misc-vboxvfs
 %depmod %{_kernel_ver}
 
+%preun -n kernel%{_alt_kernel}-misc-vboxvfs
+if [ "$1" = "0" ]; then
+	%service vboxvfs stop
+	/sbin/chkconfig --del vboxvfs
+fi
+
 %if %{with userspace}
 %files
 %defattr(644,root,root,755)
@@ -522,6 +533,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.155  2008/11/24 11:08:09  hawk
+- be consistent with Rs for kernel modules (vboxadd has commented one)
+- added init script for vboxvfs module, users are not allowed to load it
+- vboxvfs module requires vboxadd to be loaded before so R it
+
 Revision 1.154  2008/11/24 08:40:40  hawk
 - updated to 2.0.6
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/VirtualBox.spec?r1=1.154&r2=1.155&f=u



More information about the pld-cvs-commit mailing list