diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/fail2ban | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/fail2ban')
-rw-r--r-- | net-analyzer/fail2ban/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild | 105 | ||||
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-0.9.2.ebuild | 100 | ||||
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-0.9.3.ebuild | 105 | ||||
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-99999999.ebuild | 107 | ||||
-rw-r--r-- | net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch | 25 | ||||
-rw-r--r-- | net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch | 12 | ||||
-rw-r--r-- | net-analyzer/fail2ban/metadata.xml | 5 |
8 files changed, 461 insertions, 0 deletions
diff --git a/net-analyzer/fail2ban/Manifest b/net-analyzer/fail2ban/Manifest new file mode 100644 index 000000000000..515d01d888e4 --- /dev/null +++ b/net-analyzer/fail2ban/Manifest @@ -0,0 +1,2 @@ +DIST fail2ban-0.9.2.tar.gz 314919 SHA256 3e002f916e71128d4d7a97354b3e9b3bc20add878c9aa29c4034744de6156893 SHA512 c0fe3b126bcab34599661eaba9a84a8748e1450de57bc43cf91434d478463af1f60dc2bd2b50f7419fb1020ed63d398ca8493bd156cf1905767dbb8f79d0fda1 WHIRLPOOL 11264467e1465ad8697e174dcc751a63c0f550a01d381981f0b8bbc6f6c8f1b2ab13c2df205b08662e0e4bf983a139211932942795693c2c2cca71da9ddb833d +DIST fail2ban-0.9.3.tar.gz 321960 SHA256 146811530b7acf706db6d28068ee60806f6e0c80da14d89b732955a696728c46 SHA512 c8f45f776677a1e2e222feb4e33499a59c0c1c108365b759daf417870e2cc717a8b26073869eb3846a24928d8a2d33225761a19965b804bb7fee750e86cef6c8 WHIRLPOOL d01a25a9ac422e538e15db5f4f6c5015ee5c429c8fa6adf35accb80ce56f8e703e5104860ca7b205b927697b20a9a1109852dc6059b6ce208c432e0661a78edb diff --git a/net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild b/net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild new file mode 100644 index 000000000000..b649d0d0c3b4 --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 eutils systemd vcs-snapshot + +DESCRIPTION="scans log files and bans IPs that show malicious signs" +HOMEPAGE="http://www.fail2ban.org/" +SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="selinux systemd" + +RDEPEND=" + net-firewall/iptables + net-misc/whois + virtual/logger + virtual/mta + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( $(python_gen_cond_dep '|| ( + dev-python/python-systemd[${PYTHON_USEDEP}] + sys-apps/systemd[python(-),${PYTHON_USEDEP}] + )' 'python*' ) ) +" + +REQUIRED_USE="systemd? ( !python_single_target_pypy )" + +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) + +src_prepare() { + # Replace /var/run with /run, but not in the top source directory + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die + + # Fix bashisms and do not direct useful output to /dev/null (bug #536320) + # Remove global logrotate settings (bug #549856) + epatch \ + "${FILESDIR}"/${PN}-0.9.2-initd.patch \ + "${FILESDIR}"/${PN}-0.9.2-logrotate.patch + + distutils-r1_src_prepare +} + +python_test() { + ${EPYTHON} bin/${PN}-testcases +} + +src_install() { + distutils-r1_src_install + + rm -rf "${D}"/usr/share/doc/${PN} + + # not FILESDIR + newconfd files/gentoo-confd ${PN} + newinitd files/gentoo-initd ${PN} + systemd_dounit files/${PN}.service + systemd_dotmpfilesd files/${PN}-tmpfiles.conf + doman man/*.{1,5} + + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 + insinto /etc/logrotate.d + newins files/${PN}-logrotate ${PN} +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-0.7" + previous_less_than_0_7=$? +} + +pkg_postinst() { + if [[ $previous_less_than_0_7 = 0 ]] ; then + elog + elog "Configuration files are now in /etc/fail2ban/" + elog "You probably have to manually update your configuration" + elog "files before restarting Fail2ban!" + elog + elog "Fail2ban is not installed under /usr/lib anymore. The" + elog "new location is under /usr/share." + elog + elog "You are upgrading from version 0.6.x, please see:" + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8" + fi + if ! has_version ${CATEGORY}/${PN}; then + if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then + elog "For most jail.conf configurations, it is recommended you install either" + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)" + elog "to control how log file modifications are detected" + fi + if ! has_version dev-lang/python[sqlite]; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite" + fi + + if has_version sys-apps/systemd[-python]; then + elog "If you want to track logins through sys-apps/systemd's" + elog "journal backend, then reinstall sys-apps/systemd with USE=python" + fi + fi +} diff --git a/net-analyzer/fail2ban/fail2ban-0.9.2.ebuild b/net-analyzer/fail2ban/fail2ban-0.9.2.ebuild new file mode 100644 index 000000000000..acc59ac3ef24 --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-0.9.2.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 systemd vcs-snapshot + +DESCRIPTION="scans log files and bans IPs that show malicious signs" +HOMEPAGE="http://www.fail2ban.org/" +SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="selinux systemd" + +DEPEND="" +RDEPEND=" + net-misc/whois + virtual/mta + virtual/logger + net-firewall/iptables + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( $(python_gen_cond_dep '|| ( + dev-python/python-systemd[${PYTHON_USEDEP}] + sys-apps/systemd[python(-),${PYTHON_USEDEP}] + )' 'python*' ) ) +" + +REQUIRED_USE="systemd? ( !python_single_target_pypy )" + +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) + +src_prepare() { + # Replace /var/run with /run, but not in the top source directory + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die + + distutils-r1_src_prepare +} + +python_test() { + ${EPYTHON} bin/${PN}-testcases +} + +src_install() { + distutils-r1_src_install + + rm -rf "${D}"/usr/share/doc/${PN} + + # not FILESDIR + newconfd files/gentoo-confd ${PN} + newinitd files/gentoo-initd ${PN} + systemd_dounit files/${PN}.service + systemd_dotmpfilesd files/${PN}-tmpfiles.conf + doman man/*.{1,5} + + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 + insinto /etc/logrotate.d + newins files/${PN}-logrotate ${PN} +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-0.7" + previous_less_than_0_7=$? +} + +pkg_postinst() { + if [[ $previous_less_than_0_7 = 0 ]] ; then + elog + elog "Configuration files are now in /etc/fail2ban/" + elog "You probably have to manually update your configuration" + elog "files before restarting Fail2ban!" + elog + elog "Fail2ban is not installed under /usr/lib anymore. The" + elog "new location is under /usr/share." + elog + elog "You are upgrading from version 0.6.x, please see:" + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8" + fi + if ! has_version ${CATEGORY}/${PN}; then + if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then + elog "For most jail.conf configurations, it is recommended you install either" + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)" + elog "to control how log file modifications are detected" + fi + if ! has_version dev-lang/python[sqlite]; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite" + fi + + if has_version sys-apps/systemd[-python]; then + elog "If you want to track logins through sys-apps/systemd's" + elog "journal backend, then reinstall sys-apps/systemd with USE=python" + fi + fi +} diff --git a/net-analyzer/fail2ban/fail2ban-0.9.3.ebuild b/net-analyzer/fail2ban/fail2ban-0.9.3.ebuild new file mode 100644 index 000000000000..51f8963bbdf9 --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-0.9.3.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 eutils systemd vcs-snapshot + +DESCRIPTION="scans log files and bans IPs that show malicious signs" +HOMEPAGE="http://www.fail2ban.org/" +SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="selinux systemd" + +RDEPEND=" + net-firewall/iptables + net-misc/whois + virtual/logger + virtual/mta + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( $(python_gen_cond_dep '|| ( + dev-python/python-systemd[${PYTHON_USEDEP}] + sys-apps/systemd[python(-),${PYTHON_USEDEP}] + )' 'python*' ) ) +" + +REQUIRED_USE="systemd? ( !python_single_target_pypy )" + +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) + +src_prepare() { + # Replace /var/run with /run, but not in the top source directory + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die + + # Fix bashisms and do not direct useful output to /dev/null (bug #536320) + # Remove global logrotate settings (bug #549856) + epatch \ + "${FILESDIR}"/${PN}-0.9.2-initd.patch \ + "${FILESDIR}"/${PN}-0.9.2-logrotate.patch + + distutils-r1_src_prepare +} + +python_test() { + ${EPYTHON} bin/${PN}-testcases +} + +src_install() { + distutils-r1_src_install + + rm -rf "${D}"/usr/share/doc/${PN} "${D}"/run + + # not FILESDIR + newconfd files/gentoo-confd ${PN} + newinitd files/gentoo-initd ${PN} + systemd_dounit files/${PN}.service + systemd_dotmpfilesd files/${PN}-tmpfiles.conf + doman man/*.{1,5} + + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 + insinto /etc/logrotate.d + newins files/${PN}-logrotate ${PN} +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-0.7" + previous_less_than_0_7=$? +} + +pkg_postinst() { + if [[ $previous_less_than_0_7 = 0 ]] ; then + elog + elog "Configuration files are now in /etc/fail2ban/" + elog "You probably have to manually update your configuration" + elog "files before restarting Fail2ban!" + elog + elog "Fail2ban is not installed under /usr/lib anymore. The" + elog "new location is under /usr/share." + elog + elog "You are upgrading from version 0.6.x, please see:" + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8" + fi + if ! has_version ${CATEGORY}/${PN}; then + if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then + elog "For most jail.conf configurations, it is recommended you install either" + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)" + elog "to control how log file modifications are detected" + fi + if ! has_version dev-lang/python[sqlite]; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite" + fi + + if has_version sys-apps/systemd[-python]; then + elog "If you want to track logins through sys-apps/systemd's" + elog "journal backend, then reinstall sys-apps/systemd with USE=python" + fi + fi +} diff --git a/net-analyzer/fail2ban/fail2ban-99999999.ebuild b/net-analyzer/fail2ban/fail2ban-99999999.ebuild new file mode 100644 index 000000000000..ee2f56e3283f --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-99999999.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 eutils git-r3 systemd vcs-snapshot + +DESCRIPTION="scans log files and bans IPs that show malicious signs" +HOMEPAGE="http://www.fail2ban.org/" +EGIT_REPO_URI="https://github.com/${PN}/${PN}/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="selinux systemd" + +RDEPEND=" + net-firewall/iptables + net-misc/whois + virtual/logger + virtual/mta + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( $(python_gen_cond_dep '|| ( + dev-python/python-systemd[${PYTHON_USEDEP}] + sys-apps/systemd[python(-),${PYTHON_USEDEP}] + )' 'python*' ) ) +" + +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) + +src_unpack() { + git-r3_src_unpack +} + +src_prepare() { + # Replace /var/run with /run, but not in the top source directory + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die + + # Fix bashisms and do not direct useful output to /dev/null (bug #536320) + # Remove global logrotate settings (bug #549856) + epatch \ + "${FILESDIR}"/${PN}-0.9.2-initd.patch \ + "${FILESDIR}"/${PN}-0.9.2-logrotate.patch + + distutils-r1_src_prepare +} + +python_test() { + ${EPYTHON} bin/${PN}-testcases +} + +src_install() { + distutils-r1_src_install + + rm -rf "${D}"/usr/share/doc/${PN} + + # not FILESDIR + newconfd files/gentoo-confd ${PN} + newinitd files/gentoo-initd ${PN} + systemd_dounit files/${PN}.service + systemd_dotmpfilesd files/${PN}-tmpfiles.conf + doman man/*.{1,5} + + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 + insinto /etc/logrotate.d + newins files/${PN}-logrotate ${PN} +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-0.7" + previous_less_than_0_7=$? +} + +pkg_postinst() { + if [[ $previous_less_than_0_7 = 0 ]] ; then + elog + elog "Configuration files are now in /etc/fail2ban/" + elog "You probably have to manually update your configuration" + elog "files before restarting Fail2ban!" + elog + elog "Fail2ban is not installed under /usr/lib anymore. The" + elog "new location is under /usr/share." + elog + elog "You are upgrading from version 0.6.x, please see:" + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8" + fi + if ! has_version ${CATEGORY}/${PN}; then + if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then + elog "For most jail.conf configurations, it is recommended you install either" + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)" + elog "to control how log file modifications are detected" + fi + if ! has_version dev-lang/python[sqlite]; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite" + fi + + if has_version sys-apps/systemd[-python]; then + elog "If you want to track logins through sys-apps/systemd's" + elog "journal backend, then reinstall sys-apps/systemd with USE=python" + fi + fi +} diff --git a/net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch b/net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch new file mode 100644 index 000000000000..47bffe6af9fe --- /dev/null +++ b/net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch @@ -0,0 +1,25 @@ +--- a/files/gentoo-initd ++++ b/files/gentoo-initd +@@ -38,19 +38,19 @@ + # bug 347477 + rm -rf /run/fail2ban/fail2ban.sock || return 1 + fi +- ${FAIL2BAN} start &> /dev/null ++ ${FAIL2BAN} start + eend $? "Failed to start fail2ban" + } + + stop() { + ebegin "Stopping fail2ban" +- ${FAIL2BAN} stop &> /dev/null ++ ${FAIL2BAN} stop + eend $? "Failed to stop fail2ban" + } + + reload() { + ebegin "Reloading fail2ban" +- ${FAIL2BAN} reload > /dev/null ++ ${FAIL2BAN} reload + eend $? "Failed to reload fail2ban" + } + diff --git a/net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch b/net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch new file mode 100644 index 000000000000..65354a2a025f --- /dev/null +++ b/net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch @@ -0,0 +1,12 @@ +--- a/files/fail2ban-logrotate ++++ b/files/fail2ban-logrotate +@@ -9,9 +9,7 @@ + # http://pkgs.fedoraproject.org/cgit/fail2ban.git/tree/fail2ban-logrotate + + /var/log/fail2ban.log { +- rotate 7 + missingok +- compress + postrotate + /usr/bin/fail2ban-client flushlogs 1>/dev/null || true + endscript diff --git a/net-analyzer/fail2ban/metadata.xml b/net-analyzer/fail2ban/metadata.xml new file mode 100644 index 000000000000..43ff75467369 --- /dev/null +++ b/net-analyzer/fail2ban/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> +</pkgmetadata> |