From 6ba24240a00349b3489b7e083874b5c75a5d3f78f1d449347081741355a8b091 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 9 Apr 2013 14:39:09 +0000 Subject: [PATCH] Accepting request 163216 from home:onielsen:Virtualization:Testing - Various RPMLINT fixes - Removed runlevel 4 from init scripts - Changed init script for openvswitch-switch to Required-Start $local_fs; it provides layer 2 services and should therefore start before $network OBS-URL: https://build.opensuse.org/request/show/163216 OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=23 --- openvswitch-controller.init | 2 +- openvswitch-switch.init | 6 +++--- openvswitch.spec | 21 ++++++++++++++++++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/openvswitch-controller.init b/openvswitch-controller.init index 4027805..5a568b0 100644 --- a/openvswitch-controller.init +++ b/openvswitch-controller.init @@ -24,7 +24,7 @@ # Required-Stop: $remote_fs # Should-Start: $named # Should-Stop: $null -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: Open vSwitch controller ### END INIT INFO diff --git a/openvswitch-switch.init b/openvswitch-switch.init index e577071..1bae411 100644 --- a/openvswitch-switch.init +++ b/openvswitch-switch.init @@ -16,9 +16,9 @@ # ### BEGIN INIT INFO # Provides: openvswitch-switch -# Required-Start: $network $named $remote_fs $syslog -# Required-Stop: $remote_fs -# Default-Start: 2 3 4 5 +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: Open vSwitch switch ### END INIT INFO diff --git a/openvswitch.spec b/openvswitch.spec index 95489af..f1483c5 100644 --- a/openvswitch.spec +++ b/openvswitch.spec @@ -53,11 +53,12 @@ BuildRequires: perl BuildRequires: pkg-config BuildRequires: python-devel BuildRequires: valgrind-devel +BuildRequires: fdupes Requires: logrotate Requires: openssl Requires: python Provides: openvswitch-common = %{version} -Obsoletes: openvswitch-common <= 1.9.0 +Obsoletes: openvswitch-common < %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %py_requires @@ -113,7 +114,7 @@ Requires: procps Requires: python Requires: uuid-runtime Suggests: openvswitch-kmp - +Suggests: logrotate %description switch openvswitch-switch provides the userspace components and utilities for the Open vSwitch kernel-based switch. @@ -299,6 +300,7 @@ install -m 755 %{SOURCE5} \ install -d -m 755 %{buildroot}/%{_sysconfdir}/sysconfig install -d -m 755 %{buildroot}/%{_sysconfdir}/logrotate.d +install -d -m 755 %{buildroot}/var/log/openvswitch install -m 644 %{SOURCE4} \ %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}-switch @@ -318,12 +320,25 @@ mkdir -p %{buildroot}%{py_sitedir} mv %{buildroot}%{_datadir}/%{name}/python/* %{buildroot}%{py_sitedir} rmdir %{buildroot}%{_datadir}/%{name}/python +%fdupes %{buildroot}%{py_sitedir} + %post switch %{fillup_and_insserv openvswitch-switch} %preun switch %stop_on_removal openvswitch-switch +%postun switch +%restart_on_update openvswitch-switch +%insserv_cleanup + +%preun controller +%stop_on_removal openvswitch-controller + +%postun controller +%restart_on_update openvswitch-controller +%insserv_cleanup + %files brcompat %defattr(-,root,root) %{_sbindir}/ovs-brcompatd @@ -364,7 +379,6 @@ rmdir %{buildroot}%{_datadir}/%{name}/python %{_mandir}/man8/ovs-vlan-bug-workaround.8.gz %{_mandir}/man8/ovs-parse-backtrace.8.gz - %files pki %defattr(-,root,root) %{_mandir}/man8/ovs-pki.8.gz @@ -419,6 +433,7 @@ rmdir %{buildroot}%{_datadir}/%{name}/python %{_mandir}/man1/ovsdb-server.1.gz %{_mandir}/man5/ovs-vswitchd.conf.db.5.gz %{_mandir}/man8/ovs-ctl.8.gz +%dir /var/log/openvswitch %files test %defattr(-,root,root)