Skip to content

Commit

Permalink
rhel: Include pkgconfig and update header install in Fedora/RHEL spec.
Browse files Browse the repository at this point in the history
As headers are installed by 'make install' now, the explicit install
instructions can be be removed from the spec file.

The spec file has been including <config.h> plus all headers in lib/ so
far which is dangerous:

 * config.h is a description of the capabilities of the build machine
   where the package was built. Although it may hint on what is
   included in the library, the defines do not necessarily hold true on
   another build machine.

 * Some headers in lib/ do not contain proper prefixes and pollute the
   global header name space. Do not include them anymore. Properly
   cleaned up headers will be exposed in openvswitch/ and openflow/

For the RHEL spec, both pkgconfig and headers are omitted as no -devel
package exists yet.

Cc: Flavio Leitner <[email protected]>
Suggested-by: Flavio Leitner <[email protected]>
Signed-off-by: Thomas Graf <[email protected]>
Acked-by: Flavio Leitner <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
Thomas Graf authored and blp committed Nov 13, 2014
1 parent e72e07a commit 2fd84d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
15 changes: 1 addition & 14 deletions rhel/openvswitch-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,6 @@ rmdir $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/

install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch

install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openvswitch
install -p -D -m 0644 include/openvswitch/*.h \
-t $RPM_BUILD_ROOT%{_includedir}/openvswitch
install -p -D -m 0644 config.h \
-t $RPM_BUILD_ROOT%{_includedir}/openvswitch

install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openvswitch/lib
install -p -D -m 0644 lib/*.h \
-t $RPM_BUILD_ROOT%{_includedir}/openvswitch/lib

install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openflow
install -p -D -m 0644 include/openflow/*.h \
-t $RPM_BUILD_ROOT%{_includedir}/openflow

touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db
touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf

Expand Down Expand Up @@ -208,6 +194,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/pkgconfig/*.pc
%{_includedir}/openvswitch/*
%{_includedir}/openflow/*

Expand Down
1 change: 1 addition & 0 deletions rhel/openvswitch.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ rm \
$RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8
(cd "$RPM_BUILD_ROOT" && rm -rf usr/lib)
(cd "$RPM_BUILD_ROOT" && rm -rf usr/include)

install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch

Expand Down

0 comments on commit 2fd84d5

Please sign in to comment.