Rename libcommon.so to libcommon-gpl.so
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 11 Jan 2022 19:46:37 +0000 (14:46 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 26 Jan 2022 17:35:04 +0000 (12:35 -0500)
libcommon is a static library is currently used by both liblttng-ctl
(LGPLv2.1) and all lttng-tools executables (GPLv2).

Given that some code in libcommon depends on liburcu, this introduces an
indirect dependency from liblttng-ctl to liburcu, which is unwanted.

This first step renames libcommon.so to libcommon-gpl.so. Following
steps will introduce a more lightweight libcommon-lgpl.so which only
contains LGPLv2.1 code, and removes the dependency on liburcu.

Backport Notes
--------------

ini_config has to link against liblttng-ctl since since the internal
configuration library is not split into ini-config and libconfig
(see 3299fd310).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia8f37ea229f68550200cbb1528216a505bbbd45f

13 files changed:
extras/bindings/swig/python/Makefile.am
src/bin/lttng-consumerd/Makefile.am
src/bin/lttng-crash/Makefile.am
src/bin/lttng-relayd/Makefile.am
src/bin/lttng-sessiond/Makefile.am
src/bin/lttng/Makefile.am
src/common/Makefile.am
src/lib/lttng-ctl/Makefile.am
tests/regression/tools/health/Makefile.am
tests/regression/tools/live/Makefile.am
tests/regression/tools/notification/Makefile.am
tests/unit/Makefile.am
tests/unit/ini_config/Makefile.am

index bdecadcae2ef94967e95e44e068ce1ec0ec36f01..65e7e4f47f4008c37bfcb65d6259d90b51a22498 100644 (file)
@@ -15,7 +15,7 @@ nodist__lttng_la_SOURCES = lttng_wrap.c
 _lttng_la_LDFLAGS = -module
 _lttng_la_LIBADD =     $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la               \
                        $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la            \
-                       $(top_builddir)/src/common/libcommon.la
+                       $(top_builddir)/src/common/libcommon-gpl.la
 
 lttng_wrap.c: lttng.i
        $(SWIG) -python -I. -I$(top_srcdir)/src/common/sessiond-comm lttng.i
index 112e360d0db40706915961bcba27bd6d2174bcc6..5704ee7213ce2fa2c863bcda04b475fa7d37c39f 100644 (file)
@@ -10,7 +10,7 @@ lttng_consumerd_SOURCES = lttng-consumerd.c \
 lttng_consumerd_LDADD = \
           $(top_builddir)/src/common/consumer/libconsumer.la \
           $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
-          $(top_builddir)/src/common/libcommon.la \
+          $(top_builddir)/src/common/libcommon-gpl.la \
           $(top_builddir)/src/common/index/libindex.la \
           $(top_builddir)/src/common/health/libhealth.la \
           $(top_builddir)/src/common/testpoint/libtestpoint.la
index 9c320bb151f171be9b7728f0033eb9aa71f05d67..08b86af8c1600eb1e0425a7529783676c8f2e8ba 100644 (file)
@@ -10,5 +10,5 @@ bin_PROGRAMS = lttng-crash
 
 lttng_crash_SOURCES = lttng-crash.c
 
-lttng_crash_LDADD = $(top_builddir)/src/common/libcommon.la \
+lttng_crash_LDADD = $(top_builddir)/src/common/libcommon-gpl.la \
                        $(top_builddir)/src/common/config/libconfig.la
index 80ee6a70b4d4a0df69c0b216def8c15ad7b2b2a3..5ce2ba4799edb208c719ebccf7d74a238311cd86 100644 (file)
@@ -29,6 +29,7 @@ lttng_relayd_SOURCES = main.c lttng-relayd.h utils.h utils.c cmd.h \
 
 # link on liblttngctl for check if relayd is already alive.
 lttng_relayd_LDADD = -lurcu-common -lurcu \
+               $(top_builddir)/src/common/libcommon-gpl.la \
                $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
                $(top_builddir)/src/common/hashtable/libhashtable.la \
                $(top_builddir)/src/common/libcommon.la \
index ee53655be18f8390934c01269c537a9a339d0117..a22b4b774ac4e0a303e9f7004ba894122d87a678 100644 (file)
@@ -72,7 +72,7 @@ lttng_sessiond_LDADD = -lurcu-common -lurcu $(KMOD_LIBS) \
                $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
                $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
                $(top_builddir)/src/common/hashtable/libhashtable.la \
-               $(top_builddir)/src/common/libcommon.la \
+               $(top_builddir)/src/common/libcommon-gpl.la \
                $(top_builddir)/src/common/compat/libcompat.la \
                $(top_builddir)/src/common/relayd/librelayd.la \
                $(top_builddir)/src/common/testpoint/libtestpoint.la \
index d094c5aafc30a146e27514fbe992fcc1b5078f40..3a16161f17a671e085a9a8370d8d5ef38a27d0be 100644 (file)
@@ -34,7 +34,7 @@ lttng_SOURCES = command.h conf.c conf.h commands/start.c \
 lttng_CFLAGS = $(AM_CFLAGS) $(POPT_CFLAGS)
 
 lttng_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
-                       $(top_builddir)/src/common/libcommon.la \
+                       $(top_builddir)/src/common/libcommon-gpl.la \
                        $(top_builddir)/src/common/config/libconfig.la \
                        $(top_builddir)/src/common/string-utils/libstring-utils.la \
                        $(POPT_LIBS)
index cca159e564b53ba6b7f74d303d3e30af17fa4013..beeb7b70c22065f51a992dd816c9d2a437cfbef4 100644 (file)
@@ -23,10 +23,10 @@ DIST_SUBDIRS = \
        fd-tracker
 
 # Common library
-noinst_LTLIBRARIES = libcommon.la
+noinst_LTLIBRARIES = libcommon-gpl.la
 EXTRA_DIST = mi-lttng-4.0.xsd
 
-libcommon_la_SOURCES = \
+libcommon_gpl_la_SOURCES = \
        action.c \
        buffer-usage.c \
        buffer-view.h buffer-view.c \
@@ -70,11 +70,11 @@ libcommon_la_SOURCES = \
        fs-handle.h fs-handle-internal.h fs-handle.c
 
 if HAVE_ELF_H
-libcommon_la_SOURCES += \
+libcommon_gpl_la_SOURCES += \
        lttng-elf.c lttng-elf.h
 endif
 
-libcommon_la_LIBADD = \
+libcommon_gpl_la_LIBADD = \
        $(top_builddir)/src/common/config/libconfig.la \
        $(top_builddir)/src/common/compat/libcompat.la \
        $(top_builddir)/src/common/hashtable/libhashtable.la \
index 1bee05f0c8b690a33b12d0ca8494cd906c89c7b5..106b4027d395c384ab0a558c3b29f85c856d266b 100644 (file)
@@ -16,7 +16,7 @@ liblttng_ctl_la_LDFLAGS = \
 
 liblttng_ctl_la_LIBADD = \
                $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
-               $(top_builddir)/src/common/libcommon.la \
+               $(top_builddir)/src/common/libcommon-gpl.la \
                $(top_builddir)/src/lib/lttng-ctl/filter/libfilter.la
 
 pkgconfigdir = $(libdir)/pkgconfig
index d3821ec062c48d20a0ed1e4511e3b5c0bf53f16c..da0d5f580266f5b25f0469ec508d2e6338ca0736 100644 (file)
@@ -34,7 +34,7 @@ noinst_LTLIBRARIES = libhealthstall.la libhealthtpfail.la
 
 health_check_SOURCES = health_check.c $(UTILS)
 health_check_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
-                    $(top_builddir)/src/common/libcommon.la \
+                    $(top_builddir)/src/common/libcommon-gpl.la \
                     $(DL_LIBS)
 
 EXTRA_DIST = $(COPYSCRIPTS)
index 94333fd3bfcb5998ad4bd3702a7b5c67e4fe100a..e4c2dbe84d65c98482e039214d5def0dbb1adcb1 100644 (file)
@@ -4,7 +4,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
 
 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
 
-LIBCOMMON=$(top_builddir)/src/common/libcommon.la
+LIBCOMMON_GPL=$(top_builddir)/src/common/libcommon-gpl.la
 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
@@ -24,7 +24,7 @@ EXTRA_DIST += test_ust test_ust_tracefile_count test_lttng_ust
 endif
 
 live_test_SOURCES = live_test.c
-live_test_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
+live_test_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
                $(LIBHASHTABLE) $(LIBHEALTH) $(DL_LIBS) $(LIBCOMPAT) -lrt
 live_test_LDADD += $(LIVE) \
                $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
index bc2c9123c2882e2d8c5b5fef32e0082bdaaf777b..705be8d37c4495e78af142f6d2dcc8fc1f1e55ef 100644 (file)
@@ -21,7 +21,8 @@ FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
 
 libpause_consumer_la_SOURCES = consumer_testpoints.c
 libpause_consumer_la_LIBADD = \
-       $(top_builddir)/src/common/libcommon.la \
+       $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
+       $(top_builddir)/src/common/libcommon-gpl.la \
        $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
        $(DL_LIBS)
 libpause_consumer_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS)
@@ -39,7 +40,6 @@ rotation_LDADD = $(LIB_LTTNG_CTL) $(LIBTAP) -lm
 noinst_SCRIPTS = test_notification_ust test_notification_kernel test_notification_multi_app test_rotation
 EXTRA_DIST = test_notification_ust test_notification_kernel test_notification_multi_app test_rotation
 
-
 all-local:
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
                for script in $(EXTRA_DIST); do \
index 87304176e55f5248c9f0327d6def0297fd50d48a..a46558635edb6bb9429c08e902a052998e514a1a 100644 (file)
@@ -25,7 +25,7 @@ TESTS = test_kernel_data \
 
 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
 
-LIBCOMMON=$(top_builddir)/src/common/libcommon.la
+LIBCOMMON_GPL=$(top_builddir)/src/common/libcommon-gpl.la
 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
 LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la
 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
@@ -48,7 +48,7 @@ endif
 
 # URI unit tests
 test_uri_SOURCES = test_uri.c
-test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
+test_uri_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBHASHTABLE) $(DL_LIBS)
 
 # Sessiond objects
 SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
@@ -148,7 +148,7 @@ KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
                $(LIBLTTNG_CTL)
 
 test_kernel_data_SOURCES = test_kernel_data.c
-test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
+test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
                         $(LIBHASHTABLE) $(DL_LIBS) -lrt
 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
 
@@ -156,28 +156,28 @@ test_kernel_data_LDADD += $(KERN_DATA_TRACE)
 
 # parse_size_suffix unit test
 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
-test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
+test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON_GPL) $(DL_LIBS)
 
 # parse_time_suffix unit test
 test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
-test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
+test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON_GPL)
 
 # compat_poll unit test
 test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
 test_utils_compat_poll_LDADD  = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
-                     $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
+                     $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON_GPL)
 
 # expand_path unit test
 test_utils_expand_path_SOURCES = test_utils_expand_path.c
-test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
+test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON_GPL) $(DL_LIBS)
 
 # directory handle unit test
 test_directory_handle_SOURCES = test_directory_handle.c
-test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
+test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON_GPL) $(DL_LIBS)
 
 # string utilities unit test
 test_string_utils_SOURCES = test_string_utils.c
-test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
+test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBSTRINGUTILS) $(DL_LIBS)
 
 # Notification api
 test_notification_SOURCES = test_notification.c
@@ -185,13 +185,13 @@ test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
 
 # relayd backward compat for groou-by-session utilities
 test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
-test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
+test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(RELAYD_OBJS)
 test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd
 
 # fd tracker unit test
 test_fd_tracker_SOURCES = test_fd_tracker.c
-test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) -lurcu $(LIBCOMMON) $(LIBHASHTABLE)
+test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) -lurcu $(LIBCOMMON_GPL) $(LIBHASHTABLE)
 
 # uuid unit test
 test_uuid_SOURCES = test_uuid.c
-test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
+test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON_GPL)
index 7f15f99c94c2803107ebf23e34449cbe780c3cb0..080b39ea32f166c984af505e3752ed2a19f51246 100644 (file)
@@ -3,16 +3,16 @@
 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/
 
 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
-LIBCONFIG=$(top_builddir)/src/common/config/libconfig.la
-LIBCOMMON=$(top_builddir)/src/common/libcommon.la
+LIBCOMMON_GPL=$(top_builddir)/src/common/libcommon-gpl.la
 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
+LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
 
 noinst_PROGRAMS = ini_config
 EXTRA_DIST = test_ini_config sample.ini
 
 ini_config_SOURCES = ini_config.c
-ini_config_LDADD = $(LIBTAP) $(LIBCONFIG) $(LIBCOMMON) $(LIBHASHTABLE) \
-       $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
+ini_config_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(LIBHASHTABLE)
+
 
 all-local:
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
This page took 0.035456 seconds and 4 git commands to generate.