Skip to content

Commit

Permalink
wireless-regdb: out mods aren't working so remove keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroChaos- committed Jan 11, 2024
1 parent 47533ed commit a8e9781
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 4 deletions.
1 change: 1 addition & 0 deletions net-wireless/wireless-regdb/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST wireless-regdb-2022.06.06.tar.xz 26636 BLAKE2B e7695b1d4173ec239645a1f9c0bdd8f9cef92da86d918f3b2a7904487787b1a8b6fce5a75d0b7fad7d8a25f1419a4771e509977a5e3b13dff03bc53e976609f6 SHA512 ee6e79eeef3bf995120d31741bac9592771cbf918401f83d0ee059ba4119f7d9667607c5218bd9eeb0011dd7083264cf39a1a0ad3ebfd37dcfd957b01f248e0d
DIST wireless-regdb-2023.05.03.tar.xz 27260 BLAKE2B e880be3bacd7409719ede3e104ea6af870e0fb4edaefa6c61615ca74a8169a159348d631a4c296e273f6cc6e01ced2089e56c10080dd15a7439d8b4510eff7b8 SHA512 9de4852a1d351c11399ca55ea2ad61be23f488c61595b5c5afa3498d76488adc8120c6c77644275c460efcd1bb5bb68fa25597e73bec22ae847321bb55f7af27
8 changes: 8 additions & 0 deletions net-wireless/wireless-regdb/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>sidhayn@gmail.com</email>
<name>Zero_Chaos</name>
</maintainer>
</pkgmetadata>
7 changes: 4 additions & 3 deletions net-wireless/wireless-regdb/wireless-regdb-20220606-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ IUSE="pentoo"

LICENSE="ISC"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
#This doesn't seem to work right without CRDA and I need to fix that because crda is being removed soon
#KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"

BDEPEND="${PYTHON_DEPS}
$(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]')"
Expand All @@ -37,8 +38,8 @@ src_prepare() {

src_compile() {
if use pentoo; then
emake install-distro-key || die "make install-distro-key failed"
emake -j1 || die "emake failed"
emake -j1 --shuffle=none install-distro-key || die "make install-distro-key failed"
emake -j1 --shuffle=none || die "emake failed"
fi
true
}
Expand Down
102 changes: 102 additions & 0 deletions net-wireless/wireless-regdb/wireless-regdb-20230503-r2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit linux-info python-utils-r1

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"
#This doesn't seem to work right without CRDA and I need to fix that because crda is being removed soon
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="crda pentoo"

#PDEPEND is required here or crda test dep causes circular deps
PDEPEND="crda? ( net-wireless/crda )"

BDEPEND="${PYTHON_DEPS}
pentoo? ( dev-python/m2crypto )"

python_check_deps() {
python_has_version "dev-python/m2crypto"
}

REQUIRED_USE="kernel_linux"

pkg_pretend() {
if kernel_is -ge 4 15; then
if linux_config_exists; then
if 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(s) 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_chkconfig_present CFG80211; then
ewarn "REGULARTORY DOMAIN PROBLEM:"
ewarn " With CONFIG_CFG80211 unset, the driver(s) won't be able to load the regulatory.db from"
ewarn " /lib/firmware, resulting in broken regulatory domain support. Please set CONFIG_CFG80211=m."
fi
if linux_chkconfig_present EXPERT && linux_chkconfig_present CFG80211_CRDA_SUPPORT; then
ewarn "You can safely disable CFG80211_CRDA_SUPPORT"
fi
fi

if has_version net-wireless/crda || use crda; then
ewarn "Starting from kernel version 4.15 net-wireless/crda is no longer needed."
ewarn "The crda USE flag will be removed on or after Feb 01, 2024"
fi

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_prepare() {
#if use pentoo; then
# eapply "${FILESDIR}"/no-no-ir.patch
#fi
default
}

src_compile() {
if use pentoo; then
emake clean
emake -j1 --shuffle=none install-distro-key || die "make install-distro-key failed"
emake -j1 --shuffle=none || die "emake failed"
#emake -j1 --shuffle=none regulatory.db
#emake -j1 --shuffle=none regulatory.db.p7s
fi
true
}

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 *.key.pub.pem
fi
# install the files the kernel needs unconditionally,
# they are small and kernels get upgraded
insinto /lib/firmware
doins regulatory.db regulatory.db.p7s

# regulatory.db.5 is a reference to regulatory.bin.5 so you need both unconditionally
doman -i18n= regulatory.db.5 regulatory.bin.5
dodoc README db.txt
}
2 changes: 1 addition & 1 deletion profiles/pentoo/base/package.keywords/net-wireless
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<net-wireless/gqrx-9999 amd64 x86
<net-wireless/qdmr-9999 amd64 x86
=net-wireless/wpa_supplicant-2.10-r2 amd64 x86
<net-wireless/wireless-regdb-99999999 amd64 x86
#<net-wireless/wireless-regdb-99999999 amd64 x86

0 comments on commit a8e9781

Please sign in to comment.