On Mon, Sep 10, 2018 at 01:33:31PM -0700, Martin Xu wrote:
> This patches extends 4886d4d2495b (debian, rhel: Ship ovs shared
> libraries and header files) to fedora, by adding support of
> '--with enabled_shared' flag to 'make rpm-fedora' command.
> By default, the shared libraries are not included in the openvswitch
> RPM. When 'with' is specified, the openvswith RPM is packaged with the
> shared library files. These files are always packaged for the RPM built
> with rhel6 spec file.
> 
> VMware-BZ: #2036847

RPM-wise this patch looks good.  But once you shipped, other projects
might use it and I believe that's exactly what you're looking for. 

However, I am not sure about the current situation with the libraries,
so if we don't have a stable API/ABI or proper versioning, there might
be unpleasant surprises for the users linking to them.

I'd say that if we are confident enough that the libraries are fine,
then just package and ship them by default, and perhaps have an option
to not to that. On the other hand, if we are not confident, then perhaps
we need to work on that first before enable and ship them?

Thanks,
fbl

 
> Signed-off-by: Martin Xu <[email protected]>
> CC: Flavio Leitner <[email protected]>
> ---
>  rhel/openvswitch-fedora.spec.in | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
> index cb7ecca..0fb7c0a 100644
> --- a/rhel/openvswitch-fedora.spec.in
> +++ b/rhel/openvswitch-fedora.spec.in
> @@ -33,6 +33,8 @@
>  # have Python 3 by default (Fedora > 22).
>  %bcond_with build_python3
>  
> +%bcond_with enable_shared
> +
>  # Enable PIE, bz#955181
>  %global _hardened_build 1
>  
> @@ -236,6 +238,9 @@ Docker network plugins for OVN.
>          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
>  %endif
>          --enable-ssl \
> +%if %{with enable_shared}
> +        --enable-shared \
> +%endif
>          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
>  %if 0%{?fedora} > 22 || %{with build_python3}
>          PYTHON3=%{__python3} \
> @@ -336,6 +341,8 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/ovs-parse-backtrace \
>          $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \
>          $RPM_BUILD_ROOT%{_mandir}/man8/ovs-vlan-bug-workaround.8
>  
> +rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib*.so
> +
>  %check
>  %if %{with check}
>      if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
> @@ -592,6 +599,9 @@ fi
>  %{_bindir}/ovs-testcontroller
>  %{_bindir}/ovs-pki
>  %{_bindir}/vtep-ctl
> +%if %{with enable_shared}
> +%{_libdir}/lib*.so.*
> +%endif
>  %{_sbindir}/ovs-bugtool
>  %{_sbindir}/ovs-vswitchd
>  %{_sbindir}/ovsdb-server
> -- 
> 1.8.3.1
> 

-- 
Flavio
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to