diff options
author | Joe Stringer <joe@ovn.org> | 2016-07-28 17:09:37 -0700 |
---|---|---|
committer | Joe Stringer <joe@ovn.org> | 2016-07-29 13:03:52 -0700 |
commit | 723a06ae3cc29a54584e1b8e6155b7973e6dabb1 (patch) | |
tree | d9852908bb4cec4b4265232364297cbb7674feb2 /rhel | |
parent | 8bdfe1313894047d44349fa4cf4402970865950f (diff) | |
download | openvswitch-723a06ae3cc29a54584e1b8e6155b7973e6dabb1.tar.gz |
rhel: Prioritize our vport-foo modules in depmod.
We've done the same for openvswitch.ko previously, but we really should
be doing this for vport modules as well; otherwise, depmod may try to
pair upstream vport modules with the out-of-tree openvswitch module
(leading to depmod warnings on package install, and failure to load the
module at runtime).
VMware-BZ: #1700293
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Diffstat (limited to 'rhel')
-rw-r--r-- | rhel/openvswitch-kmod-rhel6.spec.in | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/rhel/openvswitch-kmod-rhel6.spec.in b/rhel/openvswitch-kmod-rhel6.spec.in index 5d46838a9..8413b254f 100644 --- a/rhel/openvswitch-kmod-rhel6.spec.in +++ b/rhel/openvswitch-kmod-rhel6.spec.in @@ -43,10 +43,6 @@ 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 @@ -66,7 +62,17 @@ for flavor in %flavors_to_build ; do find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm {} \; done install -d %{buildroot}%{_sysconfdir}/depmod.d/ +for module in %{buildroot}/lib/modules/%{kernel_version}/$INSTALL_MOD_DIR/*.ko; +do + modname="$(basename ${module})" + echo "override ${modname%.ko} * extra/%{oname}" >> %{oname}.conf + echo "override ${modname%.ko} * weak-updates/%{oname}" >> %{oname}.conf +done install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/ +%files +%defattr(644,root,root) +/etc/depmod.d/%{oname}.conf + %clean rm -rf $RPM_BUILD_ROOT |