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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 794C3158020 for ; Tue, 8 Nov 2022 17:05:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BDEB2E0A0B; Tue, 8 Nov 2022 17:05:49 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A3F7AE0A0B for ; Tue, 8 Nov 2022 17:05:49 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DEC3833BF01 for ; Tue, 8 Nov 2022 17:05:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6486F70D for ; Tue, 8 Nov 2022 17:05:47 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1667927079.8bacde9ab38c268737a14ffa2c5c239c406d23d8.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgcrypt/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild X-VCS-Directories: dev-libs/libgcrypt/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 8bacde9ab38c268737a14ffa2c5c239c406d23d8 X-VCS-Branch: master Date: Tue, 8 Nov 2022 17:05:47 +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: e4e06a0a-86f6-4e7d-a8d2-abbf998b9a90 X-Archives-Hash: ef436baab770252657c6e5a100fce4e7 commit: 8bacde9ab38c268737a14ffa2c5c239c406d23d8 Author: Mike Gilbert gentoo org> AuthorDate: Fri Nov 4 15:55:40 2022 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Tue Nov 8 17:04:39 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bacde9a dev-libs/libgcrypt: add kernel version check for getentropy Signed-off-by: Mike Gilbert gentoo.org> dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild b/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild index 844c21219fb8..5614f817ecb3 100644 --- a/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild +++ b/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild @@ -4,7 +4,7 @@ EAPI=7 VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc -inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig +inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig DESCRIPTION="General purpose crypto library based on the code used in GnuPG" HOMEPAGE="https://www.gnupg.org/" @@ -52,6 +52,27 @@ MULTILIB_CHOST_TOOLS=( /usr/bin/libgcrypt-config ) +pkg_pretend() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + if use kernel_linux && use getentropy; then + unset KV_FULL + get_running_version + if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then + eerror "The getentropy function requires the getrandom syscall." + eerror "This was introduced in Linux 3.17." + eerror "Your system is currently running Linux ${KV_FULL}." + eerror "Disable the 'getentropy' USE flag or upgrade your kernel." + die "Kernel is too old for getentropy" + fi + fi +} + +pkg_setup() { + : +} + src_prepare() { default eautoreconf