From 121daab31970a365a070369159d4b8f8fae900b8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 13:00:11 +0000 Subject: import babeltrace-1.5.8-10.el9 --- diff --git a/SOURCES/babeltrace-getaddrinfo.patch b/SOURCES/babeltrace-getaddrinfo.patch new file mode 100644 index 0000000..d77a024 --- /dev/null +++ b/SOURCES/babeltrace-getaddrinfo.patch @@ -0,0 +1,106 @@ +*** babeltrace-1.5.8.orig/configure.ac 2021-04-22 09:56:01.645909350 -0700 +--- babeltrace-1.5.8/configure.ac 2021-04-22 10:41:30.537328243 -0700 +*************** AC_CHECK_FUNCS([ \ +*** 102,108 **** + dirfd \ + dup2 \ + ftruncate \ +! gethostbyname \ + gethostname \ + gettimeofday \ + localtime_r \ +--- 102,108 ---- + dirfd \ + dup2 \ + ftruncate \ +! getaddrinfo \ + gethostname \ + gettimeofday \ + localtime_r \ +*** babeltrace-1.5.8.orig/formats/lttng-live/lttng-live-comm.c 2021-04-22 09:56:01.662909278 -0700 +--- babeltrace-1.5.8/formats/lttng-live/lttng-live-comm.c 2021-04-22 11:01:13.166302197 -0700 +*************** ssize_t lttng_live_send(int fd, const vo +*** 111,149 **** + + int lttng_live_connect_viewer(struct lttng_live_ctx *ctx) + { +- struct hostent *host; +- struct sockaddr_in server_addr; + int ret; + + if (lttng_live_should_quit()) { + ret = -1; + goto end; + } + +! host = gethostbyname(ctx->relay_hostname); +! if (!host) { +! fprintf(stderr, "[error] Cannot lookup hostname %s\n", +! ctx->relay_hostname); + goto error; + } + +! if ((ctx->control_sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { + perror("Socket"); + goto error; + } + +! server_addr.sin_family = AF_INET; +! server_addr.sin_port = htons(ctx->port); +! server_addr.sin_addr = *((struct in_addr *) host->h_addr); +! memset(&(server_addr.sin_zero), 0, 8); +! +! if (connect(ctx->control_sock, (struct sockaddr *) &server_addr, +! sizeof(struct sockaddr)) == -1) { + perror("Connect"); + goto error; + } + + ret = 0; + + end: + return ret; +--- 111,153 ---- + + int lttng_live_connect_viewer(struct lttng_live_ctx *ctx) + { + int ret; ++ struct addrinfo hints, *res; ++ char port[16]; + + if (lttng_live_should_quit()) { + ret = -1; + goto end; + } + +! memset(&hints, 0, sizeof(hints)); +! hints.ai_family = AF_INET; +! hints.ai_socktype = SOCK_STREAM; +! sprintf(port, "%d", ctx->port); +! +! ret = getaddrinfo(ctx->relay_hostname, port, &hints, &res); +! if (ret != 0) { +! fprintf(stderr, "[error] getaddrinfo: %s\n", +! gai_strerror(ret)); + goto error; + } + +! ctx->control_sock = socket(res->ai_family, res->ai_socktype, +! res->ai_protocol); +! if (ctx->control_sock == -1) { + perror("Socket"); ++ freeaddrinfo(res); + goto error; + } + +! if (connect(ctx->control_sock, res->ai_addr, res->ai_addrlen) == -1) { + perror("Connect"); ++ freeaddrinfo(res); + goto error; + } + + ret = 0; ++ freeaddrinfo(res); + + end: + return ret; diff --git a/SPECS/babeltrace.spec b/SPECS/babeltrace.spec index cb6d96c..b1d8a74 100644 --- a/SPECS/babeltrace.spec +++ b/SPECS/babeltrace.spec @@ -1,6 +1,6 @@ Name: babeltrace Version: 1.5.8 -Release: 8%{?dist} +Release: 10%{?dist} Summary: Trace Viewer and Converter, mainly for the Common Trace Format License: MIT and GPLv2 URL: https://www.efficios.com/babeltrace @@ -9,6 +9,7 @@ Source1: https://www.efficios.com/files/%{name}/%{name}-%{version}.tar.bz # gpg2 --export --export-options export-minimal 7F49314A26E0DE78427680E05F1B2A0789F12B11 > gpgkey-7F49314A26E0DE78427680E05F1B2A0789F12B11.gpg Source2: gpgkey-7F49314A26E0DE78427680E05F1B2A0789F12B11.gpg Patch0: python39.patch +Patch1: babeltrace-getaddrinfo.patch BuildRequires: bison >= 2.4 BuildRequires: flex >= 2.5.35 @@ -116,6 +117,14 @@ rm -f %{buildroot}/%{_pkgdocdir}/std-ext-lib.txt %changelog +* Wed Mar 16 2022 Bruno Larsen - 1.5.8-10 +- Use getaddrinfo instead of gethostbyname. + (Keith Seitz) + +* Tue Mar 15 2022 Bruno Larsen - 1.6.8-9 +- Bumped NVR to release subpackage + Related: rhbz#2058409 + * Mon Aug 09 2021 Mohan Boddu - 1.5.8-8 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688