diff options
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/Manifest.gz | bin | 13887 -> 13884 bytes | |||
-rw-r--r-- | net-wireless/soapyuhd/Manifest | 4 | ||||
-rw-r--r-- | net-wireless/soapyuhd/files/soapyuhd-0.4.1-uhd-4.8.patch | 43 | ||||
-rw-r--r-- | net-wireless/soapyuhd/soapyuhd-0.4.1-r1.ebuild | 28 | ||||
-rw-r--r-- | net-wireless/soapyuhd/soapyuhd-9999.ebuild | 8 | ||||
-rw-r--r-- | net-wireless/wepattack/Manifest | 3 | ||||
-rw-r--r-- | net-wireless/wepattack/files/wepattack-0.1.3-seds.patch | 48 | ||||
-rw-r--r-- | net-wireless/wepattack/files/wepattack-0.1.3-signals.patch | 13 | ||||
-rw-r--r-- | net-wireless/wepattack/wepattack-0.1.3-r7.ebuild | 60 | ||||
-rw-r--r-- | net-wireless/wpa_supplicant/Manifest | 1 | ||||
-rw-r--r-- | net-wireless/wpa_supplicant/wpa_supplicant-2.10-r5.ebuild | 477 |
11 files changed, 203 insertions, 482 deletions
diff --git a/net-wireless/Manifest.gz b/net-wireless/Manifest.gz Binary files differindex 5b1d2aabaa81..fa8ee503e102 100644 --- a/net-wireless/Manifest.gz +++ b/net-wireless/Manifest.gz diff --git a/net-wireless/soapyuhd/Manifest b/net-wireless/soapyuhd/Manifest index d31127e044d8..535bb6b5791e 100644 --- a/net-wireless/soapyuhd/Manifest +++ b/net-wireless/soapyuhd/Manifest @@ -1,4 +1,6 @@ +AUX soapyuhd-0.4.1-uhd-4.8.patch 1390 BLAKE2B b12cc53ac695ade10e42245116e4ab37d0550b34495b2596fcc9df19deb01956ecd27b6dd99eaf2eff9fa6f7dea3c110d935f5e9700307b99d82cce976fcaa6e SHA512 6de4de6b4c0735a41a3426c7e78b6e850e5cb99860699e259ba83ec24877bbe7b55f87022b4ff721ff149119584c323809d680f86603ac7299d6c29c9e3fd67a DIST soapyuhd-0.4.1.tar.gz 33838 BLAKE2B ee5639fda7213a7e3273c6bd27366a9d9f0e7d561655d316c19f055a008f31ed4362df945823bc3b5c159362ace9a7cc9fa7f943d2d128ba2b37047a71677352 SHA512 7a78ac386d92e4b36b36710f5943623ec8742cb770df69ac0c9bbd26827567277cb3309e3ad6eb0148b1b76083f16fdd188619700d38dcc5eab362b6db65340f +EBUILD soapyuhd-0.4.1-r1.ebuild 722 BLAKE2B 1e146502cf049ad102afcf38e4b25d61fd55630df507826817419c5842d3112a9dc9fcb83cf6ec4ec2db49593321cfb6fba0b3c3ff9cf446fcb3085d6150dc07 SHA512 3f39d5317d7306069a7818f817159067790390d4ce2e1f666a3bc9fd897a49928b616b9dd1d3c9b1debb6e5cb3c95c3ea235c7f037e8cb4071d22e2e78522e8f EBUILD soapyuhd-0.4.1.ebuild 648 BLAKE2B abfad5e4f47e3336fce09f17a748cbcb384a1551fad7e0b0b4ce6c1989f3f26a76af015ef4d1af9733163f730e29d4ea831fd1a94cb9d0244874a9990c512d65 SHA512 8133e132499059ed4492989553a8bde6b5261055176c42ac3a59ab929c5a2de7c964cbc7dfc218e855b8486bb395e0ac2a28bf119db006f02aab28fd7d0fba15 -EBUILD soapyuhd-9999.ebuild 637 BLAKE2B eaeddb5bd24f659dee39a1699f8828e7b2a578308b6c02b544b9809f8ff4924b29f215c551469301d1ee69b379fbf1a954a5809ff50e7b1613c0f977e0dac0ea SHA512 6a725dcbbe5445cbb38ebcd4ac0fc50975f379f5dcbbd6cacc9be5b130904d683f852140d78460bc1abd04fdde6bd7572c51f9f8dbef23f5239580d0019d9a0d +EBUILD soapyuhd-9999.ebuild 722 BLAKE2B 1e146502cf049ad102afcf38e4b25d61fd55630df507826817419c5842d3112a9dc9fcb83cf6ec4ec2db49593321cfb6fba0b3c3ff9cf446fcb3085d6150dc07 SHA512 3f39d5317d7306069a7818f817159067790390d4ce2e1f666a3bc9fd897a49928b616b9dd1d3c9b1debb6e5cb3c95c3ea235c7f037e8cb4071d22e2e78522e8f MISC metadata.xml 431 BLAKE2B 12571909a1964cdf9083b47c2fd60bc267515a2fb684b472c0d5d2a701ed2c1a204308f2ed2195e274442f1c979e9020a42ee7ebc573746bccee26c884fa0c67 SHA512 59b5211d71b99fa00edeb9deb38cad6c285e28f940422abd90022dfb334b7372312273fa6f53d47b4ed9e4da511505fbb8d5fe32f8c67add9689495b826b61ed diff --git a/net-wireless/soapyuhd/files/soapyuhd-0.4.1-uhd-4.8.patch b/net-wireless/soapyuhd/files/soapyuhd-0.4.1-uhd-4.8.patch new file mode 100644 index 000000000000..94356817204b --- /dev/null +++ b/net-wireless/soapyuhd/files/soapyuhd-0.4.1-uhd-4.8.patch @@ -0,0 +1,43 @@ +From 6eeee4fd3217166199068bbe05c555c2bccb2a7b Mon Sep 17 00:00:00 2001 +From: Ryan Volz <ryan.volz@gmail.com> +Date: Fri, 7 Feb 2025 11:09:35 -0500 +Subject: [PATCH] Define post_input_action/post_output_action for UHD 4.8+ + +--- + UHDSoapyDevice.cpp | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/UHDSoapyDevice.cpp b/UHDSoapyDevice.cpp +index 3ce66f3..88641c5 100644 +--- a/UHDSoapyDevice.cpp ++++ b/UHDSoapyDevice.cpp +@@ -707,6 +707,14 @@ class UHDSoapyRxStream : public uhd::rx_streamer + if (ret != 0) throw std::runtime_error(str(boost::format("UHDSoapyRxStream::issue_stream_cmd() = %d") % ret)); + } + ++ #if UHD_VERSION >= 4080000 ++ void post_input_action( ++ const std::shared_ptr<uhd::rfnoc::action_info>&, const size_t) override ++ { ++ throw uhd::not_implemented_error("post_input_action is not implemented here!"); ++ } ++ #endif ++ + private: + SoapySDR::Device *_device; + SoapySDR::Stream *_stream; +@@ -851,6 +859,14 @@ class UHDSoapyTxStream : public uhd::tx_streamer + return true; + } + ++ #if UHD_VERSION >= 4080000 ++ void post_output_action( ++ const std::shared_ptr<uhd::rfnoc::action_info>&, const size_t) override ++ { ++ throw uhd::not_implemented_error("post_output_action is not implemented here!"); ++ } ++ #endif ++ + private: + bool _active; + SoapySDR::Device *_device; diff --git a/net-wireless/soapyuhd/soapyuhd-0.4.1-r1.ebuild b/net-wireless/soapyuhd/soapyuhd-0.4.1-r1.ebuild new file mode 100644 index 000000000000..32a1a57cf8c5 --- /dev/null +++ b/net-wireless/soapyuhd/soapyuhd-0.4.1-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Soapy SDR plugins for UHD supported SDR devices" +HOMEPAGE="https://github.com/pothosware/SoapyUHD" + +if [ "${PV}" = "9999" ]; then + EGIT_REPO_URI="https://github.com/pothosware/SoapyUHD.git" + inherit git-r3 +else + KEYWORDS="~amd64 ~arm ~riscv ~x86" + SRC_URI="https://github.com/pothosware/SoapyUHD/archive/soapy-uhd-${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/SoapyUHD-soapy-uhd-"${PV}" + # picked up from git repo + PATCHES=( "${FILESDIR}"/${P}-uhd-4.8.patch ) +fi + +LICENSE="MIT" +SLOT="0" + +RDEPEND="net-wireless/soapysdr:= + net-wireless/uhd:= + dev-libs/boost:=" +DEPEND="${RDEPEND}" diff --git a/net-wireless/soapyuhd/soapyuhd-9999.ebuild b/net-wireless/soapyuhd/soapyuhd-9999.ebuild index dba31a72d677..32a1a57cf8c5 100644 --- a/net-wireless/soapyuhd/soapyuhd-9999.ebuild +++ b/net-wireless/soapyuhd/soapyuhd-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake @@ -12,9 +12,11 @@ if [ "${PV}" = "9999" ]; then EGIT_REPO_URI="https://github.com/pothosware/SoapyUHD.git" inherit git-r3 else - KEYWORDS="~amd64 ~x86" + KEYWORDS="~amd64 ~arm ~riscv ~x86" SRC_URI="https://github.com/pothosware/SoapyUHD/archive/soapy-uhd-${PV}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}"/SoapyUHD-soapy-uhd-"${PV}" + # picked up from git repo + PATCHES=( "${FILESDIR}"/${P}-uhd-4.8.patch ) fi LICENSE="MIT" diff --git a/net-wireless/wepattack/Manifest b/net-wireless/wepattack/Manifest index 000cf11870d6..e685b3ce3bbd 100644 --- a/net-wireless/wepattack/Manifest +++ b/net-wireless/wepattack/Manifest @@ -1,7 +1,10 @@ AUX wepattack-0.1.3-filter-mac-address.patch 6727 BLAKE2B cdd1ff764e3cc409baa80b06d180673fd78dee2e5c38b5b2986a89ea632b34e089cfc5251818bd4feb48ab8856663ee688c6838c9732dbc87231098bfa538c77 SHA512 0715debb92ec4bed3dc882afe484a0582ad49b0c18fb83938bcae4bc69f8d384d58baa60bed581cb66d46f88c0d8c3a1d76ff629c8e203cc32f13ca760b9601a AUX wepattack-0.1.3-missed-string.h-warnings-fix.patch 608 BLAKE2B f0bd227ddc9e778101802cd988451d374bec0e619f06f180d7275e793d0e8815c08e9a2f9e12614a4efeac2b44fc3cd0bd9ae1c59bd4a650702e21ddde335d58 SHA512 30b92627c616a1e2d07300765d6b2e2b1e097e424820c21d98f814ff153ab87375e913deb9f2e60d61ddd64768865d35e3b5d73b2e700caf7fc85a3f484b719b AUX wepattack-0.1.3-modern-c.patch 704 BLAKE2B 268a82ab6ac71d3f341dc6f27aa871a2a63b3b954605c281156e1cfa7a1ea00fcbcafa1cd6cafecc38297b360c6d57a5810f6bd0c33555adf4d33ac2a4e86e18 SHA512 0c54cce580a4b4346ec6ad0c99e6d8d49b28a3d102e807530ed7c247c1b4ff5bc961d9a3017e26ac9f8c385f25a8dbeab541767c70bae0e5240652147c80c1c7 +AUX wepattack-0.1.3-seds.patch 1184 BLAKE2B 1aa99e2e0ef1b0b6df540996dfec4853a99bc906f8c691e9e2e5ae1fa315c9f2f2cb25059be3c2a1cda1ff5d292ce7945bc634d7231e2e43a6921a05960bff18 SHA512 d3d8fa3279cbe96dde8d77f8f400c0ecc56ca05d92bafb23092e8e2b52aa244cee1db39a3a4784419eda797edecba8e21fca8240deeea40e12c2f6eb71fe75b1 +AUX wepattack-0.1.3-signals.patch 268 BLAKE2B 6b3160d1e4bc690961efb17d85dbcb1231735a680c2e587eac8dc8687d36d5f332954f89153d01be406d74b975fda4103fe09f5280e53137375a2b25f3686268 SHA512 58f83c95ec6e114fc4cd80949511379492a42357111424d0c5bff376f5ce3e023f0f3d798d5388ebbff5c97e11b5361e218f1a531d1d7f1dec2ede1cc55b12a8 AUX wepattack.conf 181 BLAKE2B 62d5a4b333fea32a5c5fe81e71a5b30ed90914361fda8c23dba208e6e4134651f257c337eaa1c8e95c5be5a4323443dad91ea51e1ab47e40064c5231299f8b07 SHA512 51c056be0c8b77e0af5c3ca40ee38244c6d5b7c55be4ac1d6a0e0db721c4be7e1ef235588d27b124a2f281d626fc5904234fb4d2d2e344047582e600ae6037d7 DIST WepAttack-0.1.3.tar.gz 25063 BLAKE2B 48923fd891a57a61edf5a3c75e84c3194ddad79adf7b588b54f4709cfbbad43537011f5e1a6c303f35cace50835802871113d7815bfcd1b08d167449e5007a0f SHA512 fe8d9843613fc29b7802f699311cb67fe3546a17a279ebc2e150cce155e726270dc937b1c941d9e9287b813febf171fe56053f6b010c4f2021e45e572f91fdf4 EBUILD wepattack-0.1.3-r6.ebuild 1246 BLAKE2B ce56a74d1910b440f373627973787de10538a3afd3b41cf58b45df08cc4b1e86fc2db67c7c7951d9000cb9fc717d7a116e82ac964270c9fefc80f3211d4537c0 SHA512 7d44b64671e354b317f8b542a12da55e109e04d08d433c9f8944f4ec64d111de167c8f8611d8502ba2e45d43d73c2a62f874a7a27f12448d75ae40b108e80735 +EBUILD wepattack-0.1.3-r7.ebuild 1068 BLAKE2B 78b0a9a2cc11e4b80e9f9a978a4d564fb60ae574cbf594db441f6d44af884db85c10822aa02bbbb0cc2375621bb27ce1ae7eddc2b0977fb67be96030a8a1d69e SHA512 079afc33f33c0a00a73cc63e3431952412fa9b32a9aa21b2413dd7ea3d05e2ffbbe917e9756c5f3e651fb779b10d5a83a71917ea009b27afa1ee19bfb067d522 MISC metadata.xml 739 BLAKE2B 5b3b1e4c5ece8cc942f4a057dc39295a994fe46bd34bf65a69041c0132db98172ea08477c97f9c24a853380d4f87a4ca973b0711dad33a076545357470c60c98 SHA512 2394d09c9b92fcb2e0b0920e8eee797a1763bc964eec9e774723159fee6f6f955d9da0e7e1c31147d649b5ff3aa9830334043b3ca40cb8ca952cbae4ac11b572 diff --git a/net-wireless/wepattack/files/wepattack-0.1.3-seds.patch b/net-wireless/wepattack/files/wepattack-0.1.3-seds.patch new file mode 100644 index 000000000000..ceda2344bc49 --- /dev/null +++ b/net-wireless/wepattack/files/wepattack-0.1.3-seds.patch @@ -0,0 +1,48 @@ +Transform seds from Makefile into patch. Were: + sed -i \ + -e "/^CFLAGS=/s:=:=${CFLAGS} :" \ + -e 's:-fno-for-scope::g' \ + -e "/^CC=/s:gcc:$(tc-getCC):" \ + -e "/^LD=/s:gcc:$(tc-getCC):" \ + -e 's:log.o\\:log.o \\:' \ + src/Makefile || die + sed -i \ + -e "s/wordfile:/-wordlist=/" \ + run/wepattack_word || die +https://bugs.gentoo.org/711032 +--- a/run/wepattack_word ++++ b/run/wepattack_word +@@ -28,7 +28,7 @@ + + if test -f $JOHNDIR/john; then + +- $JOHNDIR/john -wordfile:$WORDLIST -rules -stdout:13\ ++ $JOHNDIR/john --wordlist=$WORDLIST -rules -stdout:13\ + | wepattack -f $1 + exit 0; + else +--- a/src/Makefile ++++ b/src/Makefile +@@ -2,11 +2,10 @@ + # 15-10-2002 Dominik Blunk and Alain Girardet + # + # +-CC=gcc +-LD=gcc ++LD=${CC} + # + # CFLAGS +-CFLAGS=-fno-for-scope -c -D__LINUX_WLAN__ -D__I386__ ++CFLAGS += -c -D__LINUX_WLAN__ -D__I386__ + # + # + # LDFLAGS +@@ -21,7 +21,7 @@ + INSTDIR=/usr/bin + + wepattack: wepattack.o rc4.o wepfilter.o log.o modes.o misc.o verify.o keygen.o +- $(LD) $(LDFLAGS) -o $@ wepattack.o rc4.o wepfilter.o log.o\ ++ $(LD) $(LDFLAGS) -o $@ wepattack.o rc4.o wepfilter.o log.o \ + modes.o misc.o verify.o keygen.o $(LIBS) + + wepattack.o: wepattack.c wepattack.h diff --git a/net-wireless/wepattack/files/wepattack-0.1.3-signals.patch b/net-wireless/wepattack/files/wepattack-0.1.3-signals.patch new file mode 100644 index 000000000000..90b694d08f8b --- /dev/null +++ b/net-wireless/wepattack/files/wepattack-0.1.3-signals.patch @@ -0,0 +1,13 @@ +Fix signature for signal handler +https://bugs.gentoo.org/944166 +--- a/src/wepattack.c ++++ b/src/wepattack.c +@@ -216,7 +216,7 @@ + // + // signal handler for ctrl+c + // +-void sigint() { ++void sigint(int) { + + printf("\nAborting... writing result to '%s'\n", logfile); + diff --git a/net-wireless/wepattack/wepattack-0.1.3-r7.ebuild b/net-wireless/wepattack/wepattack-0.1.3-r7.ebuild new file mode 100644 index 000000000000..e31072b3b7ed --- /dev/null +++ b/net-wireless/wepattack/wepattack-0.1.3-r7.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="WepAttack-${PV}" +DESCRIPTION="WLAN tool for breaking 802.11 WEP keys" +HOMEPAGE="https://wepattack.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/wepattack/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="john" + +DEPEND=" + dev-libs/openssl:= + net-libs/libpcap + sys-libs/zlib +" +RDEPEND=" + ${DEPEND} + john? ( + || ( + app-crypt/johntheripper + app-crypt/johntheripper-jumbo + ) + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-filter-mac-address.patch + "${FILESDIR}"/${P}-missed-string.h-warnings-fix.patch + "${FILESDIR}"/${P}-modern-c.patch + "${FILESDIR}"/${P}-seds.patch + "${FILESDIR}"/${P}-signals.patch +) + +src_compile() { + tc-export CC + emake -C src +} + +src_test() { + src/wepattack || die "Program can't start" +} + +src_install() { + dodoc README + dobin src/wepattack + + if use john; then + dosbin run/wepattack_{inc,word} + insinto /etc + doins "${FILESDIR}"/wepattack.conf + fi +} diff --git a/net-wireless/wpa_supplicant/Manifest b/net-wireless/wpa_supplicant/Manifest index fd87bd76dd93..0f22a3f8d4ab 100644 --- a/net-wireless/wpa_supplicant/Manifest +++ b/net-wireless/wpa_supplicant/Manifest @@ -10,7 +10,6 @@ AUX wpa_supplicant-init.d 1250 BLAKE2B 159ebbd5a3552cbd8fdd6d48984c3a511e77cf1e1 AUX wpa_supplicant.conf 183 BLAKE2B ea25d56f366783548b8d4bc14615d89d1c9cff1e6535992d14fa2f87a095b6c7226fbdf6b2d2ecd5fdcc13fb413fc56d5294f906c840ab3f9386c99ea69139fc SHA512 425a5c955d462ea0d0d3f79c3e1bbf68e15b495df04ad03ed7aee12408b52616af05650dfc147ca5940d69e97360c33995d33733820fef8eb8769b31e58434e8 DIST wpa_supplicant-2.10.tar.gz 3511622 BLAKE2B 7f6045e5dcf24f7ccf1ea75c99541f9d68fadaea858a6ca11a95c997de14e33b3aa89138e748664579b5a4ea493d247cf6613da3c5fae49a4dbb5cd58dace752 SHA512 021c2a48f45d39c1dc6557730be5debaee071bc0ff82a271638beee6e32314e353e49d39e2f0dc8dff6e094dcc7008cfe1c32d0c7a34a1a345a12a3f1c1e11a1 DIST wpa_supplicant-2.11.tar.gz 3841433 BLAKE2B 71bd0d11cd31eb5bc6beb51caf0f1399856ea188f316d2330053a2d8c81869057811e9f500828e8981eabd0af38f30a18a3ae584d744005c78681c82fa910abf SHA512 9a0a3a9d6fa2235903c40aa57b5955f0c9dd1dccfd0e3825a3b6f92b3e32db8d464b3ea0aef3285ba3ee109e7b190560cedd744902e954f0003cdba543e277b2 -EBUILD wpa_supplicant-2.10-r5.ebuild 12406 BLAKE2B ebaaf0685a183b849bbcba4978f717ea385d66e3bc8e56c557dbd289fc60b2eeb75d7b63adfadbedcee846590bb62d45d66ce68024d5dfc89da11a07d2cd4b6b SHA512 a21336436bdabd80c2e945592afb1722548bd7dfb8c1d70be06688d6394d82ab63945c2c3e5d349b53458c89ab94fed7205c5698b04523cf35cc5e7161ecb74b EBUILD wpa_supplicant-2.10-r6.ebuild 12445 BLAKE2B 9fda2691fe48150436386bb389973916dcce0eacc2e5313e3d72263ead0d0af5241ff769a1e73179f577fd9c358f2841ffc4538570e2052e437e0594d3dfcf2c SHA512 367ffc883d39a262d8e62992911989db1aa49773e979d7c999b016ba73770e90f2754a3abc204cfde1199d0c77ffebedcb61361c8fa2aea9cf8ca68d649702ea EBUILD wpa_supplicant-2.11-r1.ebuild 11662 BLAKE2B aefd0a4a2e4889a0ba50ffe75ba5c5b7aab588fb8423b6f1a949ef133ab13034a3bfdadf315490ac4a54d7e4dc8ec1c5ddd9b912ca741e968ecd6feeb72ef218 SHA512 2d915580f542b443f0fbb86f7980f56128be5889a5ce4b23b5127e2de3f0fce0a2ecb89642f86c40cf731624cccdee8ef843a1042870c4ebff860c11fb97f414 EBUILD wpa_supplicant-2.11.ebuild 12476 BLAKE2B e66f95e2101dfb8b51d948cb942ebaeabb45d757386b5be32df41e932cbfcec08c3ffbb369e97d67d51f6bc8ab6203aeac64d75c817ec582786df8a9298c6a9c SHA512 9aab43a252252d21c03b60ca81c62e78a71ef68b45cfe3fce00c1b4e1e3d42f87d5ad70498a5649d6d05c8c9f3c833d7060e3652ed3c21d4e80eaa268811064e diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r5.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r5.ebuild deleted file mode 100644 index 88ba950a16b1..000000000000 --- a/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r5.ebuild +++ /dev/null @@ -1,477 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit desktop linux-info qmake-utils readme.gentoo-r1 systemd toolchain-funcs - -DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers" -HOMEPAGE="https://w1.fi/wpa_supplicant/" -LICENSE="|| ( GPL-2 BSD )" - -if [ "${PV}" = "9999" ]; then - inherit git-r3 - EGIT_REPO_URI="https://w1.fi/hostap.git" -else - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86" - SRC_URI="https://w1.fi/releases/${P}.tar.gz" -fi - -SLOT="0" -IUSE="ap broadcom-sta dbus eap-sim eapol-test fasteap +fils +hs2-0 macsec +mbo +mesh p2p privsep ps3 qt5 readline selinux smartcard tdls tkip uncommon-eap-types wep wimax wps" - -# CONFIG_PRIVSEP=y does not have sufficient support for the new driver -# interface functions used for MACsec, so this combination cannot be used -# at least for now. bug #684442 -REQUIRED_USE=" - macsec? ( !privsep ) - privsep? ( !macsec ) - broadcom-sta? ( !fils !mesh !mbo ) -" - -DEPEND=" - >=dev-libs/openssl-1.0.2k:= - dbus? ( sys-apps/dbus ) - kernel_linux? ( - >=dev-libs/libnl-3.2:3 - eap-sim? ( sys-apps/pcsc-lite ) - ) - !kernel_linux? ( net-libs/libpcap ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtsvg:5 - dev-qt/qtwidgets:5 - ) - readline? ( - sys-libs/ncurses:0= - sys-libs/readline:0= - ) -" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-networkmanager ) - kernel_linux? ( - net-wireless/wireless-regdb - ) -" -BDEPEND="virtual/pkgconfig" - -DOC_CONTENTS=" - If this is a clean installation of wpa_supplicant, you - have to create a configuration file named - /etc/wpa_supplicant/wpa_supplicant.conf - An example configuration file is available for reference in - /usr/share/doc/${PF}/ -" - -S="${WORKDIR}/${P}/${PN}" - -Kconfig_style_config() { - #param 1 is CONFIG_* item - #param 2 is what to set it = to, defaulting in y - CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1" - setting="${2:-y}" - - if [ ! $setting = n ]; then - #first remove any leading "# " if $2 is not n - sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" - #set item = $setting (defaulting to y) - if ! sed -i "/^$CONFIG_PARAM\>/s/=.*/=$setting/" .config; then - echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" - fi - if [ -z "$( grep ^$CONFIG_PARAM= .config )" ] ; then - echo "$CONFIG_PARAM=$setting" >>.config - fi - else - #ensure item commented out - if ! sed -i "/^$CONFIG_PARAM\>/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config; then - echo "Kconfig_style_config error commenting $CONFIG_PARAM" - fi - fi -} - -src_prepare() { - default - - # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD - sed -i \ - -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \ - ../src/l2_packet/l2_packet_freebsd.c || die - - # Change configuration to match Gentoo locations (bug #143750) - sed -i \ - -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \ - -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \ - wpa_supplicant.conf || die - - # systemd entries to D-Bus service files (bug #372877) - echo 'SystemdService=wpa_supplicant.service' \ - | tee -a dbus/*.service >/dev/null || die - - cd "${WORKDIR}/${P}" || die - - if use wimax; then - # generate-libeap-peer.patch comes before - # fix-undefined-reference-to-random_get_bytes.patch - eapply "${FILESDIR}/${P}-generate-libeap-peer.patch" - - # multilib-strict fix (bug #373685) - sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile || die - fi - - # bug (320097) - eapply "${FILESDIR}/${PN}-2.6-do-not-call-dbus-functions-with-NULL-path.patch" - - # bug (912315) - eapply "${FILESDIR}/${PN}-2.10-allow-legacy-renegotiation.patch" - eapply "${FILESDIR}/${PN}-2.10-Drop-security-level-to-0-with-OpenSSL-3.0-wh.patch" - - # bug (640492) - sed -i 's#-Werror ##' wpa_supplicant/Makefile || die -} - -src_configure() { - # Toolchain setup - tc-export CC PKG_CONFIG - - cp defconfig .config || die - - # Basic setup - Kconfig_style_config CTRL_IFACE - Kconfig_style_config MATCH_IFACE - Kconfig_style_config BACKEND file - Kconfig_style_config IBSS_RSN - Kconfig_style_config IEEE80211W - Kconfig_style_config IEEE80211R - Kconfig_style_config HT_OVERRIDES - Kconfig_style_config VHT_OVERRIDES - Kconfig_style_config OCV - Kconfig_style_config TLSV11 - Kconfig_style_config TLSV12 - Kconfig_style_config GETRANDOM - - # Basic authentication methods - # NOTE: we don't set GPSK or SAKE as they conflict - # with the below options - Kconfig_style_config EAP_GTC - Kconfig_style_config EAP_MD5 - Kconfig_style_config EAP_OTP - Kconfig_style_config EAP_PAX - Kconfig_style_config EAP_PSK - Kconfig_style_config EAP_TLV - Kconfig_style_config EAP_EXE - Kconfig_style_config IEEE8021X_EAPOL - Kconfig_style_config PKCS12 - Kconfig_style_config PEERKEY - Kconfig_style_config EAP_LEAP - Kconfig_style_config EAP_MSCHAPV2 - Kconfig_style_config EAP_PEAP - Kconfig_style_config EAP_TEAP - Kconfig_style_config EAP_TLS - Kconfig_style_config EAP_TTLS - - # Enabling background scanning. - Kconfig_style_config BGSCAN_SIMPLE - Kconfig_style_config BGSCAN_LEARN - - if use dbus ; then - Kconfig_style_config CTRL_IFACE_DBUS - Kconfig_style_config CTRL_IFACE_DBUS_NEW - Kconfig_style_config CTRL_IFACE_DBUS_INTRO - else - Kconfig_style_config CTRL_IFACE_DBUS n - Kconfig_style_config CTRL_IFACE_DBUS_NEW n - Kconfig_style_config CTRL_IFACE_DBUS_INTRO n - fi - - if use eapol-test ; then - Kconfig_style_config EAPOL_TEST - fi - - # Enable support for writing debug info to a log file and syslog. - Kconfig_style_config DEBUG_FILE - Kconfig_style_config DEBUG_SYSLOG - - if use hs2-0 ; then - Kconfig_style_config INTERWORKING - Kconfig_style_config HS20 - fi - - if use mbo ; then - Kconfig_style_config MBO - else - Kconfig_style_config MBO n - fi - - if use uncommon-eap-types; then - Kconfig_style_config EAP_GPSK - Kconfig_style_config EAP_SAKE - Kconfig_style_config EAP_GPSK_SHA256 - Kconfig_style_config EAP_IKEV2 - Kconfig_style_config EAP_EKE - fi - - if use eap-sim ; then - # Smart card authentication - Kconfig_style_config EAP_SIM - Kconfig_style_config EAP_AKA - Kconfig_style_config EAP_AKA_PRIME - Kconfig_style_config PCSC - fi - - if use fasteap ; then - Kconfig_style_config EAP_FAST - fi - - if use readline ; then - # readline/history support for wpa_cli - Kconfig_style_config READLINE - else - #internal line edit mode for wpa_cli - Kconfig_style_config WPA_CLI_EDIT - fi - - Kconfig_style_config TLS openssl - Kconfig_style_config FST - - Kconfig_style_config EAP_PWD - if use fils; then - Kconfig_style_config FILS - Kconfig_style_config FILS_SK_PFS - fi - if use mesh; then - Kconfig_style_config MESH - else - Kconfig_style_config MESH n - fi - # WPA3 - Kconfig_style_config OWE - Kconfig_style_config SAE - Kconfig_style_config DPP - Kconfig_style_config DPP2 - Kconfig_style_config SUITEB192 - Kconfig_style_config SUITEB - - if use wep ; then - Kconfig_style_config WEP - else - Kconfig_style_config WEP n - fi - - # Watch out, reversed logic - if use tkip ; then - Kconfig_style_config NO_TKIP n - else - Kconfig_style_config NO_TKIP - fi - - if use smartcard ; then - Kconfig_style_config SMARTCARD - else - Kconfig_style_config SMARTCARD n - fi - - if use tdls ; then - Kconfig_style_config TDLS - fi - - if use kernel_linux ; then - # Linux specific drivers - Kconfig_style_config DRIVER_ATMEL - Kconfig_style_config DRIVER_HOSTAP - Kconfig_style_config DRIVER_IPW - Kconfig_style_config DRIVER_NL80211 - Kconfig_style_config DRIVER_RALINK - Kconfig_style_config DRIVER_WEXT - Kconfig_style_config DRIVER_WIRED - - if use macsec ; then - #requires something, no idea what - #Kconfig_style_config DRIVER_MACSEC_QCA - Kconfig_style_config DRIVER_MACSEC_LINUX - Kconfig_style_config MACSEC - else - # bug #831369 and bug #684442 - Kconfig_style_config DRIVER_MACSEC_LINUX n - Kconfig_style_config MACSEC n - fi - - if use ps3 ; then - Kconfig_style_config DRIVER_PS3 - fi - fi - - # Wi-Fi Protected Setup (WPS) - if use wps ; then - Kconfig_style_config WPS - Kconfig_style_config WPS2 - # USB Flash Drive - Kconfig_style_config WPS_UFD - # External Registrar - Kconfig_style_config WPS_ER - # Universal Plug'n'Play - Kconfig_style_config WPS_UPNP - # Near Field Communication - Kconfig_style_config WPS_NFC - else - Kconfig_style_config WPS n - Kconfig_style_config WPS2 n - Kconfig_style_config WPS_UFD n - Kconfig_style_config WPS_ER n - Kconfig_style_config WPS_UPNP n - Kconfig_style_config WPS_NFC n - fi - - # Wi-Fi Direct (WiDi) - if use p2p ; then - Kconfig_style_config P2P - Kconfig_style_config WIFI_DISPLAY - else - Kconfig_style_config P2P n - Kconfig_style_config WIFI_DISPLAY n - fi - - # Access Point Mode - if use ap ; then - Kconfig_style_config AP - else - Kconfig_style_config AP n - fi - - # Enable essentials for AP/P2P - if use ap || use p2p ; then - # Enabling HT support (802.11n) - Kconfig_style_config IEEE80211N - - # Enabling VHT support (802.11ac) - Kconfig_style_config IEEE80211AC - fi - - # Enable mitigation against certain attacks against TKIP - Kconfig_style_config DELAYED_MIC_ERROR_REPORT - - if use privsep ; then - Kconfig_style_config PRIVSEP - fi - - if use kernel_linux ; then - Kconfig_style_config LIBNL32 - fi - - if use qt5 ; then - pushd "${S}"/wpa_gui-qt4 > /dev/null || die - eqmake5 wpa_gui.pro - popd > /dev/null || die - fi -} - -src_compile() { - einfo "Building wpa_supplicant" - emake V=1 BINDIR=/usr/sbin - - if use wimax; then - emake -C ../src/eap_peer clean - emake -C ../src/eap_peer - fi - - if use qt5; then - einfo "Building wpa_gui" - emake -C "${S}"/wpa_gui-qt4 - fi - - if use eapol-test ; then - emake eapol_test - fi -} - -src_install() { - dosbin wpa_supplicant - use privsep && dosbin wpa_priv - dobin wpa_cli wpa_passphrase - - newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant - newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant - - exeinto /etc/wpa_supplicant/ - newexe "${FILESDIR}/wpa_cli-r1.sh" wpa_cli.sh - - readme.gentoo_create_doc - dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \ - wpa_supplicant.conf - - newdoc .config build-config - - if [ "${PV}" != "9999" ]; then - doman doc/docbook/*.{5,8} - fi - - if use qt5 ; then - into /usr - dobin wpa_gui-qt4/wpa_gui - doicon wpa_gui-qt4/icons/wpa_gui.svg - domenu wpa_gui-qt4/wpa_gui.desktop - else - rm "${ED}"/usr/share/man/man8/wpa_gui.8 - fi - - use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install - - if use dbus ; then - pushd "${S}"/dbus > /dev/null || die - insinto /etc/dbus-1/system.d - newins dbus-wpa_supplicant.conf wpa_supplicant.conf - insinto /usr/share/dbus-1/system-services - doins fi.w1.wpa_supplicant1.service - popd > /dev/null || die - - # This unit relies on dbus support, bug 538600. - systemd_dounit systemd/wpa_supplicant.service - fi - - if use eapol-test ; then - dobin eapol_test - fi - - systemd_dounit "systemd/wpa_supplicant@.service" - systemd_dounit "systemd/wpa_supplicant-nl80211@.service" - systemd_dounit "systemd/wpa_supplicant-wired@.service" -} - -pkg_postinst() { - readme.gentoo_print_elog - - if [[ -e "${EROOT}"/etc/wpa_supplicant.conf ]] ; then - echo - ewarn "WARNING: your old configuration file ${EROOT}/etc/wpa_supplicant.conf" - ewarn "needs to be moved to ${EROOT}/etc/wpa_supplicant/wpa_supplicant.conf" - fi - if ! use wep; then - einfo "WARNING: You are building with WEP support disabled, which is recommended since" - einfo "this protocol is deprecated and insecure. If you still need to connect to" - einfo "WEP-enabled networks, you may turn this flag back on. With this flag off," - einfo "WEP-enabled networks will not even show up as available." - einfo "If your network is missing you may wish to USE=wep" - fi - if ! use tkip; then - ewarn "WARNING: You are building with TKIP support disabled, which is recommended since" - ewarn "this protocol is deprecated and insecure. If you still need to connect to" - ewarn "TKIP-enabled networks, you may turn this flag back on. With this flag off," - ewarn "TKIP-enabled networks, including mixed mode TKIP/AES-CCMP will not even show up" - ewarn "as available. If your network is missing you may wish to USE=tkip" - fi - - # Mea culpa, feel free to remove that after some time --mgorny. - local fn - for fn in wpa_supplicant{,@wlan0}.service; do - if [[ -e "${EROOT}"/etc/systemd/system/network.target.wants/${fn} ]] - then - ebegin "Moving ${fn} to multi-user.target" - mv "${EROOT}"/etc/systemd/system/network.target.wants/${fn} \ - "${EROOT}"/etc/systemd/system/multi-user.target.wants/ || die - eend ${?} \ - "Please try to re-enable ${fn}" - fi - done - - systemd_reenable wpa_supplicant.service -} |