Message ID | 1536611611-5382-1-git-send-email-martinxu9.ovs@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [ovs-dev,v1] rhel: add build option to package ovs shared libraries, fedora | expand |
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 <martinxu9.ovs@gmail.com> > CC: Flavio Leitner <fbl@redhat.com> > --- > 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 >
On Mon, Sep 10, 2018 at 06:46:51PM -0300, Flavio Leitner wrote: > 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? Our current policy for shared libraries is that they should be ABI compatible within a given release (2.8.x, 2.9.x, etc.) but not necessarily between releases. Documentation/internals/contributing/libopenvswitch-abi.rst has details.
On Mon, Sep 10, 2018 at 02:53:54PM -0700, Ben Pfaff wrote: > On Mon, Sep 10, 2018 at 06:46:51PM -0300, Flavio Leitner wrote: > > 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? > > Our current policy for shared libraries is that they should be ABI > compatible within a given release (2.8.x, 2.9.x, etc.) but not > necessarily between releases. > > Documentation/internals/contributing/libopenvswitch-abi.rst has details. Ok, well, we are not rebasing in Fedora so that should be good enough. It's not the first time we have a request to ship the libraries, so I'd say to ship them by default. What do you think?
On Mon, Sep 10, 2018 at 08:58:37PM -0300, Flavio Leitner wrote: > On Mon, Sep 10, 2018 at 02:53:54PM -0700, Ben Pfaff wrote: > > On Mon, Sep 10, 2018 at 06:46:51PM -0300, Flavio Leitner wrote: > > > 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? > > > > Our current policy for shared libraries is that they should be ABI > > compatible within a given release (2.8.x, 2.9.x, etc.) but not > > necessarily between releases. > > > > Documentation/internals/contributing/libopenvswitch-abi.rst has details. > > Ok, well, we are not rebasing in Fedora so that should be good enough. > It's not the first time we have a request to ship the libraries, so > I'd say to ship them by default. > > What do you think? Seems fine to me. The corresponding Debian packaging includes a library package.
Thanks Ben and Flavio. I'm removing the condition around it, and have sent out a second patch. Martin On Mon, Sep 10, 2018 at 6:54 PM Ben Pfaff <blp@ovn.org> wrote: > On Mon, Sep 10, 2018 at 08:58:37PM -0300, Flavio Leitner wrote: > > On Mon, Sep 10, 2018 at 02:53:54PM -0700, Ben Pfaff wrote: > > > On Mon, Sep 10, 2018 at 06:46:51PM -0300, Flavio Leitner wrote: > > > > 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? > > > > > > Our current policy for shared libraries is that they should be ABI > > > compatible within a given release (2.8.x, 2.9.x, etc.) but not > > > necessarily between releases. > > > > > > Documentation/internals/contributing/libopenvswitch-abi.rst has > details. > > > > Ok, well, we are not rebasing in Fedora so that should be good enough. > > It's not the first time we have a request to ship the libraries, so > > I'd say to ship them by default. > > > > What do you think? > > Seems fine to me. The corresponding Debian packaging includes a library > package. >
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
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 Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com> CC: Flavio Leitner <fbl@redhat.com> --- rhel/openvswitch-fedora.spec.in | 10 ++++++++++ 1 file changed, 10 insertions(+)