From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 84793139694 for ; Thu, 1 Jun 2017 14:19:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1B34E0E06; Thu, 1 Jun 2017 14:19:57 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7CF3EE0E06 for ; Thu, 1 Jun 2017 14:19:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 316C334177D for ; Thu, 1 Jun 2017 14:19:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C00F4745D for ; Thu, 1 Jun 2017 14:19:54 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1496326788.7ce43d2ae8bd68ae2c5f6964b26817851ed53cd1.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/files/8-stable/, app-admin/rsyslog/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-hostname-detection-when-getaddrinfo-fails.patch app-admin/rsyslog/rsyslog-8.27.0-r1.ebuild app-admin/rsyslog/rsyslog-8.27.0.ebuild X-VCS-Directories: app-admin/rsyslog/files/8-stable/ app-admin/rsyslog/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 7ce43d2ae8bd68ae2c5f6964b26817851ed53cd1 X-VCS-Branch: master Date: Thu, 1 Jun 2017 14:19:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8b48876a-af40-4652-9c84-7c304dd5f459 X-Archives-Hash: 0e707eb45e700ee09f2ba52e4b4ac8db commit: 7ce43d2ae8bd68ae2c5f6964b26817851ed53cd1 Author: Thomas Deutschmann gentoo org> AuthorDate: Thu Jun 1 14:19:26 2017 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Thu Jun 1 14:19:48 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ce43d2a app-admin/rsyslog: Rev bump to fix hostname detection without network See https://github.com/rsyslog/rsyslog/pull/1595 Package-Manager: Portage-2.3.5, Repoman-2.3.2 ...hostname-detection-when-getaddrinfo-fails.patch | 27 ++++++++++++++++++++++ ...slog-8.27.0.ebuild => rsyslog-8.27.0-r1.ebuild} | 1 + 2 files changed, 28 insertions(+) diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-hostname-detection-when-getaddrinfo-fails.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-hostname-detection-when-getaddrinfo-fails.patch new file mode 100644 index 00000000000..a9470ccf4b6 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-hostname-detection-when-getaddrinfo-fails.patch @@ -0,0 +1,27 @@ +From 1a7d3a088969b47798bc1da712ca2772f91a7c02 Mon Sep 17 00:00:00 2001 +From: Jiri Vymazal +Date: Wed, 31 May 2017 16:26:56 +0200 +Subject: [PATCH] Ignoring NONAME error from getaddrinfo so we have hostname + set even without working network + +--- + runtime/net.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/runtime/net.c b/runtime/net.c +index 2d8de9429..edffc677a 100644 +--- a/runtime/net.c ++++ b/runtime/net.c +@@ -1188,7 +1188,11 @@ getLocalHostname(uchar **ppName) + memset(&flags, 0, sizeof(flags)); + flags.ai_flags = AI_CANONNAME; + int error = getaddrinfo((char*)hnbuf, NULL, &flags, &res); +- if (error != 0) { ++ if (error != 0 && ++ error != EAI_NONAME && error != EAI_AGAIN && error != EAI_FAIL) { ++ /* If we get one of errors above, network is probably ++ * not working yet, so we fall back to local hostname below ++ */ + dbgprintf("getaddrinfo: %s\n", gai_strerror(error)); + ABORT_FINALIZE(RS_RET_IO_ERROR); + } diff --git a/app-admin/rsyslog/rsyslog-8.27.0.ebuild b/app-admin/rsyslog/rsyslog-8.27.0-r1.ebuild similarity index 99% rename from app-admin/rsyslog/rsyslog-8.27.0.ebuild rename to app-admin/rsyslog/rsyslog-8.27.0-r1.ebuild index ef11286bd70..c1791672bd3 100644 --- a/app-admin/rsyslog/rsyslog-8.27.0.ebuild +++ b/app-admin/rsyslog/rsyslog-8.27.0-r1.ebuild @@ -56,6 +56,7 @@ else PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.26.0-fix-zmq3-format-security.patch "${FILESDIR}"/8-stable/${PN}-8.27.0-fix-librdkafka-detection.patch + "${FILESDIR}"/8-stable/${PN}-8.27.0-fix-hostname-detection-when-getaddrinfo-fails.patch ) fi