]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Merge remote-tracking branch 'ms/openvswitch'
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Aug 2012 20:08:13 +0000 (22:08 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Aug 2012 20:08:13 +0000 (22:08 +0200)
openvswitch/openvswitch.logrotate [new file with mode: 0644]
openvswitch/openvswitch.nm [new file with mode: 0644]

diff --git a/openvswitch/openvswitch.logrotate b/openvswitch/openvswitch.logrotate
new file mode 100644 (file)
index 0000000..1a08fa9
--- /dev/null
@@ -0,0 +1,20 @@
+# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.  This file is offered as-is,
+# without warranty of any kind.
+
+/var/log/openvswitch/*.log {
+       sharedscripts
+       missingok
+       postrotate
+       # Tell Open vSwitch daemons to reopen their log files
+       if [ -e /var/run/openvswitch/ovs-vswitchd.pid ]; then
+           /usr/bin/ovs-appctl -t ovs-vswitchd vlog/reopen
+       fi
+       if [ -e /var/run/openvswitch/ovsdb-server.pid ]; then
+           /usr/bin/ovs-appctl -t ovsdb-server vlog/reopen
+       fi
+       endscript
+}
diff --git a/openvswitch/openvswitch.nm b/openvswitch/openvswitch.nm
new file mode 100644 (file)
index 0000000..fcf778d
--- /dev/null
@@ -0,0 +1,91 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = openvswitch
+version    = 1.7.0
+release    = 1
+
+groups     = Networking/Tools
+url        = http://openvswitch.org/
+license    = ASL 2.0 and LGPLv2+ and SISSL
+summary    = Open vSwitch daemon/database/utilities.
+
+description
+       Open vSwitch provides standard network bridging functions and
+       support for the OpenFlow protocol for remote per-flow control
+       of traffic.
+end
+
+source_dl  = http://openvswitch.org/releases/
+
+build
+       requires
+               groff
+               openssl-devel
+               systemd-units
+       end
+
+       configure_options += \
+               --enable-ssl \
+               --with-pkidir=%{sharedstatedir}/openvswitch/pki
+
+       install_cmds
+               # Install logrotate file.
+               mkdir -pv %{BUILDROOT}%{sysconfdir}/logrotate.d
+               install -m 644 %{DIR_SOURCE}/openvswitch.logrotate \
+                       %{BUILDROOT}%{sysconfdir}/logrotate.d/openvswitch
+
+               mkdir -pv %{BUILDROOT}%{sharedstatedir}/openvswitch
+       
+               # Remove stuff we don't want to support.
+               rm -vf \
+                       %{BUILDROOT}%{bindir}/ovs-controller \
+                       %{BUILDROOT}%{sbindir}/ovs-{vlan-bug-workaround,brcompatd} \
+                       %{BUILDROOT}%{mandir}/man8/ovs-{controller,vlan-bug-workaround,brcompatd}.8
+       end
+end
+
+packages
+       package %{name}
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl try-restart openvswitch.service >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       systemctl --no-reload disable openvswitch.service >/dev/null 2>&1 || :
+                       systemctl stop openvswitch.service >/dev/null 2>&1 || :
+               end
+
+               configfiles
+                       %{sysconfdir}/logrotate.d/openvswitch
+               end
+       end
+
+       package %{name}-test
+               summary = Open vSwitch testing utilities.
+               license = ASL 2.0
+               description
+                       Utilities that are useful to diagnose performance and connectivity
+                       issues in Open vSwitch setup.
+               end
+               arch = noarch
+
+               files
+                       %{bindir}/ovs-test
+                       %{bindir}/ovs-vlan-test
+                       %{mandir}/man8/ovs-test.8*
+                       %{mandir}/man8/ovs-vlan-test.8*
+               end
+       end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
+end