#3781 SPEC: Move openssl deps away from unit tests deps
Merged by jhrozek. Opened by lslebodn.
SSSD/ lslebodn/sssd openssl_spec  into  master

Download 3781.patch

We should install openssl build dependences even though we do not want
to run/install dependencies for unit tests

rebased onto 436cca8961cda25abe0767cae8ff3279c09e5e98

This is just a cosmetic change right? Because I don't see any condition in the specfile that would be only enabled with unit tests around those two BuildRequires..

This is just a cosmetic change right? Because I don't see any condition in the specfile that would be only enabled with unit tests around those two BuildRequires..

At the moment, spec looks like this

 221 %if (0%{?fedora} || 0%{?epel})
 222 BuildRequires: libcmocka-devel >= 1.0.0
 223 BuildRequires: uid_wrapper
 224 BuildRequires: nss_wrapper
 225 
 226 # Test CA requires openssl independent if SSSD is build with NSS or openssl,
 227 # openssh is needed for ssh-keygen and NSS builds need nss-tools for certutil.
 228 # Currently only cmocka based tests use the test CA. If it is used elsewhere
 229 # you might want to move the following requires out of the if-block.
 230 # If SSSD is build with OpenSSL instead of NSS p11tool from the gnutls-utils
 231 # package and softhsm2-util from the softhsm package are needed to prepare the
 232 # data needed for the p11_child Smartcard tests. Since p11_child only looks at
 233 # slots with are flagged as 'removable' softhsm version 2.1.0 or higher is
 234 # needed.
 235 %if (0%{?use_openssl} == 1)
 236 BuildRequires: p11-kit-devel
 237 BuildRequires: openssl-devel
 238 BuildRequires: gnutls-utils
 239 BuildRequires: softhsm >= 2.1.0
 240 %endif
 241 
 242 BuildRequires: openssl
 243 BuildRequires: openssh
 244 BuildRequires: nss-tools
 245 %endif

So if sb would like to build sssd with openssl on RHEL7 (not CentOS 7)
then it would not work.

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 60fe2fb3b..833b7717b 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -78,7 +78,7 @@
     %global with_initscript --with-initscript=sysv
 %endif
-%if (0%{?fedora} > 28 || 0%{?rhel} > 7)
+%if (0%{?fedora} > 28 || 0%{?rhel} > 6)
     %global use_openssl 1
 %endif

Ah, makes sense. Ack code-wise, I'll push if CI finishes.

Commit 7326b52d fixes this pull-request

Pull-Request has been merged by jhrozek

Metadata