diff --git a/sysutils/lttng-tools/Makefile b/sysutils/lttng-tools/Makefile index f49f0c9d2c23..47729e7c2930 100644 --- a/sysutils/lttng-tools/Makefile +++ b/sysutils/lttng-tools/Makefile @@ -1,41 +1,41 @@ # Created by: Mahdi Mokhtari PORTNAME= lttng-tools PORTVERSION= 2.9.3 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= sysutils MASTER_SITES= http://lttng.org/files/${PORTNAME}/ MAINTAINER= ports@FreeBSD.org COMMENT= Set of tools to control LTTng tracing LICENSE= LGPL21 GPLv2 LICENSE_COMB= dual LICENSE_FILE_LGPL21= ${WRKSRC}/lgpl-2.1.txt LICENSE_FILE_GPLv2= ${WRKSRC}/gpl-2.0.txt BROKEN_FreeBSD_13= ld: error: duplicate symbol: mi_lttng_element_load_override_url BROKEN_FreeBSD_14= ld: error: duplicate symbol: mi_lttng_element_load_override_url LIB_DEPENDS= libpopt.so:devel/popt \ liburcu.so:sysutils/liburcu \ liblttng-ust-ctl.so:sysutils/lttng-ust USES= autoreconf bison compiler:c11 gnome libtool localbase pathfix \ pkgconfig shebangfix tar:bzip2 USE_LDCONFIG= yes USE_GNOME= libxml2 GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-lttng-ust-prefix=${LOCALBASE} \ --disable-maintainer-mode INSTALL_TARGET= install-strip OPTIONS_DEFINE= DOCS post-install: ${INSTALL_MAN} ${WRKSRC}/doc/man/*.1 ${STAGEDIR}${MANPREFIX}/man/man1/ ${INSTALL_MAN} ${WRKSRC}/doc/man/*.3 ${STAGEDIR}${MANPREFIX}/man/man3/ ${INSTALL_MAN} ${WRKSRC}/doc/man/*.8 ${STAGEDIR}${MANPREFIX}/man/man8/ .include diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c index e22db4d04fc2..cf2fe604f8a9 100644 --- a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c +++ b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c @@ -1,12 +1,19 @@ ---- src/bin/lttng-sessiond/consumer.c.orig 2016-11-29 22:48:37 UTC -+++ src/bin/lttng-sessiond/consumer.c -@@ -635,6 +635,9 @@ int consumer_set_network_uri(struct cons +--- src/bin/lttng-sessiond/consumer.c.orig 2017-01-09 19:26:28 UTC ++++ src/bin/lttng-sessiond/consumer.c +@@ -17,6 +17,7 @@ + + #define _LGPL_SOURCE + #include ++#include + #include + #include + #include +@@ -635,7 +636,7 @@ int consumer_set_network_uri(struct consumer_output *o { int ret; char tmp_path[PATH_MAX]; -+#if defined(__FreeBSD__) -+ const size_t HOST_NAME_MAX = sysconf(_SC_HOST_NAME_MAX); -+#endif - char hostname[HOST_NAME_MAX]; +- char hostname[HOST_NAME_MAX]; ++ char hostname[_POSIX_HOST_NAME_MAX]; struct lttng_uri *dst_uri = NULL; + /* Code flow error safety net. */ diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h index b64470a2c107..2e98067379cb 100644 --- a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h +++ b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h @@ -1,14 +1,11 @@ ---- src/bin/lttng-sessiond/session.h.orig 2016-11-29 22:48:37 UTC +--- src/bin/lttng-sessiond/session.h.orig 2017-01-09 19:26:28 UTC +++ src/bin/lttng-sessiond/session.h -@@ -60,7 +60,11 @@ struct ltt_session_list { +@@ -60,7 +60,7 @@ struct ltt_session_list { */ struct ltt_session { char name[NAME_MAX]; -+#if defined(__FreeBSD__) -+ char hostname[256]; /* Local hostname. */ -+#else - char hostname[HOST_NAME_MAX]; /* Local hostname. */ -+#endif +- char hostname[HOST_NAME_MAX]; /* Local hostname. */ ++ char hostname[_POSIX_HOST_NAME_MAX]; /* Local hostname. */ struct ltt_kernel_session *kernel_session; struct ltt_ust_session *ust_session; /* diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c index 00271f154e85..e95b52ac1382 100644 --- a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c +++ b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c @@ -1,28 +1,36 @@ ---- src/bin/lttng-sessiond/ust-metadata.c.orig 2016-11-29 22:48:37 UTC +--- src/bin/lttng-sessiond/ust-metadata.c.orig 2017-01-09 19:26:28 UTC +++ src/bin/lttng-sessiond/ust-metadata.c -@@ -50,6 +50,7 @@ int _lttng_field_statedump(struct ust_re +@@ -50,6 +50,7 @@ int _lttng_field_statedump(struct ust_registry_session const struct ustctl_field *fields, size_t nr_fields, size_t *iter_field, size_t nesting); +#if !defined(__FreeBSD__) static inline int fls(unsigned int x) { @@ -79,6 +80,7 @@ int fls(unsigned int x) } return r; } +#endif static inline int get_count_order(unsigned int count) -@@ -879,6 +881,9 @@ int ust_metadata_session_statedump(struc +@@ -879,7 +881,7 @@ int ust_metadata_session_statedump(struct ust_registry char uuid_s[UUID_STR_LEN], clock_uuid_s[UUID_STR_LEN]; int ret = 0; -+#if defined(__FreeBSD__) -+ const size_t HOST_NAME_MAX = sysconf(_SC_HOST_NAME_MAX); -+#endif - char hostname[HOST_NAME_MAX]; +- char hostname[HOST_NAME_MAX]; ++ char hostname[_POSIX_HOST_NAME_MAX]; assert(session); + +@@ -940,7 +942,7 @@ int ust_metadata_session_statedump(struct ust_registry + hostname[0] = '\0'; + ret = gethostname(hostname, sizeof(hostname)); + if (ret && errno == ENAMETOOLONG) +- hostname[HOST_NAME_MAX - 1] = '\0'; ++ hostname[_POSIX_HOST_NAME_MAX - 1] = '\0'; + ret = lttng_metadata_printf(session, + "env {\n" + " hostname = \"%s\";\n" diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c b/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c index fba950a0426e..82f4d46c594a 100644 --- a/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c +++ b/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c @@ -1,12 +1,19 @@ ---- src/bin/lttng/commands/view.c.orig 2016-11-29 22:48:37 UTC +--- src/bin/lttng/commands/view.c.orig 2017-01-09 19:26:28 UTC +++ src/bin/lttng/commands/view.c -@@ -269,6 +269,9 @@ static char *build_live_path(char *sessi +@@ -17,6 +17,7 @@ + + #define _LGPL_SOURCE + #include ++#include + #include + #include + #include +@@ -269,7 +270,7 @@ static char *build_live_path(char *session_name) { int ret; char *path = NULL; -+#if defined(__FreeBSD__) -+ const size_t HOST_NAME_MAX = sysconf(_SC_HOST_NAME_MAX); -+#endif - char hostname[HOST_NAME_MAX]; +- char hostname[HOST_NAME_MAX]; ++ char hostname[_POSIX_HOST_NAME_MAX]; ret = gethostname(hostname, sizeof(hostname)); + if (ret < 0) {