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>
Thu, 20 Jan 2022 19:43:45 +0000 (14:43 -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.

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 209f5bd61d4293a0c740b74ccbd4a8d22b510a11..73428d9bef9b54fdd208ced14e09b1c2a4b392f6 100644 (file)
@@ -22,7 +22,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 37fc6d5244ca85ad30dfeebdfa464f826aee06af..0e8ec982ad660e57c5f827cd96ff30e35215f118 100644 (file)
@@ -11,7 +11,7 @@ lttng_consumerd_SOURCES = \
 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 b4231f3e99e739ca5a47bddd39987f918e0fab9c..5d3946b0377e2dca75fa5c0435650af6f103c463 100644 (file)
@@ -10,5 +10,5 @@ bin_PROGRAMS = lttng-crash
 
 lttng_crash_SOURCES = lttng-crash.cpp
 
-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 10ad3a0ab4317b1fe9d1a114dd30f01a15ff9841..f16a98d64a0aa2727e771b2fd64eb3d2230cd8e8 100644 (file)
@@ -29,7 +29,7 @@ lttng_relayd_SOURCES = main.cpp lttng-relayd.h utils.h utils.cpp cmd.h \
 
 # link on liblttngctl for check if relayd is already alive.
 lttng_relayd_LDADD = $(URCU_LIBS) \
-               $(top_builddir)/src/common/libcommon.la \
+               $(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/compat/libcompat.la \
index 2de44a492d427564650fd0d5c4ec8cf181e88519..a7cbdc523fae0efca8babdb3cb5abee360d30afb 100644 (file)
@@ -73,7 +73,7 @@ liblttng_sessiond_common_la_LIBADD = $(URCU_LIBS) $(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 f1c04a3e94aef453f048dd21e53d9865a7f8f7f0..1d153e7a72add99f08653e3803cca6fef5a92edd 100644 (file)
@@ -39,7 +39,7 @@ lttng_SOURCES = command.h conf.cpp conf.h commands/start.cpp \
 lttng_CXXFLAGS = $(AM_CXXFLAGS) $(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 \
                        $(top_builddir)/src/common/filter/libfilter.la \
index 7ac2b09ccc9eaca9c35c28eb8621b384405d68a0..8cd93af44b2f02237cae292e528146cfcdcc02c6 100644 (file)
@@ -38,10 +38,10 @@ DIST_SUBDIRS = \
        argpar-utils
 
 # Common library
-noinst_LTLIBRARIES = libcommon.la
+noinst_LTLIBRARIES = libcommon-gpl.la
 EXTRA_DIST = mi-lttng-4.1.xsd
 
-libcommon_la_SOURCES = \
+libcommon_gpl_la_SOURCES = \
        actions/action.cpp \
        actions/list.cpp \
        actions/notify.cpp \
@@ -115,11 +115,11 @@ libcommon_la_SOURCES = \
        waiter.cpp waiter.h
 
 if HAVE_ELF_H
-libcommon_la_SOURCES += \
+libcommon_gpl_la_SOURCES += \
        lttng-elf.cpp lttng-elf.h
 endif
 
-libcommon_la_LIBADD = \
+libcommon_gpl_la_LIBADD = \
        $(top_builddir)/src/common/bytecode/libbytecode.la \
        $(top_builddir)/src/common/config/libconfig.la \
        $(top_builddir)/src/common/ini-config/libini-config.la \
@@ -182,7 +182,7 @@ noinst_HEADERS = \
 noinst_PROGRAMS = filter-grammar-test
 filter_grammar_test_SOURCES = filter-grammar-test.cpp
 filter_grammar_test_LDADD = \
-       libcommon.la
+       libcommon-gpl.la
 
 all-local:
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
index b31e5bd6f819e79f6b45caa10a659bfe37de4a8a..590ed2fd8cf708bf33002140a50ea214793225f5 100644 (file)
@@ -31,7 +31,7 @@ EXTRA_DIST = liblttng-ctl.sym
 
 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
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = lttng-ctl.pc
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 c67cde86d3ca3546da73dc685482e3327779a321..dcbeba9a4b5dc6157137a4527b7e7225de359a41 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
index 4029a21263d640dd572d130113c08aaea63192fd..a59ee8d6daeb825e4e3e29c07f4f2bbad70f8831 100644 (file)
@@ -38,14 +38,14 @@ FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
 libpause_consumer_la_SOURCES = consumer_testpoints.cpp
 libpause_consumer_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/liblttng-ctl.la \
        $(DL_LIBS)
 libpause_consumer_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS)
 
 libpause_sessiond_la_SOURCES = sessiond_testpoints.cpp
 libpause_sessiond_la_LIBADD = \
-       $(top_builddir)/src/common/libcommon.la \
+       $(top_builddir)/src/common/libcommon-gpl.la \
        $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
        $(DL_LIBS)
 libpause_sessiond_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS)
@@ -63,7 +63,7 @@ rotation_SOURCES = rotation.c
 rotation_LDADD = $(LIB_LTTNG_CTL) $(LIBTAP) -lm
 
 default_pipe_size_getter_SOURCES = default_pipe_size_getter.cpp
-default_pipe_size_getter_LDADD = $(top_builddir)/src/common/libcommon.la
+default_pipe_size_getter_LDADD = $(top_builddir)/src/common/libcommon-gpl.la
 
 noinst_SCRIPTS = \
        test_notification_kernel_buffer_usage \
index e555b0149479d30b69cf0d2232e14cb734770fb0..6441e2efbdfbd77026a262c6cadf38b171183218 100644 (file)
@@ -36,7 +36,7 @@ TESTS = \
 
 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
@@ -79,7 +79,7 @@ endif
 
 # URI unit tests
 test_uri_SOURCES = test_uri.cpp
-test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
+test_uri_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBHASHTABLE) $(DL_LIBS)
 
 RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
 
@@ -104,33 +104,33 @@ test_kernel_data_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS)
 
 # parse_size_suffix unit test
 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.cpp
-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.cpp
-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.cpp
 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)
 
 # compat_pthread unit test
 test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.cpp
 test_utils_compat_pthread_LDADD  = $(LIBTAP) \
-                     $(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.cpp
-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.cpp
-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.cpp
-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.cpp
@@ -138,55 +138,55 @@ test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
 
 # Event rule api
 test_event_rule_SOURCES = test_event_rule.cpp
-test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \
+test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \
                      $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT)
 
 # Condition api
 test_condition_SOURCES = test_condition.cpp
-test_condition_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
+test_condition_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(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.cpp
-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
 
 # rate policy object unit test
 test_rate_policy_SOURCES = test_rate_policy.cpp
-test_rate_policy_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \
+test_rate_policy_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \
                      $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT)
 
 # fd tracker unit test
 test_fd_tracker_SOURCES = test_fd_tracker.cpp
-test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON) $(LIBHASHTABLE)
+test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON_GPL) $(LIBHASHTABLE)
 
 # uuid unit test
 test_uuid_SOURCES = test_uuid.cpp
-test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
+test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON_GPL)
 
 # buffer view unit test
 test_buffer_view_SOURCES = test_buffer_view.cpp
-test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON)
+test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON_GPL)
 
 # payload unit test
 test_payload_SOURCES = test_payload.cpp
-test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
+test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL)
 
 # unix socket test
 test_unix_socket_SOURCES = test_unix_socket.cpp
-test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
+test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL)
 
 # Kernel probe location api test
 test_kernel_probe_SOURCES = test_kernel_probe.cpp
-test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
+test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS)
 #
 # Event expression to bytecode test
 test_event_expr_to_bytecode_SOURCES = test_event_expr_to_bytecode.cpp
-test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON)
+test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON_GPL)
 
 # Log level rule api
 test_log_level_rule_SOURCES = test_log_level_rule.cpp
-test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
+test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS)
 
 # Action api
 test_action_SOURCES = test_action.cpp
-test_action_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
+test_action_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS)
index f7bf287708f822a918ab8b67bbc3684d1bb2cffb..76a6cb6bfae4ded9f2fe0ec0b1d23a377a3f4bc7 100644 (file)
@@ -3,14 +3,14 @@
 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/
 
 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.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
 
 noinst_PROGRAMS = ini_config
 EXTRA_DIST = test_ini_config sample.ini
 
 ini_config_SOURCES = ini_config.cpp
-ini_config_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
+ini_config_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBHASHTABLE)
 
 all-local:
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
This page took 0.034339 seconds and 5 git commands to generate.