forked from justinpettit/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RHEL 5/6 spec files and instructions.
- Loading branch information
Showing
12 changed files
with
792 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
How to Install Open vSwitch on Red Hat Enterprise Linux | ||
======================================================= | ||
|
||
This document describes how to build and install Open vSwitch on a Red | ||
Hat Enterprise Linux (RHEL) host. If you want to install Open vSwitch | ||
on a generic Linux host, see INSTALL.Linux instead. | ||
|
||
We have tested these instructions with RHEL 5.6 and RHEL 6.0. | ||
|
||
Building Open vSwitch for RHEL | ||
------------------------------ | ||
|
||
You may build from an Open vSwitch distribution tarball or from an | ||
Open vSwitch Git tree. | ||
|
||
Before you begin, note the RPM source directory on your version of | ||
RHEL. On RHEL 5, the default RPM source directory is | ||
/usr/src/redhat/SOURCES. On RHEL 6, it is $HOME/rpmbuild/SOURCES. | ||
|
||
1. 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. | ||
|
||
2. Copy the distribution tarball into the RPM source directory. | ||
|
||
3. Unpack the distribution tarball into a temporary directory and "cd" | ||
into the root of the distribution tarball. | ||
|
||
4. To build Open vSwitch userspace, run: | ||
|
||
rpmbuild -bb rhel/openvswitch.spec | ||
|
||
This produces two RPMs: "openvswitch" and "openvswitch-debuginfo". | ||
|
||
5a. On RHEL 5, to build the Open vSwitch kernel module, copy | ||
rhel/kmodtool-openvswitch-el5.sh into the RPM source directory and | ||
run: | ||
|
||
rpmbuild -bb --target=i686-unknown-linux \ | ||
rhel/openvswitch-kmod-rhel5.spec | ||
|
||
You might have to specify a kernel version, e.g.: | ||
|
||
rpmbuild -bb -D "kversion 2.6.18-238.12.1.el5" \ | ||
--target=i686-unknown-linux \ | ||
rhel/openvswitch-kmod-rhel5.spec | ||
|
||
This produces a "kmod-openvswitch" RPM for each kernel variant, | ||
which is usually: "kmod-openvswitch", "kmod-openvswitch-xen", and | ||
"kmod-openvswitch-PAE". | ||
|
||
5b. On RHEL 6, to build the Open vSwitch kernel module, run: | ||
|
||
rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec | ||
|
||
This produces an "kmod-openvswitch" RPM. | ||
|
||
Reporting Bugs | ||
-------------- | ||
|
||
Please report problems to [email protected]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
openvswitch-kmod-rhel5.spec | ||
openvswitch-kmod-rhel6.spec | ||
openvswitch.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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/automake.mk \ | ||
rhel/etc_init.d_openvswitch \ | ||
rhel/etc_logrotate.d_openvswitch \ | ||
rhel/kmodtool-openvswitch-el5.sh \ | ||
rhel/openvswitch-kmod-rhel5.spec \ | ||
rhel/openvswitch-kmod-rhel5.spec.in \ | ||
rhel/openvswitch-kmod-rhel6.spec \ | ||
rhel/openvswitch-kmod-rhel6.spec.in \ | ||
rhel/openvswitch.spec \ | ||
rhel/openvswitch.spec.in \ | ||
rhel/usr_share_openvswitch_scripts_sysconfig.template | ||
|
||
|
||
$(srcdir)/rhel/openvswitch-kmod-rhel5.spec: rhel/openvswitch-kmod-rhel5.spec.in $(top_builddir)/config.status | ||
sed -e 's,[@]VERSION[@],$(VERSION),g' < $< > $@ | ||
|
||
$(srcdir)/rhel/openvswitch-kmod-rhel6.spec: rhel/openvswitch-kmod-rhel6.spec.in $(top_builddir)/config.status | ||
|
||
sed -e 's,[@]VERSION[@],$(VERSION),g' < $< > $@ | ||
|
||
$(srcdir)/rhel/openvswitch.spec: rhel/openvswitch.spec.in $(top_builddir)/config.status | ||
sed -e 's,[@]VERSION[@],$(VERSION),g' < $< > $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/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 () { | ||
# Allow GRE traffic. | ||
/sbin/iptables -I INPUT -p gre -j ACCEPT | ||
|
||
set $ovs_ctl ${1-start} | ||
set "$@" --system-id=random | ||
if test X"$FORCE_COREFILES" != X; then | ||
set "$@" --force-corefiles="$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) | ||
start force-reload-kmod | ||
;; | ||
help) | ||
printf "$0 [start|stop|restart|reload|force-reload|status|version|force-reload-kmod]\n" | ||
;; | ||
*) | ||
printf "Unknown command: $1\n" | ||
exit 1 | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
Oops, something went wrong.