Re: [ovs-dev] [PATCH v6 2/2] rhel: bug fix kmod spec file, rhel6

2018-08-03 Thread Ben Pfaff
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 
> CC: Greg Rose 
> CC: Ben Pfaff 
> CC: Flavio Leitner 
> CC: Yi-Hung Wei 

These patches look s 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
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v6 2/2] rhel: bug fix kmod spec file, rhel6

2018-08-01 Thread Yi-Hung Wei
On Wed, Aug 1, 2018 at 4:00 PM, 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 
> CC: Greg Rose 
> CC: Ben Pfaff 
> CC: Flavio Leitner 
> CC: Yi-Hung Wei 
> ---

Acked-by: Yi-Hung Wei 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 2/2] rhel: bug fix kmod spec file, rhel6

2018-08-01 Thread Martin Xu
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 
CC: Greg Rose 
CC: Ben Pfaff 
CC: Flavio Leitner 
CC: Yi-Hung Wei 
---
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
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev