It looks like for Centos6.4, there is an upstream openvswitch
kernel module already installed. When we try to install kmod-openvswitch
package from this tree's pre-1.10 branches, we get the following warning:
"brcompat.ko needs unknown symbol ovs_dp_ioctl_hook".
Also, after installing the kmod-openvswitch package, if we run
"modprobe openvswitch", the upstream kernel module gets loaded.
We should instead load the kernel module compiled from this tree.
This patch fixes both the above issues.
Bug #15829.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
which is usually: "kmod-openvswitch", "kmod-openvswitch-xen", and
"kmod-openvswitch-PAE".
which is usually: "kmod-openvswitch", "kmod-openvswitch-xen", and
"kmod-openvswitch-PAE".
-7b. On RHEL 6, to build the Open vSwitch kernel module, run:
+7b. On RHEL 6, to build the Open vSwitch kernel module, copy
+ rhel/openvswitch-kmod.files into the RPM source directory and run:
rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
rhel/openvswitch-kmod-rhel5.spec.in \
rhel/openvswitch-kmod-rhel6.spec \
rhel/openvswitch-kmod-rhel6.spec.in \
rhel/openvswitch-kmod-rhel5.spec.in \
rhel/openvswitch-kmod-rhel6.spec \
rhel/openvswitch-kmod-rhel6.spec.in \
+ rhel/openvswitch-kmod.files \
rhel/openvswitch-kmod-fedora.spec \
rhel/openvswitch-kmod-fedora.spec.in \
rhel/openvswitch.spec \
rhel/openvswitch-kmod-fedora.spec \
rhel/openvswitch-kmod-fedora.spec.in \
rhel/openvswitch.spec \
License: GPLv2
URL: http://openvswitch.org/
Source0: %{oname}-%{version}.tar.gz
License: GPLv2
URL: http://openvswitch.org/
Source0: %{oname}-%{version}.tar.gz
+Source1: %{oname}-kmod.files
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: %kernel_module_package_buildreqs
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: %kernel_module_package_buildreqs
# specified kernel variants.
%{!?kflavors:%define kflavors default}
# specified kernel variants.
%{!?kflavors:%define kflavors default}
-%kernel_module_package -n %{oname} %kflavors
+%kernel_module_package -n %{oname} -f %{SOURCE1} %kflavors
%description
Open vSwitch Linux kernel module.
%description
Open vSwitch Linux kernel module.
%prep
%setup -n %{oname}-%{version}
%prep
%setup -n %{oname}-%{version}
+cat > %{oname}.conf << EOF
+override %{oname} * extra/%{oname}
+override %{oname} * weak-updates/%{oname}
+EOF
%build
for flavor in %flavors_to_build; do
%build
for flavor in %flavors_to_build; do
make -C %{kernel_source $flavor} modules_install \
M="`pwd`"/_$flavor/datapath/linux
done
make -C %{kernel_source $flavor} modules_install \
M="`pwd`"/_$flavor/datapath/linux
done
+install -d %{buildroot}%{_sysconfdir}/depmod.d/
+install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/
%clean
rm -rf $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
--- /dev/null
+%defattr(644,root,root,755)
+/lib/modules/%2-%1
+/etc/depmod.d/openvswitch.conf