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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3E240158086 for ; Wed, 24 Nov 2021 02:24:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6CF48E08BB; Wed, 24 Nov 2021 02:24:53 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5106CE08BB for ; Wed, 24 Nov 2021 02:24:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4EEE7342F95 for ; Wed, 24 Nov 2021 02:24:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9D67F1D8 for ; Wed, 24 Nov 2021 02:24:50 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1637720387.ac00d0d8ce29825d65b1ecfbb894e9d0310eedd3.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bazel/files/, dev-util/bazel/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/bazel/bazel-3.7.2-r1.ebuild dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch X-VCS-Directories: dev-util/bazel/files/ dev-util/bazel/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ac00d0d8ce29825d65b1ecfbb894e9d0310eedd3 X-VCS-Branch: master Date: Wed, 24 Nov 2021 02:24:50 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c522aef6-7906-40e3-9df6-bab8469783f7 X-Archives-Hash: cbe26d4b64ee2526e536e04dc1175709 commit: ac00d0d8ce29825d65b1ecfbb894e9d0310eedd3 Author: Sam James gentoo org> AuthorDate: Wed Nov 24 02:19:47 2021 +0000 Commit: Sam James gentoo org> CommitDate: Wed Nov 24 02:19:47 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac00d0d8 dev-util/bazel: add upstream musl patch Closes: https://bugs.gentoo.org/815907 Signed-off-by: Sam James gentoo.org> dev-util/bazel/bazel-3.7.2-r1.ebuild | 1 + .../bazel-3.7.2-musl-temp-failure-retry.patch | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/dev-util/bazel/bazel-3.7.2-r1.ebuild b/dev-util/bazel/bazel-3.7.2-r1.ebuild index 2575046bfcb7..db3f1fbbb8c0 100644 --- a/dev-util/bazel/bazel-3.7.2-r1.ebuild +++ b/dev-util/bazel/bazel-3.7.2-r1.ebuild @@ -66,6 +66,7 @@ src_prepare() { addpredict /proc eapply "${FILESDIR}/${PN}-3.2.0-include-limits-for-gcc-11.patch" + eapply "${FILESDIR}/${PN}-3.7.2-musl-temp-failure-retry.patch" } src_compile() { diff --git a/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch b/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch new file mode 100644 index 000000000000..4c8648bb639f --- /dev/null +++ b/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/815907 +https://github.com/bazelbuild/bazel/commit/bcce6dd026e90336e80616a8c1004a79a2f8640c + +From: philwo +Date: Thu, 20 May 2021 08:13:09 -0700 +Subject: [PATCH] Add the TEMP_FAILURE_RETRY macro to linux-sandbox-pid1.cc. + +This allows us to build Bazel on Linux systems which use a C standard library that does not include this macro, like Alpine Linux (which uses musl). + +Fixes #12460. + +PiperOrigin-RevId: 374873483 +--- a/src/main/tools/linux-sandbox-pid1.cc ++++ b/src/main/tools/linux-sandbox-pid1.cc +@@ -49,6 +49,19 @@ + #include + #endif + ++#ifndef TEMP_FAILURE_RETRY ++// Some C standard libraries like musl do not define this macro, so we'll ++// include our own version for compatibility. ++#define TEMP_FAILURE_RETRY(exp) \ ++ ({ \ ++ decltype(exp) _rc; \ ++ do { \ ++ _rc = (exp); \ ++ } while (_rc == -1 && errno == EINTR); \ ++ _rc; \ ++ }) ++#endif // TEMP_FAILURE_RETRY ++ + #include "src/main/tools/linux-sandbox-options.h" + #include "src/main/tools/linux-sandbox.h" + #include "src/main/tools/logging.h"