Group: System Environment/Daemons
URL: http://www.openvswitch.org/
Version: %{vswitch_version}
-License: GPL3
+
+# The entire source code is ASL 2.0 except datapath/ which is GPLv2
+License: ASL 2.0 and GPLv2
Release: 1
Source: openvswitch-%{vswitch_version}.tar.gz
Buildroot: /tmp/vswitch-xen-rpm
$RPM_BUILD_ROOT%{_prefix}/scripts/vif
install -m 755 xenserver/root_vswitch_scripts_dump-vif-details \
$RPM_BUILD_ROOT%{_prefix}/scripts/dump-vif-details
+install -m 755 xenserver/usr_sbin_xen-bugtool \
+ $RPM_BUILD_ROOT%{_prefix}/scripts/xen-bugtool
install -m 644 \
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
$RPM_BUILD_ROOT%{_prefix}/scripts/XSFeatureVSwitch.py
if ! md5sum -c --status <<EOF
b8e9835862ef1a9cec2a3f477d26c989 /etc/xensource/scripts/vif
51970ad613a3996d5997e18e44db47da /opt/xensource/libexec/interface-reconfigure
+5654c8c36699fcc8744ca9cd5b855414 /usr/sbin/xen-bugtool
EOF
then
printf "\nThe original XenServer scripts replaced by this package\n"
fi
%post
-source /etc/xensource-inventory
-
if grep -F net.ipv4.conf.all.arp_filter /etc/sysctl.conf >/dev/null 2>&1; then :; else
cat >>/etc/sysctl.conf <<EOF
# This works around an issue in xhad, which binds to a particular
EOF
fi
-xe host-param-set \
- "other-config:vSwitchVersion=%{version}" uuid="$INSTALLATION_UUID" ||
- echo "Could not set vSwitchVersion config parameter"
-
# Ensure ovs-vswitchd.conf exists
touch /etc/ovs-vswitchd.conf
|| printf "Could not create script backup directory.\n"
for f in \
/opt/xensource/libexec/interface-reconfigure \
- /etc/xensource/scripts/vif
+ /etc/xensource/scripts/vif \
+ /usr/sbin/xen-bugtool
do
s=$(basename "$f")
t=$(readlink "$f")
# Restore original XenServer scripts
for f in \
/opt/xensource/libexec/interface-reconfigure \
- /etc/xensource/scripts/vif
+ /etc/xensource/scripts/vif \
+ /usr/sbin/xen-bugtool
do
s=$(basename "$f")
if [ ! -f "%{_prefix}/xs-original/$s" ]; then
rm -f /var/log/vswitch*
rm -f /etc/ovs-vswitchd.cacert
- if [ ! -f /etc/xensource-inventory ]; then
- printf "XenSource inventory not present in /etc/xensource-inventory\n"
- printf "Could not remove vSwitchVersion from XAPI database.\n"
- exit 1
- else
- source /etc/xensource-inventory
- xe host-param-remove \
- param-name=other-config param-key=vSwitchVersion \
- uuid="$INSTALLATION_UUID" ||
- echo "Could not clear vSwitchVersion config parameter."
- fi
-
printf "\nYou MUST reboot the server now to complete the change to\n"
printf "standard Xen networking. Attempts to modify networking on the\n"
printf "server or any hosted VM will fail until after the reboot and\n"
/root/vswitch/scripts/dump-vif-details
/root/vswitch/scripts/interface-reconfigure
/root/vswitch/scripts/vif
+/root/vswitch/scripts/xen-bugtool
/root/vswitch/scripts/XSFeatureVSwitch.py
# Following two files are generated automatically by rpm. We don't
# really need them and they won't be used on the XenServer, but there