On Thu, Jul 28, 2016 at 5:09 PM, Joe Stringer <j...@ovn.org> wrote:
> 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 <j...@ovn.org>

Looks good except one comment below.

Acked-by: Pravin B Shelar <pshe...@ovn.org>


> ---
>  rhel/openvswitch-kmod-rhel6.spec.in | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/rhel/openvswitch-kmod-rhel6.spec.in 
> b/rhel/openvswitch-kmod-rhel6.spec.in
> index 5d46838a9ed5..82a3312b100f 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/openvswitch.conf
> +

is there a reason for not using "oname" variable, like it is used above?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to