Message ID | 1533164459-37727-2-git-send-email-martinxu9.ovs@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,v6,1/2] rhel: support kmod build against multiple 7.2 kernels, rhel6 | expand |
On Wed, Aug 1, 2018 at 4:00 PM, Martin Xu <martinxu9.ovs@gmail.com> wrote: > 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 <martinxu9.ovs@gmail.com> > CC: Greg Rose <gvrose8192@gmail.com> > CC: Ben Pfaff <blp@ovn.org> > CC: Flavio Leitner <fbl@redhat.com> > CC: Yi-Hung Wei <yihung.wei@gmail.com> > --- Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
On Wed, Aug 01, 2018 at 04:00:59PM -0700, Martin Xu wrote: > 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 <martinxu9.ovs@gmail.com> > CC: Greg Rose <gvrose8192@gmail.com> > CC: Ben Pfaff <blp@ovn.org> > CC: Flavio Leitner <fbl@redhat.com> > CC: Yi-Hung Wei <yihung.wei@gmail.com> These patches look soooo brittle to me, so I wouldn't be surprised if at some point we need to some up with a more systematic way to handle this kind of backward-incompatible change. I applied them to master and branch-2.10 for now; if someone steps forward with a better way, I'll look at it, though. Thanks a lot! Ben
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
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 <martinxu9.ovs@gmail.com> CC: Greg Rose <gvrose8192@gmail.com> CC: Ben Pfaff <blp@ovn.org> CC: Flavio Leitner <fbl@redhat.com> CC: Yi-Hung Wei <yihung.wei@gmail.com> --- v5->v6: bug fix separated to its own patch rhel/kmod-openvswitch-rhel6.spec.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)