From 4e478641d1741fda4a74a33d02c6e48ffcca1d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= Date: Wed, 29 Aug 2018 14:15:30 +0200 Subject: [PATCH] Fix linking issues --- ...-with-installation-of-libsss_secrets.patch | 109 ++++++++++++++++ ...-Add-missing-deps-to-libsss_sbus-.so.patch | 49 ++++++++ ...uce-compilation-of-unnecessary-files.patch | 118 ++++++++++++++++++ sssd.spec | 8 +- 4 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 0001-BUILD-Fix-issue-with-installation-of-libsss_secrets.patch create mode 100644 0002-BUILD-Add-missing-deps-to-libsss_sbus-.so.patch create mode 100644 0003-BUILD-Reduce-compilation-of-unnecessary-files.patch diff --git a/0001-BUILD-Fix-issue-with-installation-of-libsss_secrets.patch b/0001-BUILD-Fix-issue-with-installation-of-libsss_secrets.patch new file mode 100644 index 0000000..24a25d9 --- /dev/null +++ b/0001-BUILD-Fix-issue-with-installation-of-libsss_secrets.patch @@ -0,0 +1,109 @@ +From 101934f29e6b76931b1499adc19ae7f7a976789d Mon Sep 17 00:00:00 2001 +From: Lukas Slebodnik +Date: Tue, 14 Aug 2018 08:20:57 +0000 +Subject: [PATCH 1/4] BUILD: Fix issue with installation of libsss_secrets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libsss_secret.so is linked with libsss_util.so therefore it shoudl be +added into pkglib_LTLIBRARIES after libsss_util.so. +Otherwise there can failure in linking phase. + +libtool: warning: relinking 'libsss_secrets.la' +libtool: install: (cd /home/build/sssd/ci-build-debug/intg/bld; /bin/sh + "/home/build/sssd/ci-build-debug/intg/bld/libtool" --tag CC + --mode=relink gcc -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith + -Wcast-qual -Wcast-align -Wwrite-strings -Wundef + -Werror-implicit-function-declaration -Winit-self -Wmissing-include-dirs + -fno-strict-aliasing -std=gnu99 -O2 -g -g3 -O2 -Werror + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + -avoid-version -o libsss_secrets.la -rpath + /tmp/sssd-intg.l7nl5pgb/lib/sssd + src/util/secrets/libsss_secrets_la-secrets.lo + src/util/secrets/libsss_secrets_la-config.lo -ltalloc -lldb + libsss_crypt.la libsss_debug.la libsss_util.la ) +libtool: relink: gcc -shared -fPIC -DPIC + src/util/secrets/.libs/libsss_secrets_la-secrets.o + src/util/secrets/.libs/libsss_secrets_la-config.o -Wl,-rpath + -Wl,/tmp/sssd-intg.l7nl5pgb/lib/sssd -ltalloc -lldb + -L/tmp/sssd-intg.l7nl5pgb/lib/sssd -lsss_crypt -lsss_debug -lsss_util + -O2 -g -g3 -O2 -Wl,-soname -Wl,libsss_secrets.so -o + .libs/libsss_secrets.so +/usr/bin/ld: cannot find -lsss_util +collect2: error: ld returned 1 exit status +libtool: error: error: relink 'libsss_secrets.la' with the above +command before installing it + +Merges: https://pagure.io/SSSD/sssd/pull-request/3808 + +Reviewed-by: Pavel Březina +--- + Makefile.am | 43 +++++++++++++++++++++---------------------- + 1 file changed, 21 insertions(+), 22 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index d313957..a2d8ea4 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1209,28 +1209,6 @@ libsss_iface_sync_la_LDFLAGS = \ + -avoid-version \ + $(NULL) + +-if BUILD_WITH_LIBSECRET +-pkglib_LTLIBRARIES += libsss_secrets.la +- +-libsss_secrets_la_SOURCES = \ +- src/util/secrets/secrets.c \ +- src/util/secrets/config.c \ +- $(NULL) +-libsss_secrets_la_CFLAGS = \ +- $(AM_CFLAGS) \ +- $(NULL) +-libsss_secrets_la_LIBADD = \ +- $(TALLOC_LIBS) \ +- $(LDB_LIBS) \ +- libsss_crypt.la \ +- libsss_debug.la \ +- libsss_util.la \ +- $(NULL) +-libsss_secrets_la_LDFLAGS = \ +- -avoid-version \ +- $(NULL) +-endif +- + pkglib_LTLIBRARIES += libsss_util.la + libsss_util_la_SOURCES = \ + src/confdb/confdb.c \ +@@ -1314,6 +1292,27 @@ libsss_util_la_LIBADD += stap_generated_probes.lo + endif + libsss_util_la_LDFLAGS = -avoid-version + ++if BUILD_WITH_LIBSECRET ++pkglib_LTLIBRARIES += libsss_secrets.la ++libsss_secrets_la_SOURCES = \ ++ src/util/secrets/secrets.c \ ++ src/util/secrets/config.c \ ++ $(NULL) ++libsss_secrets_la_CFLAGS = \ ++ $(AM_CFLAGS) \ ++ $(NULL) ++libsss_secrets_la_LIBADD = \ ++ $(TALLOC_LIBS) \ ++ $(LDB_LIBS) \ ++ libsss_crypt.la \ ++ libsss_debug.la \ ++ libsss_util.la \ ++ $(NULL) ++libsss_secrets_la_LDFLAGS = \ ++ -avoid-version \ ++ $(NULL) ++endif ++ + pkglib_LTLIBRARIES += libsss_semanage.la + libsss_semanage_la_CFLAGS = \ + $(AM_CFLAGS) \ +-- +2.9.5 + diff --git a/0002-BUILD-Add-missing-deps-to-libsss_sbus-.so.patch b/0002-BUILD-Add-missing-deps-to-libsss_sbus-.so.patch new file mode 100644 index 0000000..420b010 --- /dev/null +++ b/0002-BUILD-Add-missing-deps-to-libsss_sbus-.so.patch @@ -0,0 +1,49 @@ +From 677a93372e4b7359d19d7e55467fa5ccea4a80a3 Mon Sep 17 00:00:00 2001 +From: Lukas Slebodnik +Date: Wed, 15 Aug 2018 22:07:40 +0200 +Subject: [PATCH 2/4] BUILD: Add missing deps to libsss_sbus*.so +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It indirectly caused failures when linking unit test. + + CCLD test_sbus_opath +/usr/bin/ld: ./.libs/libsss_sbus.so: undefined reference to `g_utf8_validate' +/usr/bin/ld: ./.libs/libsss_sbus.so: undefined reference to `g_free' +/usr/bin/ld: ./.libs/libsss_sbus.so: undefined reference to `g_malloc' +/usr/bin/ld: ./.libs/libsss_sbus.so: undefined reference to `g_utf8_casefold' +/usr/bin/ld: ./.libs/libsss_sbus.so: undefined reference to `g_utf8_collate' +/usr/bin/ld: ./.libs/libsss_sbus.so: undefined reference to `g_utf8_strlen' +/usr/bin/ld: ./.libs/libsss_sbus.so: undefined reference to `g_utf8_strdown' + +Merges: https://pagure.io/SSSD/sssd/pull-request/3808 + +Reviewed-by: Pavel Březina +--- + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index a2d8ea4..1b4f044 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1105,6 +1105,7 @@ libsss_sbus_la_LIBADD = \ + $(TALLOC_LIBS) \ + $(TEVENT_LIBS) \ + $(DBUS_LIBS) \ ++ $(UNICODE_LIBS) \ + $(NULL) + libsss_sbus_la_CFLAGS = \ + $(AM_CFLAGS) \ +@@ -1146,6 +1147,7 @@ libsss_sbus_sync_la_CFLAGS = \ + $(AM_CFLAGS) \ + $(TALLOC_CFLAGS) \ + $(DBUS_CFLAGS) \ ++ $(UNICODE_LIBS) \ + $(NULL) + libsss_sbus_sync_la_LDFLAGS = \ + -avoid-version \ +-- +2.9.5 + diff --git a/0003-BUILD-Reduce-compilation-of-unnecessary-files.patch b/0003-BUILD-Reduce-compilation-of-unnecessary-files.patch new file mode 100644 index 0000000..3e45982 --- /dev/null +++ b/0003-BUILD-Reduce-compilation-of-unnecessary-files.patch @@ -0,0 +1,118 @@ +From 53ed60b878d3737d4c174644b69df960595479da Mon Sep 17 00:00:00 2001 +From: Lukas Slebodnik +Date: Wed, 15 Aug 2018 22:23:42 +0200 +Subject: [PATCH 3/4] BUILD: Reduce compilation of unnecessary files +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We safe compilation of 52 files 2 times with linking to existing +internal libraries. + +It also fixes issue with multiple definition of the same symbol + + CCLD responder_common-tests +/usr/bin/ld: .libs/libsss_debug.so and ../../../src/util/responder_common_tests-debug.o: + warning: multiple common of `sss_logger' +collect2: error: ld returned 1 exit status + +Merges: https://pagure.io/SSSD/sssd/pull-request/3808 + +Reviewed-by: Pavel Březina +--- + src/tests/cwrap/Makefile.am | 64 +++------------------------------------------ + 1 file changed, 4 insertions(+), 60 deletions(-) + +diff --git a/src/tests/cwrap/Makefile.am b/src/tests/cwrap/Makefile.am +index d5778d1..b63c695 100644 +--- a/src/tests/cwrap/Makefile.am ++++ b/src/tests/cwrap/Makefile.am +@@ -66,67 +66,7 @@ SSSD_CACHE_REQ_OBJ = \ + ../../../src/responder/common/cache_req/plugins/cache_req_host_by_name.c \ + $(NULL) + +-SSSD_SBUS_OBJ = \ +- ../../../src/util/check_and_open.c \ +- ../../../src/util/debug.c \ +- ../../../src/util/sss_ptr_hash.c \ +- ../../../src/util/sss_ptr_list.c \ +- ../../../src/util/sss_utf8.c \ +- ../../../src/util/util.c \ +- ../../../src/util/util_errors.c \ +- ../../../src/util/util_ext.c \ +- ../../../src/util/strtonum.c \ +- ../../../src/sbus/sbus_errors.c \ +- ../../../src/sbus/sbus_opath.c \ +- ../../../src/sbus/connection/sbus_connection.c \ +- ../../../src/sbus/connection/sbus_connection_connect.c \ +- ../../../src/sbus/connection/sbus_dbus.c \ +- ../../../src/sbus/connection/sbus_dispatcher.c \ +- ../../../src/sbus/connection/sbus_reconnect.c \ +- ../../../src/sbus/connection/sbus_send.c \ +- ../../../src/sbus/connection/sbus_watch.c \ +- ../../../src/sbus/interface_dbus/sbus_dbus_arguments.c \ +- ../../../src/sbus/interface_dbus/sbus_dbus_client_async.c \ +- ../../../src/sbus/interface_dbus/sbus_dbus_invokers.c \ +- ../../../src/sbus/interface_dbus/sbus_dbus_keygens.c \ +- ../../../src/sbus/interface_dbus/sbus_dbus_symbols.c \ +- ../../../src/sbus/interface/sbus_interface.c \ +- ../../../src/sbus/interface/sbus_introspection.c \ +- ../../../src/sbus/interface/sbus_iterator_readers.c \ +- ../../../src/sbus/interface/sbus_iterator_writers.c \ +- ../../../src/sbus/interface/sbus_properties.c \ +- ../../../src/sbus/interface/sbus_properties_parser.c \ +- ../../../src/sbus/interface/sbus_std_signals.c \ +- ../../../src/sbus/request/sbus_message.c \ +- ../../../src/sbus/request/sbus_request.c \ +- ../../../src/sbus/request/sbus_request_call.c \ +- ../../../src/sbus/request/sbus_request_hash.c \ +- ../../../src/sbus/request/sbus_request_sender.c \ +- ../../../src/sbus/request/sbus_request_util.c \ +- ../../../src/sbus/router/sbus_router.c \ +- ../../../src/sbus/router/sbus_router_handler.c \ +- ../../../src/sbus/router/sbus_router_hash.c \ +- ../../../src/sbus/server/sbus_server_handler.c \ +- ../../../src/sbus/server/sbus_server_interface.c \ +- ../../../src/sbus/server/sbus_server_match.c \ +- ../../../src/sbus/server/sbus_server.c \ +- $(NULL) +- +-SSSD_IFACE_OBJ = \ +- ../../../src/sss_iface/sbus_sss_arguments.c \ +- ../../../src/sss_iface/sbus_sss_client_async.c \ +- ../../../src/sss_iface/sbus_sss_invokers.c \ +- ../../../src/sss_iface/sbus_sss_keygens.c \ +- ../../../src/sss_iface/sbus_sss_symbols.c \ +- ../../../src/sss_iface/sss_iface_types.c \ +- ../../../src/sss_iface/sss_iface.c \ +- ../../../src/util/domain_info_utils.c \ +- ../../../src/util/sss_pam_data.c \ +- $(NULL) +- + SSSD_RESPONDER_IFACE_OBJ = \ +- $(SSSD_SBUS_OBJ) \ +- $(SSSD_IFACE_OBJ) \ + ../../../src/responder/common/responder_iface.c \ + $(NULL) + +@@ -244,6 +184,8 @@ responder_common_tests_LDADD = \ + $(abs_top_builddir)/libsss_util.la \ + $(abs_top_builddir)/libsss_debug.la \ + $(abs_top_builddir)/libsss_test_common.la \ ++ $(abs_top_builddir)/libsss_iface.la \ ++ $(abs_top_builddir)/libsss_sbus.la \ + $(NULL) + + negcache_tests_SOURCES =\ +@@ -262,6 +204,8 @@ negcache_tests_LDADD = \ + $(abs_top_builddir)/libsss_util.la \ + $(abs_top_builddir)/libsss_debug.la \ + $(abs_top_builddir)/libsss_test_common.la \ ++ $(abs_top_builddir)/libsss_iface.la \ ++ $(abs_top_builddir)/libsss_sbus.la \ + $(NULL) + + tests: $(check_PROGRAMS) +-- +2.9.5 + diff --git a/sssd.spec b/sssd.spec index 054f0cb..dc9047f 100644 --- a/sssd.spec +++ b/sssd.spec @@ -36,7 +36,7 @@ Name: sssd Version: 2.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System Summary: System Security Services Daemon License: GPLv3+ @@ -44,6 +44,9 @@ URL: https://pagure.io/SSSD/sssd/ Source0: https://releases.pagure.org/SSSD/sssd/%{name}-%{version}.tar.gz ### Patches ### +Patch0001: 0001-BUILD-Fix-issue-with-installation-of-libsss_secrets.patch +Patch0002: 0002-BUILD-Add-missing-deps-to-libsss_sbus-.so.patch +Patch0003: 0003-BUILD-Reduce-compilation-of-unnecessary-files.patch ### Downstream only patches ### Patch0502: 0502-SYSTEMD-Use-capabilities.patch @@ -1211,6 +1214,9 @@ fi %{_libdir}/%{name}/modules/libwbclient.so %changelog +* Wed Aug 29 2018 Michal Židek - 2.0.0-2 +- Fix linking issues + * Tue Aug 14 2018 Michal Židek - 2.0.0-1 - New upstream release 2.0.0