rhel: Add depmod.d conf file for rhel6 kmod package.
authorGurucharan Shetty <gshetty@nicira.com>
Sun, 31 Mar 2013 01:32:25 +0000 (18:32 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 3 Apr 2013 20:12:59 +0000 (13:12 -0700)
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>
INSTALL.RHEL
rhel/automake.mk
rhel/openvswitch-kmod-rhel6.spec.in
rhel/openvswitch-kmod.files [new file with mode: 0644]

index 874d337..eaa2e7c 100644 (file)
@@ -85,7 +85,8 @@ RHEL.  On RHEL 5, the default RPM source directory is
     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
 
index 3bdc4ce..7bc8520 100644 (file)
@@ -17,6 +17,7 @@ EXTRA_DIST += \
        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 \
index d9aeff0..6dbb377 100644 (file)
@@ -19,6 +19,7 @@ Group:          System/Kernel
 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
 
@@ -34,7 +35,7 @@ BuildRequires:  %kernel_module_package_buildreqs
 # 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.
@@ -42,6 +43,10 @@ Open vSwitch Linux kernel module.
 %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
@@ -57,6 +62,8 @@ for flavor in %flavors_to_build ; do
          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
diff --git a/rhel/openvswitch-kmod.files b/rhel/openvswitch-kmod.files
new file mode 100644 (file)
index 0000000..357c2e8
--- /dev/null
@@ -0,0 +1,3 @@
+%defattr(644,root,root,755)
+/lib/modules/%2-%1
+/etc/depmod.d/openvswitch.conf