summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2023-06-17 18:15:56 +0200
committerRick Farina <zerochaos@gentoo.org>2023-08-19 12:52:22 -0400
commitcd8745032a7ededa08f9ecfddf60a77e53873de4 (patch)
tree96f039675fb6255c68a1cbc148c6fde4eb9ee9a5 /net-wireless/wireless-regdb
parentdev-python/pydantic-core: Keyword 2.6.1 s390, #909772 (diff)
downloadgentoo-cd8745032a7ededa08f9ecfddf60a77e53873de4.tar.gz
gentoo-cd8745032a7ededa08f9ecfddf60a77e53873de4.tar.bz2
gentoo-cd8745032a7ededa08f9ecfddf60a77e53873de4.zip
net-wireless/wireless-regdb: remove crda for kernel >=4.15
Kernel version >=4.15 removed the need for net-wireless/crda. For versions >=4.15 this update: - ensures net-wireless/crda is no longer installed - copied kernel config_check from net-wireless/iwd to ensure loading Bug: https://bugs.gentoo.org/898162 Closes: https://github.com/gentoo/gentoo/pull/31514 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'net-wireless/wireless-regdb')
-rw-r--r--net-wireless/wireless-regdb/metadata.xml3
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20220218-r1.ebuild67
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20220408-r1.ebuild67
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20220606-r1.ebuild67
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20220812.ebuild50
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20230213.ebuild50
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20230503.ebuild48
7 files changed, 323 insertions, 29 deletions
diff --git a/net-wireless/wireless-regdb/metadata.xml b/net-wireless/wireless-regdb/metadata.xml
index a61f7bfb3196..101c017e6f75 100644
--- a/net-wireless/wireless-regdb/metadata.xml
+++ b/net-wireless/wireless-regdb/metadata.xml
@@ -6,4 +6,7 @@
<name>Rick Farina</name>
</maintainer>
<stabilize-allarches/>
+ <use>
+ <flag name="crda">Use obsolete <pkg>net-wireless/crda</pkg> for regulatory domain loading instead of in-kernel (4.15+) support</flag>
+ </use>
</pkgmetadata>
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20220218-r1.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20220218-r1.ebuild
new file mode 100644
index 000000000000..2454742db728
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20220218-r1.ebuild
@@ -0,0 +1,67 @@
+# 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
+}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20220408-r1.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20220408-r1.ebuild
new file mode 100644
index 000000000000..2454742db728
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20220408-r1.ebuild
@@ -0,0 +1,67 @@
+# 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
+}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20220606-r1.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20220606-r1.ebuild
new file mode 100644
index 000000000000..2454742db728
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20220606-r1.ebuild
@@ -0,0 +1,67 @@
+# 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
+}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20220812.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20220812.ebuild
index b684d0aeffa7..2454742db728 100644
--- a/net-wireless/wireless-regdb/wireless-regdb-20220812.ebuild
+++ b/net-wireless/wireless-regdb/wireless-regdb-20220812.ebuild
@@ -3,21 +3,54 @@
EAPI=8
+inherit linux-info
+
MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
-DESCRIPTION="Binary regulatory database for CRDA"
+DESCRIPTION="Regulatory database for Linux"
HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb"
-SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${MY_P}.tar.xz"
+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() {
- einfo "Recompiling regulatory.bin from db.txt would break CRDA verify. Installing unmodified binary version."
+ 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
@@ -25,13 +58,10 @@ src_install() {
insinto /etc/wireless-regdb/pubkeys
doins sforshee.key.pub.pem
-
- # Linux 4.15 now complains if the firmware loader
- # can't find these files #643520
+ else
insinto /lib/firmware
- doins regulatory.db
- doins regulatory.db.p7s
-
- doman regulatory.bin.5
+ doins regulatory.db regulatory.db.p7s
+ fi
+ doman -i18n= regulatory.bin.5 regulatory.db.5
dodoc README db.txt
}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20230213.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20230213.ebuild
index b684d0aeffa7..2454742db728 100644
--- a/net-wireless/wireless-regdb/wireless-regdb-20230213.ebuild
+++ b/net-wireless/wireless-regdb/wireless-regdb-20230213.ebuild
@@ -3,21 +3,54 @@
EAPI=8
+inherit linux-info
+
MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
-DESCRIPTION="Binary regulatory database for CRDA"
+DESCRIPTION="Regulatory database for Linux"
HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb"
-SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${MY_P}.tar.xz"
+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() {
- einfo "Recompiling regulatory.bin from db.txt would break CRDA verify. Installing unmodified binary version."
+ 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
@@ -25,13 +58,10 @@ src_install() {
insinto /etc/wireless-regdb/pubkeys
doins sforshee.key.pub.pem
-
- # Linux 4.15 now complains if the firmware loader
- # can't find these files #643520
+ else
insinto /lib/firmware
- doins regulatory.db
- doins regulatory.db.p7s
-
- doman regulatory.bin.5
+ doins regulatory.db regulatory.db.p7s
+ fi
+ doman -i18n= regulatory.bin.5 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
index 5a750ea025a0..2454742db728 100644
--- a/net-wireless/wireless-regdb/wireless-regdb-20230503.ebuild
+++ b/net-wireless/wireless-regdb/wireless-regdb-20230503.ebuild
@@ -3,8 +3,10 @@
EAPI=8
+inherit linux-info
+
MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
-DESCRIPTION="Binary regulatory database for CRDA"
+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}"
@@ -12,12 +14,43 @@ 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() {
- einfo "Recompiling regulatory.bin from db.txt would break CRDA verify. Installing unmodified binary version."
+ 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
@@ -25,13 +58,10 @@ src_install() {
insinto /etc/wireless-regdb/pubkeys
doins sforshee.key.pub.pem
-
- # Linux 4.15 now complains if the firmware loader
- # can't find these files #643520
+ else
insinto /lib/firmware
- doins regulatory.db
- doins regulatory.db.p7s
-
- doman regulatory.bin.5
+ doins regulatory.db regulatory.db.p7s
+ fi
+ doman -i18n= regulatory.bin.5 regulatory.db.5
dodoc README db.txt
}