This patch fixes a scenario not working for RHEL7.3 in commit 89dd5819cf18. When multiple versions passed into the kversion for the spec file, the variable is used as is for the kernel module paths for command weak-modules --add-modules. Then the modules cannot be found.
Fixes: 89dd5819cf18 (rhel: support kmod-openvswitch build against multiple kernels, rhel6) Signed-off-by: Martin Xu <[email protected]> CC: Greg Rose <[email protected]> CC: Ben Pfaff <[email protected]> CC: Flavio Leitner <[email protected]> CC: Yi-Hung Wei <[email protected]> --- v5->v6: bug fix separated to its own patch rhel/kmod-openvswitch-rhel6.spec.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rhel/kmod-openvswitch-rhel6.spec.in b/rhel/kmod-openvswitch-rhel6.spec.in index 7ca4853..afbad96 100644 --- a/rhel/kmod-openvswitch-rhel6.spec.in +++ b/rhel/kmod-openvswitch-rhel6.spec.in @@ -98,10 +98,8 @@ else [ -d "/lib/modules/$k/kernel/" ] && depmod -a "$k" done if [ -x "/sbin/weak-modules" ]; then - for m in openvswitch vport-gre vport-stt vport-geneve \ - vport-lisp vport-vxlan; do - echo "/lib/modules/%{kversion}/extra/%{oname}/$m.ko" - done | /sbin/weak-modules --add-modules + rpm -ql kmod-%{oname} | grep '\.ko$' | \ + /sbin/weak-modules --add-modules fi fi -- 1.8.3.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
