---
 INSTALL.RHEL-5.6                                   |   53 +++++
 Makefile.am                                        |    2 +
 README                                             |    9 +-
 rhel-5.6/automake.mk                               |   13 ++
 rhel-5.6/etc_init.d_openvswitch                    |   93 +++++++++
 rhel-5.6/etc_logrotate.d_openvswitch               |   20 ++
 rhel-5.6/openvswitch-rhel-5.6.spec                 |  202 ++++++++++++++++++++
 ...sr_share_openvswitch_scripts_sysconfig.template |   20 ++
 8 files changed, 410 insertions(+), 2 deletions(-)
 create mode 100644 INSTALL.RHEL-5.6
 create mode 100644 rhel-5.6/automake.mk
 create mode 100755 rhel-5.6/etc_init.d_openvswitch
 create mode 100644 rhel-5.6/etc_logrotate.d_openvswitch
 create mode 100644 rhel-5.6/openvswitch-rhel-5.6.spec
 create mode 100644 rhel-5.6/usr_share_openvswitch_scripts_sysconfig.template

diff --git a/INSTALL.RHEL-5.6 b/INSTALL.RHEL-5.6
new file mode 100644
index 0000000..7e8eb9e
--- /dev/null
+++ b/INSTALL.RHEL-5.6
@@ -0,0 +1,53 @@
+     How to Install Open vSwitch on Red Hat Enterprise Linux 5.6
+     ===========================================================
+
+This document describes how to build and install Open vSwitch on a Red
+Hat Enterprise Linux (RHEL) 5.6 host.  If you want to install Open
+vSwitch on a generic Linux host, see INSTALL.Linux instead.
+
+Building Open vSwitch for RHEL 5.6
+----------------------------------
+
+You may build from an Open vSwitch distribution tarball or from an
+Open vSwitch Git tree.  If you are building from an Open vSwitch Git
+tree, then you will need to first create a distribution tarball by
+running "./boot.sh; ./configure; make dist" in the Git tree.
+
+Once you have a distribution tarball, copy it into
+/usr/src/redhat/SOURCES.  Then execute the following:
+
+   cd /tmp
+   tar xfz /usr/src/redhat/SOURCES/openvswitch-$VERSION.tar.gz
+   rpmbuild \
+        -D "openvswitch_version <Open vSwitch version>" \
+        -D "kernel_version <kernel version>" \
+        -D "kernel_flavor <kernel flavor>" \
+        -bb openvswitch-$VERSION/rhel-5.6/openvswitch-rhel-5.6.spec
+
+where:
+
+    <Open vSwitch version> is the version number that appears in the
+    name of the Open vSwitch tarball, e.g. 0.90.0.
+
+    <kernel version> is the output of:
+    rpm -q --queryformat "%{Version}-%{Release}" <RHEL kernel name>
+    e.g. 2.6.32.12-0.7.1.xs5.6.100.323.170596
+
+    <kernel flavor (suffix), if any> is "-xen" if you are building for
+    RHEL's Xen kernel.  Otherwise, omit the -D option that sets
+    kernel_flavor.
+
+Three RPMs will be output into /usr/src/redhat/RPMS/`arch`, whose
+names begin with "openvswitch", "openvswitch-kmod", and
+"openvswitch-debuginfo".
+
+Installing Open vSwitch for RHEL 5.6
+------------------------------------
+
+To install or uninstall Open vSwitch on RHEL 5.6, just use "rpm" to
+install or uninstall the packages.
+
+Reporting Bugs
+--------------
+
+Please report problems to [email protected].
diff --git a/Makefile.am b/Makefile.am
index ea6df2a..c8e4a42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,6 +34,7 @@ EXTRA_DIST = \
        DESIGN \
        INSTALL.KVM \
        INSTALL.Linux \
+       INSTALL.RHEL-5.6 \
        INSTALL.SSL \
        INSTALL.XenServer \
        INSTALL.bridge \
@@ -156,5 +157,6 @@ include third-party/automake.mk
 include debian/automake.mk
 include vswitchd/automake.mk
 include ovsdb/automake.mk
+include rhel-5.6/automake.mk
 include xenserver/automake.mk
 include python/ovs/automake.mk
diff --git a/README b/README
index d23636d..352c58c 100644
--- a/README
+++ b/README
@@ -33,7 +33,8 @@ vSwitch supports the following features:
 
 The included Linux kernel module supports Linux 2.6.18 and up, with
 testing focused on 2.6.32 with Centos and Xen patches.  Open vSwitch
-also has special support for Citrix XenServer hosts.
+also has special support for Citrix XenServer and Red Hat Enterprise
+Linux 5.6 hosts.
 
 Open vSwitch can also operate, at a cost in performance, entirely in
 userspace, without assistance from a kernel module.  This userspace
@@ -58,7 +59,8 @@ The main components of this distribution are:
 
     * ovs-dpctl, a tool for configuring the switch kernel module.
 
-    * Scripts and specs for building RPMs that allow Open vSwitch
+    * Scripts and specs for building RPMs for Citrix XenServer and Red
+      Hat Enterprise Linux 5.6.  The XenServer RPMs allow Open vSwitch
       to be installed on a Citrix XenServer host as a drop-in
       replacement for its switch, with additional functionality.
 
@@ -94,6 +96,9 @@ read INSTALL.bridge.
 To build RPMs for installing Open vSwitch on a Citrix XenServer host
 or resource pool, read INSTALL.XenServer.
 
+To build RPMs for installing Open vSwitch on a Red Hat Enterprise
+Linux 5.6 host, read INSTALL.RHEL-5.6.
+
 To use Open vSwitch with KVM on Linux, read INSTALL.Linux, then
 INSTALL.KVM.
 
diff --git a/rhel-5.6/automake.mk b/rhel-5.6/automake.mk
new file mode 100644
index 0000000..949b553
--- /dev/null
+++ b/rhel-5.6/automake.mk
@@ -0,0 +1,13 @@
+# 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.
+
+EXTRA_DIST += \
+       rhel-5.6/automake.mk \
+       rhel-5.6/etc_init.d_openvswitch \
+       rhel-5.6/etc_logrotate.d_openvswitch \
+       rhel-5.6/openvswitch-rhel-5.6.spec \
+       rhel-5.6/usr_share_openvswitch_scripts_sysconfig.template
diff --git a/rhel-5.6/etc_init.d_openvswitch b/rhel-5.6/etc_init.d_openvswitch
new file mode 100755
index 0000000..0e95ec9
--- /dev/null
+++ b/rhel-5.6/etc_init.d_openvswitch
@@ -0,0 +1,93 @@
+#!/bin/sh
+#
+# openvswitch
+#
+# chkconfig: 2345 09 91
+# description: Manage Open vSwitch kernel modules and user-space daemons
+
+# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+### BEGIN INIT INFO
+# Provides:          openvswitch-switch
+# Required-Start:
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Open vSwitch switch
+### END INIT INFO
+
+. /usr/share/openvswitch/scripts/ovs-lib.sh || exit 1
+test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch
+
+start () {
+    set $ovs_ctl start
+    set "$@" --system-id=random
+    if test X"$FORCE_COREFILES" != X; then
+       set "$@" --force-oorefiles="$FORCE_COREFILES"
+    fi
+    if test X"$OVSDB_SERVER_PRIORITY" != X; then
+       set "$@" --ovsdb-server-priority="$OVSDB_SERVER_PRIORITY"
+    fi
+    if test X"$VSWITCHD_PRIORITY" != X; then
+       set "$@" --ovs-vswitchd-priority="$VSWITCHD_PRIORITY"
+    fi
+    if test X"$VSWITCHD_MLOCKALL" != X; then
+       set "$@" --mlockall="$VSWITCHD_MLOCKALL"
+    fi
+    if test ! -e /var/run/openvswitch.booted; then
+        touch /var/run/openvswitch.booted
+        set "$@" --delete-bridges
+    fi
+    "$@"
+
+    touch /var/lock/subsys/openvswitch
+}
+
+stop () {
+    $ovs_ctl stop
+    rm -f /var/lock/subsys/openvswitch
+}
+
+ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl
+case $1 in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    restart)
+        stop
+        start
+        ;;
+    reload|force-reload)
+        # Nothing to do.
+        ;;
+    status)
+        $ovs_ctl status
+        ;;
+    version)
+        $ovs_ctl version
+        ;;
+    force-reload-kmod)
+        $ovs_ctl force_reload_kmod
+        ;;
+    help)
+        printf "$0 [start|stop|restart|reload|force-reload|status|version]\n"
+        ;;
+    *)
+        printf "Unknown command: $1\n"
+        exit 1
+        ;;
+esac
diff --git a/rhel-5.6/etc_logrotate.d_openvswitch 
b/rhel-5.6/etc_logrotate.d_openvswitch
new file mode 100644
index 0000000..c1ead14
--- /dev/null
+++ b/rhel-5.6/etc_logrotate.d_openvswitch
@@ -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/rhel-5.6/openvswitch-rhel-5.6.spec 
b/rhel-5.6/openvswitch-rhel-5.6.spec
new file mode 100644
index 0000000..b192ddd
--- /dev/null
+++ b/rhel-5.6/openvswitch-rhel-5.6.spec
@@ -0,0 +1,202 @@
+# Spec file for Open vSwitch on Red Hat Enterprise Linux 5.6.
+
+# 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.
+
+# When building, the rpmbuild command line should define
+# openvswitch_version and kernel_version, using -D arguments.  For
+# "xen" kernels, define kernel_flavor to "-xen", otherwise leave it
+# undefined.  build_number is optional.
+#
+# for example:
+#
+#    rpmbuild -D "openvswitch_version 1.1.0+build123"
+#      -D "kernel_version 2.6.32.12-0.7.1.xs5.6.100.323.170596"
+#      -D "build_number --with-build-number=123"
+#      -bb /usr/src/redhat/SPECS/openvswitch-rhel-5.6.spec
+
+%define full_version %{kernel_version}%{?kernel_flavor}
+
+# bump this when breaking compatibility with userspace
+%define module_abi_version 0
+%define module_package kmod%{?kernel_flavor}-%{kernel_version}
+
+Name: openvswitch
+Summary: Open vSwitch daemon/database/utilities
+Group: System Environment/Daemons
+URL: http://www.openvswitch.org/
+Vendor: Nicira Networks, Inc.
+Version: %{openvswitch_version}
+
+License: ASL 2.0
+Release: 1
+Source: openvswitch-%{openvswitch_version}.tar.gz
+Buildroot: /tmp/openvswitch-rpm
+Requires: openvswitch_mod.ko.%{module_abi_version}, logrotate, python
+
+%description
+Open vSwitch provides standard network bridging functions augmented with
+support for the OpenFlow protocol for remote per-flow control of
+traffic.
+
+%package %{module_package}
+Summary: Open vSwitch kernel module
+Group: System Environment/Kernel
+License: GPLv2
+Provides: %{name}-kmod%{?kernel_flavor} = %{kernel_version}, 
openvswitch_mod.ko.%{module_abi_version}
+Requires: kernel%{?kernel_flavor} = %{kernel_version}
+
+%description %{module_package}
+Open vSwitch Linux kernel module compiled against kernel version
+%{full_version}.
+
+%prep
+%setup -q -n openvswitch-%{openvswitch_version}
+
+%build
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} 
--with-l26=/lib/modules/%{full_version}/build --enable-ssl %{?build_number}
+make %{_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+install -d -m 755 $RPM_BUILD_ROOT/etc
+install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
+install -m 755 rhel-5.6/etc_init.d_openvswitch \
+        $RPM_BUILD_ROOT/etc/init.d/openvswitch
+install -d -m 755 $RPM_BUILD_ROOT/etc/sysconfig
+install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
+install -m 755 rhel-5.6/etc_logrotate.d_openvswitch \
+        $RPM_BUILD_ROOT/etc/logrotate.d/openvswitch
+install -d -m 755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts
+install -m 644 vswitchd/vswitch.ovsschema \
+         $RPM_BUILD_ROOT/usr/share/openvswitch/vswitch.ovsschema
+install -m 755 rhel-5.6/usr_share_openvswitch_scripts_sysconfig.template \
+        $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/sysconfig.template
+
+install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{full_version}/extra/openvswitch
+find datapath/linux-2.6 -name *.ko -exec install -m 755  \{\} 
$RPM_BUILD_ROOT/lib/modules/%{full_version}/extra/openvswitch \;
+install xenserver/uuid.py $RPM_BUILD_ROOT/usr/share/openvswitch/python
+
+# Get rid of stuff we don't want to make RPM happy.
+rm \
+    $RPM_BUILD_ROOT/usr/bin/ovs-controller \
+    $RPM_BUILD_ROOT/usr/bin/ovs-pki \
+    $RPM_BUILD_ROOT/usr/share/man/man8/ovs-controller.8 \
+    $RPM_BUILD_ROOT/usr/share/man/man8/ovs-pki.8 \
+    $RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \
+    $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8
+
+install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+# Create default or update existing /etc/sysconfig/openvswitch.
+SYSCONFIG=/etc/sysconfig/openvswitch
+TEMPLATE=/usr/share/openvswitch/scripts/sysconfig.template
+if [ ! -e $SYSCONFIG ]; then
+    cp $TEMPLATE $SYSCONFIG
+else
+    for var in $(awk -F'[ :]' '/^# [_A-Z0-9]+:/{print $2}' $TEMPLATE)
+    do
+        if ! grep $var $SYSCONFIG >/dev/null 2>&1; then
+            echo >> $SYSCONFIG
+            sed -n "/$var:/,/$var=/p" $TEMPLATE >> $SYSCONFIG
+        fi
+    done
+fi
+
+# Ensure all required services are set to run
+/sbin/chkconfig --add openvswitch
+/sbin/chkconfig openvswitch on
+
+%post %{module_package}
+depmod %{full_version}
+
+%preun
+if [ "$1" = "0" ]; then     # $1 = 0 for uninstall
+    /sbin/service openvswitch stop
+    /sbin/chkconfig --del openvswitch
+fi
+
+%postun
+if [ "$1" = "0" ]; then     # $1 = 0 for uninstall
+    rm -f /etc/openvswitch/conf.db
+    rm -f /etc/sysconfig/openvswitch
+    rm -f /etc/openvswitch/vswitchd.cacert
+fi
+
+exit 0
+
+%files
+%defattr(-,root,root)
+/etc/init.d/openvswitch
+/etc/logrotate.d/openvswitch
+/usr/share/openvswitch/python/ovs/__init__.py
+/usr/share/openvswitch/python/ovs/daemon.py
+/usr/share/openvswitch/python/ovs/db/__init__.py
+/usr/share/openvswitch/python/ovs/db/data.py
+/usr/share/openvswitch/python/ovs/db/error.py
+/usr/share/openvswitch/python/ovs/db/idl.py
+/usr/share/openvswitch/python/ovs/db/parser.py
+/usr/share/openvswitch/python/ovs/db/schema.py
+/usr/share/openvswitch/python/ovs/db/types.py
+/usr/share/openvswitch/python/ovs/dirs.py
+/usr/share/openvswitch/python/ovs/fatal_signal.py
+/usr/share/openvswitch/python/ovs/json.py
+/usr/share/openvswitch/python/ovs/jsonrpc.py
+/usr/share/openvswitch/python/ovs/ovsuuid.py
+/usr/share/openvswitch/python/ovs/poller.py
+/usr/share/openvswitch/python/ovs/process.py
+/usr/share/openvswitch/python/ovs/reconnect.py
+/usr/share/openvswitch/python/ovs/socket_util.py
+/usr/share/openvswitch/python/ovs/stream.py
+/usr/share/openvswitch/python/ovs/timeval.py
+/usr/share/openvswitch/python/ovs/util.py
+/usr/share/openvswitch/python/uuid.py
+/usr/share/openvswitch/scripts/sysconfig.template
+/usr/share/openvswitch/scripts/ovs-save
+/usr/share/openvswitch/scripts/ovs-ctl
+/usr/share/openvswitch/scripts/ovs-lib.sh
+/usr/share/openvswitch/vswitch.ovsschema
+/usr/sbin/ovs-vswitchd
+/usr/sbin/ovsdb-server
+/usr/bin/ovs-appctl
+/usr/bin/ovs-dpctl
+/usr/bin/ovs-ofctl
+/usr/bin/ovs-pcap
+/usr/bin/ovs-tcpundump
+/usr/bin/ovs-vlan-test
+/usr/bin/ovs-vsctl
+/usr/bin/ovsdb-client
+/usr/bin/ovsdb-tool
+/usr/share/man/man1/ovsdb-client.1.gz
+/usr/share/man/man1/ovsdb-server.1.gz
+/usr/share/man/man1/ovsdb-tool.1.gz
+/usr/share/man/man5/ovs-vswitchd.conf.db.5.gz
+/usr/share/man/man8/ovs-appctl.8.gz
+/usr/share/man/man8/ovs-ctl.8.gz
+/usr/share/man/man8/ovs-dpctl.8.gz
+/usr/share/man/man8/ovs-ofctl.8.gz
+/usr/share/man/man8/ovs-parse-leaks.8.gz
+/usr/share/man/man1/ovs-pcap.1.gz
+/usr/share/man/man1/ovs-tcpundump.1.gz
+/usr/share/man/man8/ovs-vlan-test.8.gz
+/usr/share/man/man8/ovs-vsctl.8.gz
+/usr/share/man/man8/ovs-vswitchd.8.gz
+/var/lib/openvswitch
+%exclude /usr/sbin/ovs-brcompatd
+%exclude /usr/share/man/man8/ovs-brcompatd.8.gz
+%exclude /usr/share/openvswitch/python/*.py[co]
+%exclude /usr/share/openvswitch/python/ovs/*.py[co]
+%exclude /usr/share/openvswitch/python/ovs/db/*.py[co]
+
+%files %{module_package}
+/lib/modules/%{full_version}/extra/openvswitch/openvswitch_mod.ko
+%exclude /lib/modules/%{full_version}/extra/openvswitch/brcompat_mod.ko
diff --git a/rhel-5.6/usr_share_openvswitch_scripts_sysconfig.template 
b/rhel-5.6/usr_share_openvswitch_scripts_sysconfig.template
new file mode 100644
index 0000000..26543af
--- /dev/null
+++ b/rhel-5.6/usr_share_openvswitch_scripts_sysconfig.template
@@ -0,0 +1,20 @@
+### Configuration options for openvswitch
+
+# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
+
+# FORCE_COREFILES: If 'yes' then core files will be enabled.
+# FORCE_COREFILES=yes
+
+# OVSDB_SERVER_PRIORITY: "nice" priority at which to run ovsdb-server.
+#
+# OVSDB_SERVER_PRIORITY=-10
+
+# VSWITCHD_PRIORITY: "nice" priority at which to run ovs-vswitchd.
+# VSWITCHD_PRIORITY=-10
+
+# VSWITCHD_MLOCKALL: Whether to pass ovs-vswitchd the --mlockall option.
+#     This option should be set to "yes" or "no".  The default is "yes".
+#     Enabling this option can avoid networking interruptions due to
+#     system memory pressure in extraordinary situations, such as multiple
+#     concurrent VM import operations.
+# VSWITCHD_MLOCKALL=yes
-- 
1.7.4.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to