[SSSD] [PATCH] BUILD: Link just libsss_crypto with crypto libraries

Lukas Slebodnik lslebodn at redhat.com
Fri Oct 2 09:26:33 UTC 2015


ehlo,

Attached patch should prevent such failures as in commit
73ec8fdfddb2d4bf99977f758eec80e1b1ee8542
    BUILD: Link test_data_provider_be with -ldl

SSS_CRYPT_LIBS should not be part of SSSD_LIBS.
all necessary program and libraries should be linked with
libsss_cryto.so an do not use SSS_CRYPT_LIBS directly.

LS
-------------- next part --------------
>From 9ecf758a458a7a86016a074cf2fe347f9ff14255 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Fri, 2 Oct 2015 09:33:28 +0200
Subject: [PATCH 1/3] BUILD: Link just libsss_crypto with crypto libraries

It should prevent such failures as in commit
73ec8fdfddb2d4bf99977f758eec80e1b1ee8542
    BUILD: Link test_data_provider_be with -ldl
---
 Makefile.am | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ce3166716eab20c7b98005faf938f32458dbd673..fbefd56e403c87e40f900d8f692765a63f086507 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -488,7 +488,6 @@ SSSD_LIBS = \
     $(INI_CONFIG_LIBS) \
     $(COLLECTION_LIBS) \
     $(DHASH_LIBS) \
-    $(SSS_CRYPT_LIBS) \
     $(OPENLDAP_LIBS) \
     $(TDB_LIBS)
 
@@ -2244,7 +2243,6 @@ sdap_tests_SOURCES = \
     $(NULL)
 sdap_tests_CFLAGS = \
     $(AM_CFLAGS) \
-    $(SSS_CRYPT_CFLAGS) \
     $(NULL)
 sdap_tests_LDFLAGS = \
     -Wl,-wrap,ldap_set_option \
@@ -2261,7 +2259,6 @@ sdap_tests_LDADD = \
     $(LDB_LIBS) \
     $(POPT_LIBS) \
     $(SSSD_INTERNAL_LTLIBS) \
-    $(SSS_CRYPT_LIBS) \
     $(OPENLDAP_LIBS) \
     libsss_test_common.la \
     $(NULL)
-- 
2.5.0

-------------- next part --------------
>From 88dd2715828fa06ea6522495cc78903590a16e4e Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Mon, 21 Sep 2015 21:37:41 +0200
Subject: [PATCH 2/3] BUILD: Link crypto_tests with existing library

It's not necessary to bundle libsss_crypto to crypto_tests.
We can link it directly.
---
 Makefile.am | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index fbefd56e403c87e40f900d8f692765a63f086507..724d8ffa4d594010350a81a3e8eae6d5d49e5589 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1718,17 +1718,16 @@ debug_tests_LDADD = \
     libsss_debug.la
 
 crypto_tests_SOURCES = \
-    $(SSS_CRYPT_SOURCES) \
     src/tests/crypto-tests.c
 crypto_tests_CFLAGS = \
-    $(SSS_CRYPT_CFLAGS) \
     $(AM_CFLAGS) \
     $(CHECK_CFLAGS)
 crypto_tests_LDADD = \
-    libsss_debug.la \
-    $(SSS_CRYPT_LIBS) \
-    $(SSSD_LIBS) \
     $(CHECK_LIBS) \
+    $(POPT_LIBS) \
+    $(TALLOC_LIBS) \
+    libsss_crypt.la \
+    libsss_debug.la \
     libsss_test_common.la
 
 ipa_hbac_tests_SOURCES = \
-- 
2.5.0

-------------- next part --------------
>From 624a9fea30b48539efdf71a182d6289e516d1b61 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Mon, 21 Sep 2015 16:05:00 +0200
Subject: [PATCH 3/3] BUILD: Remove unused variable TEST_MOCK_OBJ

---
 Makefile.am | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 724d8ffa4d594010350a81a3e8eae6d5d49e5589..7fca31f27ed0f546f8388adee057b5758151d475 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2061,7 +2061,6 @@ fqnames_tests_LDADD = \
     libsss_test_common.la
 
 nestedgroups_tests_SOURCES = \
-    $(TEST_MOCK_OBJ) \
     $(TEST_MOCK_PROVIDER_OBJ) \
     src/providers/ldap/sdap_idmap.c \
     src/tests/cmocka/test_nested_groups.c \
@@ -2432,7 +2431,6 @@ test_child_common_LDADD = \
     $(NULL)
 
 responder_cache_req_tests_SOURCES = \
-    $(TEST_MOCK_OBJ) \
     $(TEST_MOCK_RESP_OBJ) \
     src/tests/cmocka/test_responder_cache_req.c \
     $(NULL)
-- 
2.5.0



More information about the sssd-devel mailing list