From d508aa36a9399bad2a49987870f6df274818b4bbb023aee03b852cba4ec3d8a6 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Fri, 26 Apr 2013 10:03:16 +0000 Subject: [PATCH] Accepting request 173455 from home:fcrozat:branches:Virtualization - Move udev rules to /usr/lib/udev/rules.d for openSUSE 12.3 (and later) and to /lib/udev/rules.d for older distributions. OBS-URL: https://build.opensuse.org/request/show/173455 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=125 --- virtualbox.changes | 6 ++++++ virtualbox.spec | 20 +++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/virtualbox.changes b/virtualbox.changes index c1c451b..7506f21 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 26 08:10:58 UTC 2013 - fcrozat@suse.com + +- Move udev rules to /usr/lib/udev/rules.d for openSUSE 12.3 (and + later) and to /lib/udev/rules.d for older distributions. + ------------------------------------------------------------------- Fri Apr 19 14:56:41 UTC 2013 - coolo@suse.com diff --git a/virtualbox.spec b/virtualbox.spec index b08d884..6c1438a 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -18,6 +18,12 @@ %define _vbox_instdir /usr/lib/virtualbox +%if 0%{?suse_version} >= 1230 +%define _udevrulesdir /usr/lib/udev +%else +%define _udevrulesdir /lib/udev +%endif + Name: virtualbox %if %suse_version > 1230 BuildRequires: which @@ -375,7 +381,7 @@ echo "create directory structure" %__install -d -m 755 %{buildroot}%{_sysconfdir}/default %__install -d -m 755 %{buildroot}%{_sysconfdir}/init.d %__install -d -m 755 %{buildroot}%{_sysconfdir}/vbox -%__install -d -m 755 %{buildroot}%{_sysconfdir}/udev/rules.d +%__install -d -m 755 %{buildroot}%{_udevrulesdir} %__install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d #################################################################################### @@ -407,7 +413,7 @@ echo "entering guest-tools install section" %__ln_s %{_sysconfdir}/init.d/vboxadd \ %{buildroot}%{_sbindir}/rcvboxadd # udev rule for guest (virtualbox-guest-tools) -%__install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/udev/rules.d/60-vboxguest.rules +%__install -m 644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/60-vboxguest.rules # ############################################################## echo "entering guest-x11 install section" @@ -518,7 +524,7 @@ popd %__install -m 644 out/linux.*/release/bin/VBox.png \ %{buildroot}%{_datadir}/pixmaps/virtualbox.png # install udev rule for host (virtualbox) -%__install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/udev/rules.d/60-vboxdrv.rules +%__install -m 644 %{SOURCE2} %{buildroot}%{_udevrulesdir}/60-vboxdrv.rules # install config with session shutdown defs %__install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/default/virtualbox #install wrapper script @@ -546,7 +552,7 @@ echo -e "#settings for vboxwebsrn\nVBOXWEB_USER=root" > \ %{buildroot}%{_sysconfdir}/vbox/vbox.cfg # install udev helper script for creating usb devices install -m 0755 -D src/VBox/Installer/linux/VBoxCreateUSBNode.sh \ - $RPM_BUILD_ROOT/lib/udev/VBoxCreateUSBNode.sh + $RPM_BUILD_ROOT%{_udevrulesdir}/../VBoxCreateUSBNode.sh ###################################################### echo "entrering python-virtualbox install section" ###################################################### @@ -740,7 +746,7 @@ exit 0 %{_vbox_instdir}/components/*.xpt %dir %{_datadir}/virtualbox %config %{_sysconfdir}/default/virtualbox -%config(noreplace) %{_sysconfdir}/udev/rules.d/60-vboxdrv.rules +%{_udevrulesdir}/60-vboxdrv.rules %config %{_sysconfdir}/init.d/vboxdrv %dir %{_sysconfdir}/vbox %config %{_sysconfdir}/vbox/vbox.cfg @@ -748,7 +754,7 @@ exit 0 %{_var}/adm/fillup-templates/sysconfig.vbox %{_sbindir}/rcvboxes %{_sbindir}/rcvboxdrv -/lib/udev/VBoxCreateUSBNode.sh +%{_udevrulesdir}/../VBoxCreateUSBNode.sh %if %suse_version >= 1140 %verify(not mode) %attr(4750,root,vboxusers) %{_vbox_instdir}/VBoxNetDHCP %else @@ -798,7 +804,7 @@ exit 0 %{_bindir}/VBoxControl %{_bindir}/VBoxService /sbin/mount.vboxsf -%config(noreplace) %{_sysconfdir}/udev/rules.d/60-vboxguest.rules +%{_udevrulesdir}/60-vboxguest.rules %config %{_sysconfdir}/init.d/vboxadd %{_sbindir}/rcvboxadd #