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 1E7C015800A for ; Sat, 19 Aug 2023 16:52:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7779F2BC016; Sat, 19 Aug 2023 16:52:34 +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 5F3702BC016 for ; Sat, 19 Aug 2023 16:52:34 +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 A760A340F71 for ; Sat, 19 Aug 2023 16:52:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 510D61030 for ; Sat, 19 Aug 2023 16:52:32 +0000 (UTC) From: "Rick Farina" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Rick Farina" Message-ID: <1692463942.ba8af77236e305238af645e3dc45703c1b5dab6b.zerochaos@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/wireless-regdb/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-wireless/wireless-regdb/wireless-regdb-20230503-r1.ebuild net-wireless/wireless-regdb/wireless-regdb-20230503.ebuild X-VCS-Directories: net-wireless/wireless-regdb/ X-VCS-Committer: zerochaos X-VCS-Committer-Name: Rick Farina X-VCS-Revision: ba8af77236e305238af645e3dc45703c1b5dab6b X-VCS-Branch: master Date: Sat, 19 Aug 2023 16:52:32 +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: 3ffbc311-90ed-430b-bab0-495bc9515396 X-Archives-Hash: 9f17bb8f9cb5ffb8e355b8e6477d5a3e commit: ba8af77236e305238af645e3dc45703c1b5dab6b Author: Rick Farina gentoo org> AuthorDate: Sat Aug 19 15:54:05 2023 +0000 Commit: Rick Farina gentoo org> CommitDate: Sat Aug 19 16:52:22 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba8af772 net-wireless/wireless-regdb: allow crda coexistence Signed-off-by: Rick Farina gentoo.org> .../wireless-regdb-20230503-r1.ebuild | 75 ++++++++++++++++++++++ .../wireless-regdb/wireless-regdb-20230503.ebuild | 67 ------------------- 2 files changed, 75 insertions(+), 67 deletions(-) diff --git a/net-wireless/wireless-regdb/wireless-regdb-20230503-r1.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20230503-r1.ebuild new file mode 100644 index 000000000000..48c69e75e76d --- /dev/null +++ b/net-wireless/wireless-regdb/wireless-regdb-20230503-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info + +MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}" +DESCRIPTION="Wireless Regulatory database for Linux" +HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb" +SRC_URI="https://mirrors.edge.kernel.org/pub/software/network/${PN}/${MY_P}.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="crda" + +RDEPEND="crda? ( net-wireless/crda )" + +REQUIRED_USE="kernel_linux" + +pkg_pretend() { + if kernel_is -ge 4 15; then + if linux_config_exists && linux_chkconfig_builtin CFG80211 && + [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != *regulatory.db* ]] + then + ewarn "REGULATORY DOMAIN PROBLEM:" + ewarn " With CONFIG_CFG80211=y (built-in), the driver won't be able to load regulatory.db from" + ewarn " /lib/firmware, resulting in broken regulatory domain support. Please set CONFIG_CFG80211=m" + ewarn " or add regulatory.db and regulatory.db.p7s to CONFIG_EXTRA_FIRMWARE." + fi + if linux_config_exists && ! linux_chkconfig_present CFG80211; then + ewarn "REGULARTORY DOMAIN PROBLEM:" + ewarn " With CONFIG_CFG80211 unset the wireless dirvers won't be able to load the regulatory.db" + ewarn " which this ebuild installs. Please set CONFIG_CFG80211=m." + fi + + has_version net-wireless/crda && \ + ewarn "Starting from kernel version 4.15 net-wireless/crda is no longer needed." + + CONFIG_CHECK="EXPERT ~!CFG80211_CRDA_SUPPORT" + WARNING_CFG80211_CRDA_SUPPORT="You can safely disable CFG80211_CRDA_SUPPORT" + else + CONFIG_CHECK="~CFG80211_CRDA_SUPPORT" + WARNING_CFG80211_CRDA_SUPPORT="REGULATORY DOMAIN PROBLEM: \ +please enable CFG80211_CRDA_SUPPORT for proper regulatory domain support" + fi + + check_extra_config +} + +src_compile() { + einfo "Recompiling regulatory.bin from db.txt would break CRDA verify. Installing unmodified binary version." +} + +src_install() { + if use crda; then + # This file is not ABI-specific, and crda itself always hardcodes + # this path. So install into a common location for all ABIs to use. + insinto /usr/lib/crda + doins regulatory.bin + + insinto /etc/wireless-regdb/pubkeys + doins sforshee.key.pub.pem + doman -i18n= regulatory.bin.5 + fi + # install the files the kernel needs unconditionally, + # they are small and kernels get upgraded + insinto /lib/firmware + doins regulatory.db regulatory.db.p7s + + doman -i18n= regulatory.db.5 + dodoc README db.txt +} diff --git a/net-wireless/wireless-regdb/wireless-regdb-20230503.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20230503.ebuild deleted file mode 100644 index 2454742db728..000000000000 --- a/net-wireless/wireless-regdb/wireless-regdb-20230503.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit linux-info - -MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}" -DESCRIPTION="Regulatory database for Linux" -HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb" -SRC_URI="https://mirrors.edge.kernel.org/pub/software/network/${PN}/${MY_P}.tar.xz" -S="${WORKDIR}/${MY_P}" - -LICENSE="ISC" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" -IUSE="crda" - -RDEPEND="crda? ( net-wireless/crda )" - -REQUIRED_USE="kernel_linux" - -pkg_pretend() { - if kernel_is -ge 4 15; then - if linux_config_exists && linux_chkconfig_builtin CFG80211 && - [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != *regulatory.db* ]] - then - ewarn "REGULATORY DOMAIN PROBLEM:" - ewarn " With CONFIG_CFG80211=y (built-in), the driver won't be able to load regulatory.db from" - ewarn " /lib/firmware, resulting in broken regulatory domain support. Please set CONFIG_CFG80211=m" - ewarn " or add regulatory.db and regulatory.db.p7s to CONFIG_EXTRA_FIRMWARE." - fi - - has_version net-wireless/crda && \ - ewarn "Starting from kernel version 4.15 net-wireless/crda is no longer needed." - - CONFIG_CHECK="EXPERT !CFG80211_CRDA_SUPPORT" - WARNING_CFG80211_CRDA_SUPPORT="You can safely disable CFG80211_CRDA_SUPPORT" - else - CONFIG_CHECK="~CFG80211_CRDA_SUPPORT" - WARNING_CFG80211_CRDA_SUPPORT="REGULATORY DOMAIN PROBLEM: \ -please enable CFG80211_CRDA_SUPPORT for proper regulatory domain support" - fi - - check_extra_config -} - -src_compile() { - true -} - -src_install() { - if kernel_is -lt 4 15; then - # This file is not ABI-specific, and crda itself always hardcodes - # this path. So install into a common location for all ABIs to use. - insinto /usr/lib/crda - doins regulatory.bin - - insinto /etc/wireless-regdb/pubkeys - doins sforshee.key.pub.pem - else - insinto /lib/firmware - doins regulatory.db regulatory.db.p7s - fi - doman -i18n= regulatory.bin.5 regulatory.db.5 - dodoc README db.txt -}