-
Committer:
Chris Dunlap
-
Date:
2012-12-06 00:15:06 UTC
-
Revision ID:
git-v1:edc4cf3289a469b5296a74f622fcc3bef66997e0
fix failed openSUSE rpm build dep for tcp_wrappers
Creating RPMs on openSUSE via rpmbuild fails with:
error: Failed build dependencies:
tcp_wrappers is needed by conman-0.2.7-1.x86_64
The conman.spec file has the correct build dependency (tcpd-devel):
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 7
BuildRequires: tcp_wrappers-devel
%else
%if 0%{?rhel} < 6 || 0%{?fedora} < 7 || 0%{?rhl}
BuildRequires: tcp_wrappers
%else
%if "%{_vendor}" == "suse"
BuildRequires: tcpd-devel
%endif
%endif
%endif
The problem is with the middle %if condition. On openSUSE, "rhel",
"fedora", and "rhl" are all undefined so the following condition
is evaluated:
%if 0 < 6 || 0 < 7 || 0
This condition evaluates true, so the "_vendor" tag is never matched.
To fix this, the middle %if condition for tcp_wrappers is replaced
with a "_vendor" test for "redhat".
Tested on:
- Fedora 17 (tcp_wrappers-devel)
- openSUSE 12.2 (tcpd-devel)
- RHEL 5 (tcp_wrappers)
- RHEL 6 (tcp_wrappers-devel)