Skip to content

Commit

Permalink
rhel: Add optional BuildRequires to libcap-ng
Browse files Browse the repository at this point in the history
Commit e91b927 (lib/daemon: support --user option for all OVS daemon)
added optional usage of the libcap-ng library.  It's packaged in Fedora,
so go ahead and added it by default to the Fedora spec file.

Our default systemd unit files don't make use of the --user option that
requires this library, but conceivably someone may want to customize
them and use this option.

For those that don't want to use --user option, the Fedora package
offers an option (--without libcapng) to build the RPMs without it.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
fleitner authored and blp committed Oct 2, 2015
1 parent 89d762f commit 2ff63ae
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion rhel/openvswitch-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

#%define kernel 2.6.40.4-5.fc15.x86_64

# If libcap-ng isn't available and there is no need for running OVS
# as regular user, specify the '--without libcapng'
%bcond_without libcapng

# Enable PIE, bz#955181
%global _hardened_build 1

Expand Down Expand Up @@ -42,6 +46,9 @@ BuildRequires: desktop-file-utils
BuildRequires: groff graphviz
# make check dependencies
BuildRequires: procps-ng
%if %{with libcapng}
BuildRequires: libcap-ng libcap-ng-devel
%endif

Requires: openssl iproute module-init-tools
#Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3
Expand Down Expand Up @@ -104,7 +111,15 @@ overlays and security groups.
%setup -q

%build
%configure --enable-ssl --with-pkidir=%{_sharedstatedir}/openvswitch/pki
%configure \
%if %{with libcapng}
--enable-libcapng \
%else
--disable-libcapng \
%endif
--enable-ssl \
--with-pkidir=%{_sharedstatedir}/openvswitch/pki

make %{?_smp_mflags}

%install
Expand Down

0 comments on commit 2ff63ae

Please sign in to comment.