forked from pool/openvswitch
Accepting request 55634 from home:pmullaney:openvswitch
OBS-URL: https://build.opensuse.org/request/show/55634 OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=1
This commit is contained in:
commit
58f2e118c9
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
openvswitch-1.1.0.tar.bz2
Normal file
3
openvswitch-1.1.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d1e841d16998eda1b295141b0f1b31df05947149eb62988c71154ab0dfaed6c0
|
||||
size 905812
|
5
openvswitch.changes
Normal file
5
openvswitch.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 12 21:30:16 UTC 2010 - pmullaney@novell.com
|
||||
|
||||
- initial version 1.0.1
|
||||
|
196
openvswitch.spec
Normal file
196
openvswitch.spec
Normal file
@ -0,0 +1,196 @@
|
||||
# norootforbuild
|
||||
Name: openvswitch
|
||||
Summary: Utilities for configuring vswitch
|
||||
Version: 1.1.0
|
||||
License: GPL v2 or later
|
||||
Release: 0
|
||||
Group: Productivity/Networking/System
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
Requires: logrotate
|
||||
Patch0: ovs-suse.patch
|
||||
|
||||
%description
|
||||
virtual switching for the large scale data center virtualization environment
|
||||
|
||||
%package -n openvswitch-KMP
|
||||
Group: Productivity/Networking/System
|
||||
License: GPL v2 or later
|
||||
Summary: Kernel module
|
||||
Requires: kernel-default kernel-desktop
|
||||
BuildRequires: perl-base autoconf automake libtool kernel-source kernel-syms module-init-tools
|
||||
%suse_kernel_module_package ec2 xen xenpae vmi um
|
||||
BuildRequires: openssl libopenssl-devel python-base ncurses-devel pcre-devel pkg-config pcre-devel pyxml
|
||||
|
||||
%description -n openvswitch-KMP
|
||||
Kernel modules supporting the openvswitch datapath
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%patch0 -p1
|
||||
|
||||
set -- *
|
||||
mkdir source
|
||||
mv "$@" source/
|
||||
mkdir obj
|
||||
|
||||
%build
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
|
||||
pushd source
|
||||
bash -x boot.sh
|
||||
popd
|
||||
for flavor in %flavors_to_build; do
|
||||
rm -rf obj/$flavor
|
||||
cp -r source obj/$flavor
|
||||
pushd obj/$flavor
|
||||
./configure --enable-ssl=yes --with-logdir=/var/log --with-l26=/usr/src/linux-obj/%_target_cpu/$flavor --with-l26-source=/usr/src/linux
|
||||
cd datapath/linux-2.6
|
||||
make
|
||||
popd
|
||||
done
|
||||
pwd
|
||||
ls source
|
||||
pushd source
|
||||
%configure --with-logdir=/var/log
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
%install
|
||||
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
|
||||
export INSTALL_MOD_DIR=updates
|
||||
for flavor in %flavors_to_build; do
|
||||
pushd obj/$flavor/datapath/linux-2.6
|
||||
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD
|
||||
popd
|
||||
done
|
||||
pushd source
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p"
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
|
||||
install -m 755 xenserver/etc_init.d_openvswitch \
|
||||
$RPM_BUILD_ROOT/etc/init.d/openvswitch
|
||||
install -m 755 xenserver/etc_init.d_openvswitch-xapi-update \
|
||||
$RPM_BUILD_ROOT/etc/init.d/openvswitch-xapi-update
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/sysconfig
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
|
||||
install -m 644 xenserver/etc_logrotate.d_openvswitch \
|
||||
$RPM_BUILD_ROOT/etc/logrotate.d/openvswitch
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/profile.d
|
||||
install -m 644 xenserver/etc_profile.d_openvswitch.sh \
|
||||
$RPM_BUILD_ROOT/etc/profile.d/openvswitch.sh
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/xapi.d/plugins
|
||||
install -m 755 xenserver/etc_xapi.d_plugins_openvswitch-cfg-update \
|
||||
$RPM_BUILD_ROOT/etc/xapi.d/plugins/openvswitch-cfg-update
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts
|
||||
install -m 644 vswitchd/vswitch.ovsschema \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/vswitch.ovsschema
|
||||
install -m 755 xenserver/opt_xensource_libexec_interface-reconfigure \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/interface-reconfigure
|
||||
install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigure.py \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/InterfaceReconfigure.py
|
||||
install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/InterfaceReconfigureBridge.py
|
||||
install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/InterfaceReconfigureVswitch.py
|
||||
install -m 755 xenserver/etc_xensource_scripts_vif \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/vif
|
||||
install -m 755 xenserver/usr_share_openvswitch_scripts_ovs-external-ids \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-external-ids
|
||||
install -m 755 xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/refresh-xs-network-uuids
|
||||
install -m 755 xenserver/usr_sbin_xen-bugtool \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/xen-bugtool
|
||||
install -m 755 xenserver/usr_sbin_brctl \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/brctl
|
||||
install -m 644 xenserver/usr_share_openvswitch_scripts_sysconfig.template \
|
||||
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/sysconfig.template
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/xsconsole/plugins-base
|
||||
install -m 644 \
|
||||
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
|
||||
$RPM_BUILD_ROOT%{_libdir}/xsconsole/plugins-base/XSFeatureVSwitch.py
|
||||
install -m 644 xenserver/uuid.py $RPM_BUILD_ROOT%{_datadir}/openvswitch/python
|
||||
popd
|
||||
|
||||
# Get rid of stuff we don't want to make RPM happy.
|
||||
rm \
|
||||
$RPM_BUILD_ROOT%{_bindir}/ovs-controller \
|
||||
$RPM_BUILD_ROOT%{_bindir}/ovs-discover \
|
||||
$RPM_BUILD_ROOT%{_bindir}/ovs-kill \
|
||||
$RPM_BUILD_ROOT%{_bindir}/ovs-openflowd \
|
||||
$RPM_BUILD_ROOT%{_datadir}/man/man8/ovs-controller.8 \
|
||||
$RPM_BUILD_ROOT%{_datadir}/man/man8/ovs-discover.8 \
|
||||
$RPM_BUILD_ROOT%{_datadir}/man/man8/ovs-kill.8 \
|
||||
$RPM_BUILD_ROOT%{_datadir}/man/man8/ovs-openflowd.8 \
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_sysconfdir}/init.d/openvswitch
|
||||
%{_sysconfdir}/init.d/openvswitch-xapi-update
|
||||
%{_sysconfdir}/xapi.d/plugins/openvswitch-cfg-update
|
||||
%config %{_sysconfdir}/logrotate.d/openvswitch
|
||||
%config %{_sysconfdir}/profile.d/openvswitch.sh
|
||||
%dir %{_datadir}/openvswitch
|
||||
%dir %{_sysconfdir}/xapi.d
|
||||
%dir %{_sysconfdir}/xapi.d/plugins
|
||||
%{_datadir}/openvswitch/python/ovs/__init__.py
|
||||
%{_datadir}/openvswitch/python/ovs/daemon.py
|
||||
%{_datadir}/openvswitch/python/ovs/db/__init__.py
|
||||
%{_datadir}/openvswitch/python/ovs/db/data.py
|
||||
%{_datadir}/openvswitch/python/ovs/db/error.py
|
||||
%{_datadir}/openvswitch/python/ovs/db/idl.py
|
||||
%{_datadir}/openvswitch/python/ovs/db/parser.py
|
||||
%{_datadir}/openvswitch/python/ovs/db/schema.py
|
||||
%{_datadir}/openvswitch/python/ovs/db/types.py
|
||||
%{_datadir}/openvswitch/python/ovs/dirs.py
|
||||
%{_datadir}/openvswitch/python/ovs/fatal_signal.py
|
||||
%{_datadir}/openvswitch/python/ovs/json.py
|
||||
%{_datadir}/openvswitch/python/ovs/jsonrpc.py
|
||||
%{_datadir}/openvswitch/python/ovs/ovsuuid.py
|
||||
%{_datadir}/openvswitch/python/ovs/poller.py
|
||||
%{_datadir}/openvswitch/python/ovs/process.py
|
||||
%{_datadir}/openvswitch/python/ovs/reconnect.py
|
||||
%{_datadir}/openvswitch/python/ovs/socket_util.py
|
||||
%{_datadir}/openvswitch/python/ovs/stream.py
|
||||
%{_datadir}/openvswitch/python/ovs/timeval.py
|
||||
%{_datadir}/openvswitch/python/ovs/util.py
|
||||
%{_datadir}/openvswitch/python/uuid.py
|
||||
%{_datadir}/openvswitch/scripts/ovs-external-ids
|
||||
%{_datadir}/openvswitch/scripts/refresh-xs-network-uuids
|
||||
%{_datadir}/openvswitch/scripts/interface-reconfigure
|
||||
%{_datadir}/openvswitch/scripts/InterfaceReconfigure.py
|
||||
%{_datadir}/openvswitch/scripts/InterfaceReconfigureBridge.py
|
||||
%{_datadir}/openvswitch/scripts/InterfaceReconfigureVswitch.py
|
||||
%{_datadir}/openvswitch/scripts/vif
|
||||
%{_datadir}/openvswitch/scripts/xen-bugtool
|
||||
%{_datadir}/openvswitch/scripts/brctl
|
||||
%{_datadir}/openvswitch/scripts/sysconfig.template
|
||||
%{_datadir}/openvswitch/vswitch.ovsschema
|
||||
%{_sbindir}/ovs-brcompatd
|
||||
%{_sbindir}/ovs-vswitchd
|
||||
%{_sbindir}/ovsdb-server
|
||||
%{_bindir}/ovs-pki
|
||||
%{_bindir}/ovs-appctl
|
||||
%{_bindir}/ovs-dpctl
|
||||
%{_bindir}/ovs-ofctl
|
||||
%{_bindir}/ovs-vsctl
|
||||
%{_bindir}/ovsdb-client
|
||||
%{_bindir}/ovsdb-tool
|
||||
%{_libdir}/xsconsole/plugins-base/XSFeatureVSwitch.py
|
||||
%{_datadir}/man/man1/ovsdb-client.1.gz
|
||||
%{_datadir}/man/man1/ovsdb-server.1.gz
|
||||
%{_datadir}/man/man1/ovsdb-tool.1.gz
|
||||
%{_datadir}/man/man5/ovs-vswitchd.conf.db.5.gz
|
||||
%{_datadir}/man/man8/ovs-pki.8.gz
|
||||
%{_datadir}/man/man8/ovs-appctl.8.gz
|
||||
%{_datadir}/man/man8/ovs-brcompatd.8.gz
|
||||
%{_datadir}/man/man8/ovs-dpctl.8.gz
|
||||
%{_datadir}/man/man8/ovs-ofctl.8.gz
|
||||
%{_datadir}/man/man8/ovs-parse-leaks.8.gz
|
||||
%{_datadir}/man/man8/ovs-vsctl.8.gz
|
||||
%{_datadir}/man/man8/ovs-vswitchd.8.gz
|
||||
|
||||
%changelog
|
||||
# * Tue April 13 2010 pmullaney@novell.com
|
||||
# - Initial Package, Version 0.99.2
|
||||
# * Sun Sept 12 2010 pmullaney@novell.com
|
||||
# - Updated Package, Version 1.0.1
|
157
ovs-suse.patch
Normal file
157
ovs-suse.patch
Normal file
@ -0,0 +1,157 @@
|
||||
|
||||
|
||||
From: Patrick Mullaney <pm.mullaney@gmail.com>
|
||||
|
||||
|
||||
---
|
||||
|
||||
xenserver/etc_init.d_openvswitch | 87 +++++++++++++++-----------
|
||||
xenserver/etc_init.d_openvswitch-xapi-update | 9 +++
|
||||
2 files changed, 59 insertions(+), 37 deletions(-)
|
||||
|
||||
|
||||
diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
|
||||
index 5f18196..ad3fc11 100755
|
||||
--- a/xenserver/etc_init.d_openvswitch
|
||||
+++ b/xenserver/etc_init.d_openvswitch
|
||||
@@ -18,35 +18,46 @@
|
||||
# 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: vswitch
|
||||
+# Required-Start: $local_fs
|
||||
+# Required-Stop: $local_fs
|
||||
+# Default-Start: 2 3 5
|
||||
+# Default-Stop:
|
||||
+# Short-Description: vswitch
|
||||
+# Description: virtual switch
|
||||
+### END INIT INFO
|
||||
+
|
||||
+#. /etc/init.d/functions
|
||||
+# source function library
|
||||
+if [ -f /etc/init.d/functions ]; then
|
||||
+ . /etc/init.d/functions
|
||||
+elif [ -f /etc/rc.d/init.d/functions ]; then
|
||||
+ . /etc/rc.d/init.d/functions
|
||||
+elif [ -f /lib/lsb/init-functions ]; then
|
||||
+ . /lib/lsb/init-functions
|
||||
+else
|
||||
+ exit 0
|
||||
+fi
|
||||
|
||||
-. /etc/init.d/functions
|
||||
+# Ugh, SUSE doesn't implement action
|
||||
+action() {
|
||||
+ STRING=$1
|
||||
+ shift
|
||||
+ "$@"
|
||||
+ rc=$?
|
||||
+ if [ $rc -eq 0 ] ; then
|
||||
+ log_success_msg $"$STRING "
|
||||
+ else
|
||||
+ log_failure_msg $"$STRING "
|
||||
+ fi
|
||||
+ return $rc
|
||||
+}
|
||||
|
||||
-. /etc/xensource-inventory
|
||||
test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch
|
||||
|
||||
-NETWORK_MODE=$(cat /etc/xensource/network.conf)
|
||||
-case $NETWORK_MODE in
|
||||
- vswitch|openvswitch)
|
||||
- ;;
|
||||
- bridge)
|
||||
- exit 0
|
||||
- ;;
|
||||
- *)
|
||||
- echo "Open vSwitch disabled (/etc/xensource/network.conf is invalid)" >&2
|
||||
- exit 0
|
||||
- ;;
|
||||
-esac
|
||||
-
|
||||
-# General config variables in /etc/sysconfig/openvswitch
|
||||
-if test "$PRODUCT_VERSION" = "5.5.0"; then
|
||||
- # XenServer 5.5.0 needs ovs-brcompatd and /proc/net simulation.
|
||||
- : ${ENABLE_BRCOMPAT:=y}
|
||||
- : ${ENABLE_FAKE_PROC_NET:=y}
|
||||
-else
|
||||
- # Later versions don't need them.
|
||||
- : ${ENABLE_BRCOMPAT:=n}
|
||||
- : ${ENABLE_FAKE_PROC_NET:=n}
|
||||
-fi
|
||||
+: ${ENABLE_BRCOMPAT:=y}
|
||||
+: ${ENABLE_FAKE_PROC_NET:=y}
|
||||
: ${ENABLE_MONITOR:=y}
|
||||
: ${FORCE_COREFILES:=y}
|
||||
|
||||
@@ -228,7 +239,7 @@ function start_ovsdb_server {
|
||||
for remote in $OVSDB_SERVER_REMOTES; do
|
||||
set -- "$@" --remote="$remote"
|
||||
done
|
||||
- set -- "$@" --private-key=db:SSL,private_key --certificate=db:SSL,certificate --bootstrap-ca-cert=db:SSL,ca_cert
|
||||
+ #set -- "$@" --private-key=db:SSL,private_key --certificate=db:SSL,certificate --bootstrap-ca-cert=db:SSL,ca_cert
|
||||
start_daemon OVSDB_SERVER "$@"
|
||||
}
|
||||
|
||||
@@ -297,16 +308,18 @@ EOF
|
||||
}
|
||||
|
||||
function set_system_ids {
|
||||
- if [ -f /etc/xensource-inventory ]; then
|
||||
- action "Configuring Open vSwitch system IDs" true
|
||||
- $vsctl --no-wait --timeout=5 set Open_vSwitch . \
|
||||
- external-ids:system-type="$PRODUCT_BRAND" \
|
||||
- external-ids:system-version="$PRODUCT_VERSION-$BUILD_NUMBER" \
|
||||
- external-ids:system-id="$INSTALLATION_UUID" \
|
||||
- external-ids:xs-system-uuid="$INSTALLATION_UUID"
|
||||
+ if [ -f /etc/openvswitch/install_uuid.conf ]; then
|
||||
+ . /etc/openvswitch/install_uuid.conf
|
||||
else
|
||||
- action "Configuring Open vSwitch system IDs" false
|
||||
+ INSTALLATION_UUID=`uuidgen`
|
||||
+ echo "INSTALLATION_UUID=$INSTALLATION_UUID" > /etc/openvswitch/install_uuid.conf
|
||||
fi
|
||||
+ action "Configuring Open vSwitch system IDs" true
|
||||
+# external-ids:system-type="$PRODUCT_BRAND" \
|
||||
+# external-ids:system-version="$PRODUCT_VERSION-$BUILD_NUMBER" \
|
||||
+ $vsctl --no-wait --timeout=5 set Open_vSwitch . \
|
||||
+ external-ids:system-id="$INSTALLATION_UUID" \
|
||||
+ external-ids:xs-system-uuid="$INSTALLATION_UUID"
|
||||
}
|
||||
|
||||
function start {
|
||||
@@ -351,9 +364,9 @@ function start {
|
||||
fi
|
||||
|
||||
# Start daemon to monitor external ids
|
||||
- PYTHONPATH=/usr/share/openvswitch/python \
|
||||
- /usr/share/openvswitch/scripts/ovs-external-ids \
|
||||
- --pidfile --detach $monitor_opt "$VSWITCHD_OVSDB_SERVER"
|
||||
+# PYTHONPATH=/usr/share/openvswitch/python \
|
||||
+# /usr/share/openvswitch/scripts/ovs-external-ids \
|
||||
+# --pidfile --detach $monitor_opt "$VSWITCHD_OVSDB_SERVER"
|
||||
|
||||
touch /var/lock/subsys/openvswitch
|
||||
}
|
||||
diff --git a/xenserver/etc_init.d_openvswitch-xapi-update b/xenserver/etc_init.d_openvswitch-xapi-update
|
||||
index bc62ba2..e2e8e98 100755
|
||||
--- a/xenserver/etc_init.d_openvswitch-xapi-update
|
||||
+++ b/xenserver/etc_init.d_openvswitch-xapi-update
|
||||
@@ -18,6 +18,15 @@
|
||||
# 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-api-update
|
||||
+# Required-Start: $network $remote_fs
|
||||
+# Required-Stop: $network
|
||||
+# Default-Start: 3 5
|
||||
+# Default-Stop:
|
||||
+# Short-Description: openvswitch-api-update
|
||||
+# Description: virtual switch-api-update
|
||||
+### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user