# without warranty of any kind.
# When building, the rpmbuild command line should define
-# openvswitch_version, kernel_name, kernel_version, kernel_flavor,
-# and build_number using -D arguments.
+# openvswitch_version, kernel_name, kernel_version, and kernel_flavor
+# using -D arguments.
# for example:
#
# rpmbuild -D "openvswitch_version 1.1.0+build123"
# -D "kernel_name NAME-xen"
# -D "kernel_version 2.6.32.12-0.7.1.xs5.6.100.323.170596"
# -D "kernel_flavor xen"
-# -D "build_number --with-build-number=123"
# -bb /usr/src/redhat/SPECS/openvswitch-xen.spec
%if %{?openvswitch_version:0}%{!?openvswitch_version:1}
Release: 1
Source: openvswitch-%{openvswitch_version}.tar.gz
Buildroot: /tmp/openvswitch-xen-rpm
-Requires: openvswitch_mod.ko.%{module_abi_version}
+Requires: openvswitch.ko.%{module_abi_version}
%description
Open vSwitch provides standard network bridging functions augmented with
Summary: Open vSwitch kernel module
Group: System Environment/Kernel
License: GPLv2
-Provides: %{name}-modules-%{kernel_flavor} = %{kernel_version}, openvswitch_mod.ko.%{module_abi_version}
+Provides: %{name}-modules-%{kernel_flavor} = %{kernel_version}, openvswitch.ko.%{module_abi_version}
Requires: kernel-%{kernel_name} = %{kernel_version}
%description %{module_package}
%setup -q -n openvswitch-%{openvswitch_version}
%build
-./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --with-linux=/lib/modules/%{xen_version}/build --enable-ssl %{?build_number}
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --with-linux=/lib/modules/%{xen_version}/build --enable-ssl
make %{_smp_mflags}
%install
replace_files=$scripts
printf "\nVerified host scripts from XenServer 6.0.0.\n"
;;
+
+ c5f48246577a17cf1b971fb5ce4e920b,2e2c912f86f9c536c89adc34ff3c2b2b,28d3ff72d72bdec4f37d70699f5edb76,67e1d0af16fc1ddf10009c5c063ad2ba,f3feff30aa3b3f8b514664a96a8dc0ab)
+ keep_files=
+ replace_files=$scripts
+ printf "\nVerified host scripts from XenServer 5.6-SP2.\n"
+ ;;
c5f48246577a17cf1b971fb5ce4e920b,2e2c912f86f9c536c89adc34ff3c2b2b,28d3ff72d72bdec4f37d70699f5edb76,67e1d0af16fc1ddf10009c5c063ad2ba,24bae6906d182ba47668174f8e480cc6)
keep_files=
# Ensure all required services are set to run
for s in openvswitch openvswitch-xapi-update; do
if chkconfig --list $s >/dev/null 2>&1; then
- chkconfig --del $s || printf "Could not remove $s init script."
+ chkconfig --del $s || printf "Could not remove $s init script.\n"
fi
- chkconfig --add $s || printf "Could not add $s init script."
- chkconfig $s on || printf "Could not enable $s init script."
+ chkconfig --add $s || printf "Could not add $s init script.\n"
+ chkconfig $s on || printf "Could not enable $s init script.\n"
done
if [ "$1" = "1" ]; then # $1 = 1 for install
printf "\nThe server is not configured to run Open vSwitch. To run in\n"
printf "vswitch mode, you must run the following command:\n\n"
printf "\txe-switch-network-backend vswitch"
- else
- printf "\nTo use the new Open vSwitch install, you should reboot the\n"
- printf "server now. Failure to do so may result in incorrect operation."
+ printf "\n\n"
fi
-
- printf "\n\n"
fi
%posttrans %{module_package}
# be removed.
depmod %{xen_version}
+mode=$(cat /etc/xensource/network.conf)
+if [ "$mode" = "vswitch" ] || [ "$mode" = "openvswitch" ]; then
+ printf "\nTo use the newly installed Open vSwitch kernel module, you\n"
+ printf "will either have to reboot the hypervisor or follow any\n"
+ printf "workarounds provided by your administration guide. Failure to do\n"
+ printf "so may result in incorrect operation."
+ printf "\n\n"
+fi
+
%preun
if [ "$1" = "0" ]; then # $1 = 0 for uninstall
# Configure system to use bridge
%exclude /usr/share/openvswitch/python/ovs/db/*.py[co]
%files %{module_package}
-/lib/modules/%{xen_version}/extra/openvswitch/openvswitch_mod.ko
-%exclude /lib/modules/%{xen_version}/extra/openvswitch/brcompat_mod.ko
+/lib/modules/%{xen_version}/extra/openvswitch/openvswitch.ko
+%exclude /lib/modules/%{xen_version}/extra/openvswitch/brcompat.ko