From b284b26f8a9623af2b298e04209ea8abb9f1be4a Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Wed, 9 Jun 2021 01:15:24 +0200 Subject: [PATCH] net-analyzer/ddos-mitigator: Handle different python versions better. Package-Manager: Portage-3.0.18, Repoman-3.0.2 --- net-analyzer/ddos-mitigator/ChangeLog | 6 +++ net-analyzer/ddos-mitigator/Manifest | 12 +++-- .../ddos-mitigator-2.1.0.ebuild | 10 ++-- .../ddos-mitigator-3.0.0.ebuild | 13 +++-- .../ddos-mitigator-3.0.1.ebuild | 50 +++++++++++++++++++ 5 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 net-analyzer/ddos-mitigator/ddos-mitigator-3.0.1.ebuild diff --git a/net-analyzer/ddos-mitigator/ChangeLog b/net-analyzer/ddos-mitigator/ChangeLog index b339c2f..ccb1fe1 100644 --- a/net-analyzer/ddos-mitigator/ChangeLog +++ b/net-analyzer/ddos-mitigator/ChangeLog @@ -1,3 +1,9 @@ +*ddos-mitigator-3.0.1 (08 Jun 2021) + + 08 Jun 2021; Manuel Friedli +ddos-mitigator-3.0.1.ebuild, + ddos-mitigator-2.1.0.ebuild, ddos-mitigator-3.0.0.ebuild: + net-analyzer/ddos-mitigator: Handle different python versions better. + *ddos-mitigator-3.0.0 (24 Nov 2020) 24 Nov 2020; Manuel Friedli +ddos-mitigator-3.0.0.ebuild: diff --git a/net-analyzer/ddos-mitigator/Manifest b/net-analyzer/ddos-mitigator/Manifest index fe91e6c..16b73d8 100644 --- a/net-analyzer/ddos-mitigator/Manifest +++ b/net-analyzer/ddos-mitigator/Manifest @@ -1,6 +1,8 @@ -DIST v2.1.0.tar.gz 6394 BLAKE2B 1e8ab8ac38338b005d7143b3272e985c6a3d760a4af25030219139618908563341ec753e71dd882f2feabd83ac9148dac148d760c89554af6deaed38f4db8733 SHA512 fa47e2260e8a6a88053ef936025450033f2ab24e73eaaea7bfdf5d4f7c399b98a4fc13f6ec2060ecb4de0c18c9c1f2f01d5ee8249ac24d53c336d102f7365612 -DIST v3.0.0.tar.gz 7988 BLAKE2B 86ad8c122154c7c426272b36447c9ccd6fa0e6c5c6c0fba4dc366a4cbe4b2903d7fff44e2aaf89c6db9eb5b43c91f89cbf969c812a143e95d4d50eb44857271f SHA512 14a22606927cdafee5d2190b2a11886c19826856f9df5bccf09a9e17b3421bc40910798210cd985ce118fb702b0e1773861c3e3a54d07b53dc7f2e3eaa404df7 -EBUILD ddos-mitigator-2.1.0.ebuild 632 BLAKE2B f6e0e91cb3224ab53bda00d135f3d2d8674c3c7901f6074e19a4f70d661bfde744f4121b2c6307f745ebe46c2d9dd843e9beaafdc7af841150e8900c5ab53ae4 SHA512 bd70cceefdbff59a5f9f915a6a877d565260cb9955e9e612f076fb42ce56cd83580bb2fe041a42edd91eb2aaacdf563fb982fa58883415cb32f972a9f87be08e -EBUILD ddos-mitigator-3.0.0.ebuild 999 BLAKE2B c121855d034ad2b61ff44f71325686989dcdb1684860ea01613b42c18dce9db99a96f1ca6df669bb8abe08ff7dc70430db254915a87154881a02438028cce8f3 SHA512 2835a5ce15cb0a423a4043318d06f1a62c0ce13c2a2097483a77983f00387a876c9e5cc0b243423e4e62124a8717125f003f52a6d5213174b23cd3ce19c425a2 -MISC ChangeLog 413 BLAKE2B 69e9b7d7c3203b0db69608c60aa9cc2ee2cd3590b1ee7cf1e27256560244e6d9ff4ba20a79b4c7c0f12b3e05930e445b2f41be6a37cf06779a8e35808a560ed8 SHA512 6af56a50f9c2e6cca9582bc16dbfef7217db3257a0ea04676b58188bcd75edd82c8f35e8595f67151d648e9a12e851baa27b9b6ed908eb39c42b81a72d526885 +DIST ddos-mitigator-2.1.0.tar.gz 6394 BLAKE2B 1e8ab8ac38338b005d7143b3272e985c6a3d760a4af25030219139618908563341ec753e71dd882f2feabd83ac9148dac148d760c89554af6deaed38f4db8733 SHA512 fa47e2260e8a6a88053ef936025450033f2ab24e73eaaea7bfdf5d4f7c399b98a4fc13f6ec2060ecb4de0c18c9c1f2f01d5ee8249ac24d53c336d102f7365612 +DIST ddos-mitigator-3.0.0.tar.gz 7988 BLAKE2B 86ad8c122154c7c426272b36447c9ccd6fa0e6c5c6c0fba4dc366a4cbe4b2903d7fff44e2aaf89c6db9eb5b43c91f89cbf969c812a143e95d4d50eb44857271f SHA512 14a22606927cdafee5d2190b2a11886c19826856f9df5bccf09a9e17b3421bc40910798210cd985ce118fb702b0e1773861c3e3a54d07b53dc7f2e3eaa404df7 +DIST ddos-mitigator-3.0.1.tar.gz 7976 BLAKE2B b582bdd34a44bf6c29047562fc4e6d62b6bd0571ebe36179752a7e11ecf70a1fb2d58561efa3e8ba4873d91f94dc7338e229ae4693c3e9bf37489d5cafae7a21 SHA512 a330cb9d0d2c27a17090d88065ec3137e56906bb814a2beed0110cd16359730de3f11f66f6fcc7f0a0a7cb9ce8cee05a29d676a033194ba03f365ce47051b1f3 +EBUILD ddos-mitigator-2.1.0.ebuild 734 BLAKE2B 5415a2a3eed83ff3d04ad95f91870a3e71ead881fab74ffabb650f8a290fae23e16b7bbd4349c21bac1a7ebe4affe64098c368e42c5b0c59ac2d9eb2374a7e6a SHA512 67af4a0eb51949e136a2d4a0b9c7665ac1896ab121939102ef9ec6133c452b0cbf52f159d4f8683f2cdc9af9e9f293fe94e99060473aee5f8b1a74b89f57d8c7 +EBUILD ddos-mitigator-3.0.0.ebuild 1168 BLAKE2B ce20d7797c9d8b791f7b497130c8efd511f32d553a635eaf165b2739f4ec82cdf5ae3cc49a32894b011c112a8412fa566fdba08f62bd8c29f4ac2ff90807e421 SHA512 414a3adae39365a6f50db4d4e081c95cbecf175da5035b8c7b7d1315007de48e5f26c842eb7f2cfc0f134c278191f47b2a659705673c394056f868ea719cffdb +EBUILD ddos-mitigator-3.0.1.ebuild 1174 BLAKE2B b03dfbdf05e3e89a56bca9013ce4eef84afba66e75e1edfa94d17b6af55f07a47ccd006e73de8eff028aac381a05e74b04787e918bf89f4b08f5ad48b64b9b33 SHA512 56f2164e05c8537ebd6804e85eb9d03bbbb8e92f1a9a7ad5621cdcb6673718fe7e6fe3073b4bd24b8a21252e833fdbac6ac90e639436fbb7ce4d0448b744c557 +MISC ChangeLog 663 BLAKE2B b2c9c6e2864eff8800d644e922c6e8bc7780df61ac962f93fe932c3deb95f2ae3e5f7e5bf677efcbacfee0620d8bb5aab4332eb73dee31666741646c6d24123e SHA512 88fa95823c23a5db2e14badeaff2fb710523a24ac934c5c0a9177d1a724d8bef731bff815e9da85387c81d347cf107b6653423a658f9c41c6f8d10bc85fd2014 MISC metadata.xml 248 BLAKE2B cb50cad2c614a99daa2e236f9e0d0fab1ab20a898c0b0f0c28a1387820ab1f2b9dd4d396a3b38f732b493824f96a29ee5894e80e09dbd08dff62c1aaba3feaa0 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 diff --git a/net-analyzer/ddos-mitigator/ddos-mitigator-2.1.0.ebuild b/net-analyzer/ddos-mitigator/ddos-mitigator-2.1.0.ebuild index 695d0ba..6d372f7 100644 --- a/net-analyzer/ddos-mitigator/ddos-mitigator-2.1.0.ebuild +++ b/net-analyzer/ddos-mitigator/ddos-mitigator-2.1.0.ebuild @@ -1,22 +1,26 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +PYTHON_COMPAT=( python3_8 ) +inherit python-single-r1 + DESCRIPTION="Script for blocking IP addresses with many concurrent connections" HOMEPAGE="https://gittr.ch/linux/ddos-mitigator" -SRC_URI="https://gittr.ch/linux/ddos-mitigator/archive/v${PV}.tar.gz" +SRC_URI="https://gittr.ch/linux/ddos-mitigator/archive/v${PV}.tar.gz -> ${P}.tar.gz" RESTRICT="mirror" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" S="${WORKDIR}/${PN}" RDEPEND=" + ${PYTHON_DEPS} app-admin/sudo - dev-lang/python:3.8 net-analyzer/fail2ban sys-apps/coreutils sys-apps/grep diff --git a/net-analyzer/ddos-mitigator/ddos-mitigator-3.0.0.ebuild b/net-analyzer/ddos-mitigator/ddos-mitigator-3.0.0.ebuild index 5ecab3b..c3bc615 100644 --- a/net-analyzer/ddos-mitigator/ddos-mitigator-3.0.0.ebuild +++ b/net-analyzer/ddos-mitigator/ddos-mitigator-3.0.0.ebuild @@ -1,22 +1,29 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +PYTHON_COMPAT=( python3_8 ) +inherit python-single-r1 + DESCRIPTION="Script for blocking IP addresses with many concurrent connections" HOMEPAGE="https://gittr.ch/linux/ddos-mitigator" -SRC_URI="https://gittr.ch/linux/ddos-mitigator/archive/v${PV}.tar.gz" +SRC_URI="https://gittr.ch/linux/ddos-mitigator/archive/v${PV}.tar.gz -> ${P}.tar.gz" RESTRICT="mirror" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" S="${WORKDIR}/${PN}" RDEPEND=" + ${PYTHON_DEPS} app-admin/sudo - dev-lang/python:3.8 + $(python_gen_cond_dep ' + dev-python/geoip2[${PYTHON_USEDEP}] + ') net-analyzer/fail2ban sys-apps/coreutils sys-apps/grep diff --git a/net-analyzer/ddos-mitigator/ddos-mitigator-3.0.1.ebuild b/net-analyzer/ddos-mitigator/ddos-mitigator-3.0.1.ebuild new file mode 100644 index 0000000..1a71908 --- /dev/null +++ b/net-analyzer/ddos-mitigator/ddos-mitigator-3.0.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} ) +inherit python-single-r1 + +DESCRIPTION="Script for blocking IP addresses with many concurrent connections" +HOMEPAGE="https://gittr.ch/linux/ddos-mitigator" +SRC_URI="https://gittr.ch/linux/ddos-mitigator/archive/v${PV}.tar.gz -> ${P}.tar.gz" +RESTRICT="mirror" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +S="${WORKDIR}/${PN}" + +RDEPEND=" + ${PYTHON_DEPS} + app-admin/sudo + $(python_gen_cond_dep ' + dev-python/geoip2[${PYTHON_USEDEP}] + ') + net-analyzer/fail2ban + sys-apps/coreutils + sys-apps/grep + sys-apps/iproute2 + sys-apps/moreutils + sys-apps/util-linux +" + +src_install() { + dosbin ddos-mitigator.sh + dosbin geoip-lookup.py + + insinto /etc + doins ddos-mitigator.conf +} + +pkg_postinst() { + ewarn "Please note that you will need a GeoIP2 country- or" + ewarn "city-database in order to use this package." + elog "It is out of scope for this package to give detailed" + elog "instructions on how to install such a database. Just" + elog "google it." + elog "net-misc/geoipupdate might help, too ..." +}