diff mbox series

[ovs-dev,v2] rhel: Ship ovs shared libraries, fedora

Message ID 1536691499-77241-1-git-send-email-martinxu9.ovs@gmail.com
State Superseded
Headers show
Series [ovs-dev,v2] rhel: Ship ovs shared libraries, fedora | expand

Commit Message

Martin Xu Sept. 11, 2018, 6:44 p.m. UTC
This patch extends 4886d4d2495b (debian, rhel: Ship ovs shared libraries
and header files) to fedora, by packaging the shared libraries in
openvswitch RPM. These files are always packaged in 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>
---
v1->v2: change from conditional to always ship share libraries

 rhel/openvswitch-fedora.spec.in | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Flavio Leitner Sept. 11, 2018, 7:14 p.m. UTC | #1
On Tue, Sep 11, 2018 at 11:44:59AM -0700, Martin Xu wrote:
> This patch extends 4886d4d2495b (debian, rhel: Ship ovs shared libraries
> and header files) to fedora, by packaging the shared libraries in
> openvswitch RPM. These files are always packaged in 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>
> ---
> v1->v2: change from conditional to always ship share libraries
> 
>  rhel/openvswitch-fedora.spec.in | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
> index cb7ecca..91d6472 100644
> --- a/rhel/openvswitch-fedora.spec.in
> +++ b/rhel/openvswitch-fedora.spec.in
> @@ -236,6 +236,7 @@ Docker network plugins for OVN.
>          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
>  %endif
>          --enable-ssl \
> +        --enable-shared \
>          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
>  %if 0%{?fedora} > 22 || %{with build_python3}
>          PYTHON3=%{__python3} \
> @@ -336,6 +337,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

I think those should be part of the -devel subpackage.

fbl

> +
>  %check
>  %if %{with check}
>      if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
> @@ -592,6 +595,7 @@ fi
>  %{_bindir}/ovs-testcontroller
>  %{_bindir}/ovs-pki
>  %{_bindir}/vtep-ctl
> +%{_libdir}/lib*.so.*
>  %{_sbindir}/ovs-bugtool
>  %{_sbindir}/ovs-vswitchd
>  %{_sbindir}/ovsdb-server
> -- 
> 1.8.3.1
>
Martin Xu Sept. 11, 2018, 7:33 p.m. UTC | #2
Hi Flavio,

I must have misread the suggestions there. The intention of the v1 patch
was to package the shared libraries in openvswitch RPM. The rhel6 spec file
seems to have packaged those shared libraries into both openvswitch and
openvswitch-devel. I don't know the history how it came along. We currently
use the rhel6 spec file to build RPMs at VMware. Since it's also packaged
in the openvswitch RPM, we've been installing only the openvswitch and the
kmod RPMs for RHEL. Didn't need the openvswitch-devel package. I was hoping
to keep it the same way when we migrate to using fedora spec files. I guess
whoever is currently using he fedora spec file might not need the shared
libraries, so better make it optional than always. So that was the v1 patch.

Martin

On Tue, Sep 11, 2018 at 12:14 PM Flavio Leitner <fbl@redhat.com> wrote:

> On Tue, Sep 11, 2018 at 11:44:59AM -0700, Martin Xu wrote:
> > This patch extends 4886d4d2495b (debian, rhel: Ship ovs shared libraries
> > and header files) to fedora, by packaging the shared libraries in
> > openvswitch RPM. These files are always packaged in 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>
> > ---
> > v1->v2: change from conditional to always ship share libraries
> >
> >  rhel/openvswitch-fedora.spec.in | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> openvswitch-fedora.spec.in
> > index cb7ecca..91d6472 100644
> > --- a/rhel/openvswitch-fedora.spec.in
> > +++ b/rhel/openvswitch-fedora.spec.in
> > @@ -236,6 +236,7 @@ Docker network plugins for OVN.
> >          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
> >  %endif
> >          --enable-ssl \
> > +        --enable-shared \
> >          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> >  %if 0%{?fedora} > 22 || %{with build_python3}
> >          PYTHON3=%{__python3} \
> > @@ -336,6 +337,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
>
> I think those should be part of the -devel subpackage.
>
> fbl
>
> > +
> >  %check
> >  %if %{with check}
> >      if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
> > @@ -592,6 +595,7 @@ fi
> >  %{_bindir}/ovs-testcontroller
> >  %{_bindir}/ovs-pki
> >  %{_bindir}/vtep-ctl
> > +%{_libdir}/lib*.so.*
> >  %{_sbindir}/ovs-bugtool
> >  %{_sbindir}/ovs-vswitchd
> >  %{_sbindir}/ovsdb-server
> > --
> > 1.8.3.1
> >
>
> --
> Flavio
>
Flavio Leitner Sept. 11, 2018, 7:58 p.m. UTC | #3
On Tue, Sep 11, 2018 at 12:33:06PM -0700, Martin Xu wrote:
> Hi Flavio,
> 
> I must have misread the suggestions there. The intention of the v1 patch
> was to package the shared libraries in openvswitch RPM. The rhel6 spec file
> seems to have packaged those shared libraries into both openvswitch and
> openvswitch-devel. I don't know the history how it came along. We currently
> use the rhel6 spec file to build RPMs at VMware. Since it's also packaged
> in the openvswitch RPM, we've been installing only the openvswitch and the
> kmod RPMs for RHEL. Didn't need the openvswitch-devel package. I was hoping
> to keep it the same way when we migrate to using fedora spec files. I guess
> whoever is currently using he fedora spec file might not need the shared
> libraries, so better make it optional than always. So that was the v1 patch.

When it is '*.so.*' like you added below, then those libraries are used by
the installed binaries. That's what you need at runtime.

The '*.so' might be symlinks or real files and the purpose is to allow
development. That's why these files are part of -devel subpackage.

Fedora ships both, like you see in rhel-6.

fbl

> 
> Martin
> 
> On Tue, Sep 11, 2018 at 12:14 PM Flavio Leitner <fbl@redhat.com> wrote:
> 
> > On Tue, Sep 11, 2018 at 11:44:59AM -0700, Martin Xu wrote:
> > > This patch extends 4886d4d2495b (debian, rhel: Ship ovs shared libraries
> > > and header files) to fedora, by packaging the shared libraries in
> > > openvswitch RPM. These files are always packaged in 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>
> > > ---
> > > v1->v2: change from conditional to always ship share libraries
> > >
> > >  rhel/openvswitch-fedora.spec.in | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> > openvswitch-fedora.spec.in
> > > index cb7ecca..91d6472 100644
> > > --- a/rhel/openvswitch-fedora.spec.in
> > > +++ b/rhel/openvswitch-fedora.spec.in
> > > @@ -236,6 +236,7 @@ Docker network plugins for OVN.
> > >          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
> > >  %endif
> > >          --enable-ssl \
> > > +        --enable-shared \
> > >          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> > >  %if 0%{?fedora} > 22 || %{with build_python3}
> > >          PYTHON3=%{__python3} \
> > > @@ -336,6 +337,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
> >
> > I think those should be part of the -devel subpackage.
> >
> > fbl
> >
> > > +
> > >  %check
> > >  %if %{with check}
> > >      if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
> > > @@ -592,6 +595,7 @@ fi
> > >  %{_bindir}/ovs-testcontroller
> > >  %{_bindir}/ovs-pki
> > >  %{_bindir}/vtep-ctl
> > > +%{_libdir}/lib*.so.*
> > >  %{_sbindir}/ovs-bugtool
> > >  %{_sbindir}/ovs-vswitchd
> > >  %{_sbindir}/ovsdb-server
> > > --
> > > 1.8.3.1
> > >
> >
> > --
> > Flavio
> >
Martin Xu Sept. 11, 2018, 9:40 p.m. UTC | #4
Hi Flavio,

I don't see the lib*.so packaged in either fedora subpackage. I guess I
might have missed some configurations when I build. Do you mind pointing me
to it? I'd rather use the already shipped version than adding a new patch,
of course. Thanks!

Martin

On Tue, Sep 11, 2018 at 12:58 PM Flavio Leitner <fbl@redhat.com> wrote:

> On Tue, Sep 11, 2018 at 12:33:06PM -0700, Martin Xu wrote:
> > Hi Flavio,
> >
> > I must have misread the suggestions there. The intention of the v1 patch
> > was to package the shared libraries in openvswitch RPM. The rhel6 spec
> file
> > seems to have packaged those shared libraries into both openvswitch and
> > openvswitch-devel. I don't know the history how it came along. We
> currently
> > use the rhel6 spec file to build RPMs at VMware. Since it's also packaged
> > in the openvswitch RPM, we've been installing only the openvswitch and
> the
> > kmod RPMs for RHEL. Didn't need the openvswitch-devel package. I was
> hoping
> > to keep it the same way when we migrate to using fedora spec files. I
> guess
> > whoever is currently using he fedora spec file might not need the shared
> > libraries, so better make it optional than always. So that was the v1
> patch.
>
> When it is '*.so.*' like you added below, then those libraries are used by
> the installed binaries. That's what you need at runtime.
>
> The '*.so' might be symlinks or real files and the purpose is to allow
> development. That's why these files are part of -devel subpackage.
>
> Fedora ships both, like you see in rhel-6.
>
> fbl
>
> >
> > Martin
> >
> > On Tue, Sep 11, 2018 at 12:14 PM Flavio Leitner <fbl@redhat.com> wrote:
> >
> > > On Tue, Sep 11, 2018 at 11:44:59AM -0700, Martin Xu wrote:
> > > > This patch extends 4886d4d2495b (debian, rhel: Ship ovs shared
> libraries
> > > > and header files) to fedora, by packaging the shared libraries in
> > > > openvswitch RPM. These files are always packaged in 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>
> > > > ---
> > > > v1->v2: change from conditional to always ship share libraries
> > > >
> > > >  rhel/openvswitch-fedora.spec.in | 4 ++++
> > > >  1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> > > openvswitch-fedora.spec.in
> > > > index cb7ecca..91d6472 100644
> > > > --- a/rhel/openvswitch-fedora.spec.in
> > > > +++ b/rhel/openvswitch-fedora.spec.in
> > > > @@ -236,6 +236,7 @@ Docker network plugins for OVN.
> > > >          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
> > > >  %endif
> > > >          --enable-ssl \
> > > > +        --enable-shared \
> > > >          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> > > >  %if 0%{?fedora} > 22 || %{with build_python3}
> > > >          PYTHON3=%{__python3} \
> > > > @@ -336,6 +337,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
> > >
> > > I think those should be part of the -devel subpackage.
> > >
> > > fbl
> > >
> > > > +
> > > >  %check
> > > >  %if %{with check}
> > > >      if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then
> :;
> > > > @@ -592,6 +595,7 @@ fi
> > > >  %{_bindir}/ovs-testcontroller
> > > >  %{_bindir}/ovs-pki
> > > >  %{_bindir}/vtep-ctl
> > > > +%{_libdir}/lib*.so.*
> > > >  %{_sbindir}/ovs-bugtool
> > > >  %{_sbindir}/ovs-vswitchd
> > > >  %{_sbindir}/ovsdb-server
> > > > --
> > > > 1.8.3.1
> > > >
> > >
> > > --
> > > Flavio
> > >
>
> --
> Flavio
>
Flavio Leitner Sept. 11, 2018, 10:04 p.m. UTC | #5
On Tue, Sep 11, 2018 at 02:40:05PM -0700, Martin Xu wrote:
> Hi Flavio,
> 
> I don't see the lib*.so packaged in either fedora subpackage. I guess I
> might have missed some configurations when I build. Do you mind pointing me
> to it? I'd rather use the already shipped version than adding a new patch,
> of course. Thanks!

It's not today, if you are talking about OVS, because you removed the
files instead of adding them to the -devel subpackage.

See below the two new entries in the %files sections.
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index cb7eccae1..9fc2cb9e0 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -236,6 +236,7 @@ Docker network plugins for OVN.
         --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
 %endif
         --enable-ssl \
+        --enable-shared \
         --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
 %if 0%{?fedora} > 22 || %{with build_python3}
         PYTHON3=%{__python3} \
@@ -536,6 +537,7 @@ fi
 %{python2_sitelib}/ovstest
 
 %files devel
+%{_libdir}/lib*.so
 %{_libdir}/*.a
 %{_libdir}/*.la
 %{_libdir}/pkgconfig/*.pc
@@ -595,6 +597,7 @@ fi
 %{_sbindir}/ovs-bugtool
 %{_sbindir}/ovs-vswitchd
 %{_sbindir}/ovsdb-server
+%{_libdir}/lib*.so.*
 %{_mandir}/man1/ovsdb-client.1*
 %{_mandir}/man1/ovsdb-server.1*
 %{_mandir}/man1/ovsdb-tool.1*

> 
> Martin
> 
> On Tue, Sep 11, 2018 at 12:58 PM Flavio Leitner <fbl@redhat.com> wrote:
> 
> > On Tue, Sep 11, 2018 at 12:33:06PM -0700, Martin Xu wrote:
> > > Hi Flavio,
> > >
> > > I must have misread the suggestions there. The intention of the v1 patch
> > > was to package the shared libraries in openvswitch RPM. The rhel6 spec
> > file
> > > seems to have packaged those shared libraries into both openvswitch and
> > > openvswitch-devel. I don't know the history how it came along. We
> > currently
> > > use the rhel6 spec file to build RPMs at VMware. Since it's also packaged
> > > in the openvswitch RPM, we've been installing only the openvswitch and
> > the
> > > kmod RPMs for RHEL. Didn't need the openvswitch-devel package. I was
> > hoping
> > > to keep it the same way when we migrate to using fedora spec files. I
> > guess
> > > whoever is currently using he fedora spec file might not need the shared
> > > libraries, so better make it optional than always. So that was the v1
> > patch.
> >
> > When it is '*.so.*' like you added below, then those libraries are used by
> > the installed binaries. That's what you need at runtime.
> >
> > The '*.so' might be symlinks or real files and the purpose is to allow
> > development. That's why these files are part of -devel subpackage.
> >
> > Fedora ships both, like you see in rhel-6.
> >
> > fbl
> >
> > >
> > > Martin
> > >
> > > On Tue, Sep 11, 2018 at 12:14 PM Flavio Leitner <fbl@redhat.com> wrote:
> > >
> > > > On Tue, Sep 11, 2018 at 11:44:59AM -0700, Martin Xu wrote:
> > > > > This patch extends 4886d4d2495b (debian, rhel: Ship ovs shared
> > libraries
> > > > > and header files) to fedora, by packaging the shared libraries in
> > > > > openvswitch RPM. These files are always packaged in 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>
> > > > > ---
> > > > > v1->v2: change from conditional to always ship share libraries
> > > > >
> > > > >  rhel/openvswitch-fedora.spec.in | 4 ++++
> > > > >  1 file changed, 4 insertions(+)
> > > > >
> > > > > diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> > > > openvswitch-fedora.spec.in
> > > > > index cb7ecca..91d6472 100644
> > > > > --- a/rhel/openvswitch-fedora.spec.in
> > > > > +++ b/rhel/openvswitch-fedora.spec.in
> > > > > @@ -236,6 +236,7 @@ Docker network plugins for OVN.
> > > > >          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
> > > > >  %endif
> > > > >          --enable-ssl \
> > > > > +        --enable-shared \
> > > > >          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> > > > >  %if 0%{?fedora} > 22 || %{with build_python3}
> > > > >          PYTHON3=%{__python3} \
> > > > > @@ -336,6 +337,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
> > > >
> > > > I think those should be part of the -devel subpackage.
> > > >
> > > > fbl
> > > >
> > > > > +
> > > > >  %check
> > > > >  %if %{with check}
> > > > >      if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then
> > :;
> > > > > @@ -592,6 +595,7 @@ fi
> > > > >  %{_bindir}/ovs-testcontroller
> > > > >  %{_bindir}/ovs-pki
> > > > >  %{_bindir}/vtep-ctl
> > > > > +%{_libdir}/lib*.so.*
> > > > >  %{_sbindir}/ovs-bugtool
> > > > >  %{_sbindir}/ovs-vswitchd
> > > > >  %{_sbindir}/ovsdb-server
> > > > > --
> > > > > 1.8.3.1
> > > > >
> > > >
> > > > --
> > > > Flavio
> > > >
> >
> > --
> > Flavio
> >
Martin Xu Sept. 12, 2018, 7:44 p.m. UTC | #6
Thanks for the clarification. Sorry I was confused for a bit. Sent out the
v3 patch.

Martin

On Tue, Sep 11, 2018 at 3:04 PM Flavio Leitner <fbl@redhat.com> wrote:

> On Tue, Sep 11, 2018 at 02:40:05PM -0700, Martin Xu wrote:
> > Hi Flavio,
> >
> > I don't see the lib*.so packaged in either fedora subpackage. I guess I
> > might have missed some configurations when I build. Do you mind pointing
> me
> > to it? I'd rather use the already shipped version than adding a new
> patch,
> > of course. Thanks!
>
> It's not today, if you are talking about OVS, because you removed the
> files instead of adding them to the -devel subpackage.
>
> See below the two new entries in the %files sections.
> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> openvswitch-fedora.spec.in
> index cb7eccae1..9fc2cb9e0 100644
> --- a/rhel/openvswitch-fedora.spec.in
> +++ b/rhel/openvswitch-fedora.spec.in
> @@ -236,6 +236,7 @@ Docker network plugins for OVN.
>          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
>  %endif
>          --enable-ssl \
> +        --enable-shared \
>          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
>  %if 0%{?fedora} > 22 || %{with build_python3}
>          PYTHON3=%{__python3} \
> @@ -536,6 +537,7 @@ fi
>  %{python2_sitelib}/ovstest
>
>  %files devel
> +%{_libdir}/lib*.so
>  %{_libdir}/*.a
>  %{_libdir}/*.la
>  %{_libdir}/pkgconfig/*.pc
> @@ -595,6 +597,7 @@ fi
>  %{_sbindir}/ovs-bugtool
>  %{_sbindir}/ovs-vswitchd
>  %{_sbindir}/ovsdb-server
> +%{_libdir}/lib*.so.*
>  %{_mandir}/man1/ovsdb-client.1*
>  %{_mandir}/man1/ovsdb-server.1*
>  %{_mandir}/man1/ovsdb-tool.1*
>
> >
> > Martin
> >
> > On Tue, Sep 11, 2018 at 12:58 PM Flavio Leitner <fbl@redhat.com> wrote:
> >
> > > On Tue, Sep 11, 2018 at 12:33:06PM -0700, Martin Xu wrote:
> > > > Hi Flavio,
> > > >
> > > > I must have misread the suggestions there. The intention of the v1
> patch
> > > > was to package the shared libraries in openvswitch RPM. The rhel6
> spec
> > > file
> > > > seems to have packaged those shared libraries into both openvswitch
> and
> > > > openvswitch-devel. I don't know the history how it came along. We
> > > currently
> > > > use the rhel6 spec file to build RPMs at VMware. Since it's also
> packaged
> > > > in the openvswitch RPM, we've been installing only the openvswitch
> and
> > > the
> > > > kmod RPMs for RHEL. Didn't need the openvswitch-devel package. I was
> > > hoping
> > > > to keep it the same way when we migrate to using fedora spec files. I
> > > guess
> > > > whoever is currently using he fedora spec file might not need the
> shared
> > > > libraries, so better make it optional than always. So that was the v1
> > > patch.
> > >
> > > When it is '*.so.*' like you added below, then those libraries are
> used by
> > > the installed binaries. That's what you need at runtime.
> > >
> > > The '*.so' might be symlinks or real files and the purpose is to allow
> > > development. That's why these files are part of -devel subpackage.
> > >
> > > Fedora ships both, like you see in rhel-6.
> > >
> > > fbl
> > >
> > > >
> > > > Martin
> > > >
> > > > On Tue, Sep 11, 2018 at 12:14 PM Flavio Leitner <fbl@redhat.com>
> wrote:
> > > >
> > > > > On Tue, Sep 11, 2018 at 11:44:59AM -0700, Martin Xu wrote:
> > > > > > This patch extends 4886d4d2495b (debian, rhel: Ship ovs shared
> > > libraries
> > > > > > and header files) to fedora, by packaging the shared libraries in
> > > > > > openvswitch RPM. These files are always packaged in 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>
> > > > > > ---
> > > > > > v1->v2: change from conditional to always ship share libraries
> > > > > >
> > > > > >  rhel/openvswitch-fedora.spec.in | 4 ++++
> > > > > >  1 file changed, 4 insertions(+)
> > > > > >
> > > > > > diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> > > > > openvswitch-fedora.spec.in
> > > > > > index cb7ecca..91d6472 100644
> > > > > > --- a/rhel/openvswitch-fedora.spec.in
> > > > > > +++ b/rhel/openvswitch-fedora.spec.in
> > > > > > @@ -236,6 +236,7 @@ Docker network plugins for OVN.
> > > > > >          --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
> > > > > >  %endif
> > > > > >          --enable-ssl \
> > > > > > +        --enable-shared \
> > > > > >          --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> > > > > >  %if 0%{?fedora} > 22 || %{with build_python3}
> > > > > >          PYTHON3=%{__python3} \
> > > > > > @@ -336,6 +337,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
> > > > >
> > > > > I think those should be part of the -devel subpackage.
> > > > >
> > > > > fbl
> > > > >
> > > > > > +
> > > > > >  %check
> > > > > >  %if %{with check}
> > > > > >      if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes;
> then
> > > :;
> > > > > > @@ -592,6 +595,7 @@ fi
> > > > > >  %{_bindir}/ovs-testcontroller
> > > > > >  %{_bindir}/ovs-pki
> > > > > >  %{_bindir}/vtep-ctl
> > > > > > +%{_libdir}/lib*.so.*
> > > > > >  %{_sbindir}/ovs-bugtool
> > > > > >  %{_sbindir}/ovs-vswitchd
> > > > > >  %{_sbindir}/ovsdb-server
> > > > > > --
> > > > > > 1.8.3.1
> > > > > >
> > > > >
> > > > > --
> > > > > Flavio
> > > > >
> > >
> > > --
> > > Flavio
> > >
>
> --
> Flavio
>
diff mbox series

Patch

diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index cb7ecca..91d6472 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -236,6 +236,7 @@  Docker network plugins for OVN.
         --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
 %endif
         --enable-ssl \
+        --enable-shared \
         --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
 %if 0%{?fedora} > 22 || %{with build_python3}
         PYTHON3=%{__python3} \
@@ -336,6 +337,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 +595,7 @@  fi
 %{_bindir}/ovs-testcontroller
 %{_bindir}/ovs-pki
 %{_bindir}/vtep-ctl
+%{_libdir}/lib*.so.*
 %{_sbindir}/ovs-bugtool
 %{_sbindir}/ovs-vswitchd
 %{_sbindir}/ovsdb-server