# bump this when breaking compatibility with userspace
%define module_abi_version 0
-# extract kernel type (xen or kdump)
-%define binsuffix -%(echo '%{xen_version}' | sed -r 's/^.*[0-9]+//')
-# kernel version string w/o kernel type
-%define kernel_version %(echo '%{xen_version}' | sed -r 's/[a-z]+$//')
# build-supplemental-pack.sh requires this naming for kernel module packages
%define module_package modules-%{kernel_flavor}-%{kernel_version}
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
$RPM_BUILD_ROOT/usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py
-install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/extra/openvswitch
-find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/extra/openvswitch \;
+install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/extra/openvswitch
+find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_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.
if [ "$1" = "1" ]; then # $1 = 2 for upgrade
# Configure system to use Open vSwitch
- echo vswitch > /etc/xensource/network.conf
-
- printf "\nYou MUST reboot the server NOW to complete the change to\n"
- printf "Open vSwitch. Attempts to modify networking on the server\n"
- printf "or any hosted VM will fail until after the reboot and could\n"
- printf "leave the server in a state requiring manual recovery.\n\n"
+ xe-switch-network-backend vswitch
else
mode=$(cat /etc/xensource/network.conf)
rm -f /etc/openvswitch/conf.db
rm -f /etc/sysconfig/openvswitch
rm -f /etc/openvswitch/vswitchd.cacert
- rm -f /var/xapi/network.dbcache
# Remove saved XenServer scripts directory, but only if it's empty
rmdir -p /usr/lib/openvswitch/xs-saved 2>/dev/null
# Configure system to use bridge
- echo bridge > /etc/xensource/network.conf
-
- 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"
- printf "could leave the server in a state requiring manual recovery.\n\n"
+ xe-switch-network-backend bridge
fi
%files
%exclude /usr/share/openvswitch/python/ovs/db/*.py[co]
%files %{module_package}
-/lib/modules/%{xen_version}/kernel/extra/openvswitch/openvswitch_mod.ko
-%exclude /lib/modules/%{xen_version}/kernel/extra/openvswitch/brcompat_mod.ko
+/lib/modules/%{xen_version}/extra/openvswitch/openvswitch_mod.ko
+%exclude /lib/modules/%{xen_version}/extra/openvswitch/brcompat_mod.ko