summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2022-07-25 14:19:36 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-07-29 17:17:04 +0200
commitc58ed147fb21d2d4c1c07d07433c996251d71752 (patch)
tree1ae70aa322e6b8a2e867bb9f8642635c3d97367b
parentc6bd6cb06bb23bcc53bfb7c32587772b94d9f270 (diff)
downloadopenvswitch-c58ed147fb21d2d4c1c07d07433c996251d71752.tar.gz
rhel: Stop installing internal headers.
Currently, openvswitch-devel installs following header tree: /usr/include /openflow/*.h /openvswitch /*.h /openflow/*.h /openvswitch/*.h /sparse/*.h /lib/*.h Few issues with that: 1. openflow and openvswitch headers are installed twice. Once in the main /usr/include and second time in the /usr/include/openvswitch/. 2. For some reason internal headers such as lib/*.h and fairly useless headers such as sparse/*.h are installed as well. One more issue is that current pkg-config files doesn't work with builds installed with 'make install', because 'make install' doesn't create this weird header tree. While double install of same headers is not a huge problem, it doesn't seem right. Installation of the internal headers is a bigger issue. They are not part of API/ABI and we do not provide any stability guarantees for them. We are making incompatible changes constantly in minor updates, so users should not rely on these headers. If it's necessary for some external application to use them, this external application should not link with libopenvswitch dynamically and also it can't expect the static library to not break these API/ABI, hence there is no real point installing them. Application should use OVS as a submodule like OVN does or compile itself by obtaining required version of OVS sources otherwise. Another option is to properly export and install required headers. pkg-config configuration files updated as necessary. Fixes: 4886d4d2495b ("debian, rhel: Ship ovs shared libraries and header files") Reviewed-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--lib/libopenvswitch.pc.in2
-rw-r--r--lib/libsflow.pc.in2
-rw-r--r--ofproto/libofproto.pc.in2
-rw-r--r--ovsdb/libovsdb.pc.in2
-rw-r--r--rhel/openvswitch-fedora.spec.in14
-rw-r--r--rhel/openvswitch.spec.in18
6 files changed, 4 insertions, 36 deletions
diff --git a/lib/libopenvswitch.pc.in b/lib/libopenvswitch.pc.in
index 2a3f2ca7b..4c40a4caf 100644
--- a/lib/libopenvswitch.pc.in
+++ b/lib/libopenvswitch.pc.in
@@ -8,4 +8,4 @@ Description: Open vSwitch library
Version: @VERSION@
Libs: -L${libdir} -lopenvswitch
Libs.private: @LIBS@
-Cflags: -I${includedir}/openvswitch
+Cflags: -I${includedir}
diff --git a/lib/libsflow.pc.in b/lib/libsflow.pc.in
index e70a2b704..34bb7e3d6 100644
--- a/lib/libsflow.pc.in
+++ b/lib/libsflow.pc.in
@@ -8,4 +8,4 @@ Description: sFlow library of Open vSwitch
Version: @VERSION@
Libs: -L${libdir} -lsflow
Libs.private: @LIBS@
-Cflags: -I${includedir}/openvswitch
+Cflags: -I${includedir}
diff --git a/ofproto/libofproto.pc.in b/ofproto/libofproto.pc.in
index 274071250..49894fb69 100644
--- a/ofproto/libofproto.pc.in
+++ b/ofproto/libofproto.pc.in
@@ -8,4 +8,4 @@ Description: OpenFlow library of Open vSwitch
Version: @VERSION@
Libs: -L${libdir} -lofproto
Libs.private: @LIBS@
-Cflags: -I${includedir}/openvswitch
+Cflags: -I${includedir}
diff --git a/ovsdb/libovsdb.pc.in b/ovsdb/libovsdb.pc.in
index fe367ea7b..54c9039cf 100644
--- a/ovsdb/libovsdb.pc.in
+++ b/ovsdb/libovsdb.pc.in
@@ -8,4 +8,4 @@ Description: OVSDB library of Open vSwitch
Version: @VERSION@
Libs: -L${libdir} -lovsdb
Libs.private: @LIBS@
-Cflags: -I${includedir}/openvswitch
+Cflags: -I${includedir}
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 2c0c4fa18..b75359f19 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -189,20 +189,6 @@ make install DESTDIR=$RPM_BUILD_ROOT
install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch
install -d -m 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch
-copy_headers() {
- src=$1
- dst=$RPM_BUILD_ROOT/$2
- install -d -m 0755 $dst
- install -m 0644 $src/*.h $dst
-}
-copy_headers include %{_includedir}/openvswitch
-copy_headers include/openflow %{_includedir}/openvswitch/openflow
-copy_headers include/openvswitch %{_includedir}/openvswitch/openvswitch
-copy_headers include/sparse %{_includedir}/openvswitch/sparse
-copy_headers include/sparse/arpa %{_includedir}/openvswitch/sparse/arpa
-copy_headers include/sparse/netinet %{_includedir}/openvswitch/sparse/netinet
-copy_headers include/sparse/sys %{_includedir}/openvswitch/sparse/sys
-copy_headers lib %{_includedir}/openvswitch/lib
%if %{with dpdk}
install -p -D -m 0644 rhel/usr_lib_udev_rules.d_91-vfio.rules \
diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
index ee8b3c9ea..e5e092d11 100644
--- a/rhel/openvswitch.spec.in
+++ b/rhel/openvswitch.spec.in
@@ -108,24 +108,6 @@ install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch
install -d -m 0755 $RPM_BUILD_ROOT/var/lib/openvswitch
-copy_headers() {
- src=$1
- dst=$RPM_BUILD_ROOT/$2
- install -d -m 0755 $dst
- install -m 0644 $src/*.h $dst
-}
-copy_headers include %{_includedir}/openvswitch
-copy_headers include/openflow %{_includedir}/openvswitch/openflow
-copy_headers include/openvswitch %{_includedir}/openvswitch/openvswitch
-copy_headers include/sparse %{_includedir}/openvswitch/sparse
-copy_headers include/sparse/arpa %{_includedir}/openvswitch/sparse/arpa
-copy_headers include/sparse/netinet %{_includedir}/openvswitch/sparse/netinet
-copy_headers include/sparse/sys %{_includedir}/openvswitch/sparse/sys
-copy_headers lib %{_includedir}/openvswitch/lib
-
-install -D -m 0644 lib/.libs/libopenvswitch.a \
- $RPM_BUILD_ROOT/%{_libdir}/libopenvswitch.a
-
%check
%if %{with check}
if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;