blob: 9245f17b1c38877ffa58c9b28d58664cd6780376 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Daemon to ban hosts that cause multiple authentication errors."
2DESCRIPTION = "Fail2Ban scans log files like /var/log/auth.log and bans IP addresses having too \
3many failed login attempts. It does this by updating system firewall rules to reject new \
4connections from those IP addresses, for a configurable amount of time. Fail2Ban comes \
5out-of-the-box ready to read many standard log files, such as those for sshd and Apache, \
6and is easy to configure to read any log file you choose, for any error you choose."
7HOMEPAGE = "http://www.fail2ban.org"
8
9LICENSE = "GPL-2.0"
10LIC_FILES_CHKSUM = "file://COPYING;md5=ecabc31e90311da843753ba772885d9f"
11
12SRCREV ="ac0d441fd68852ffda7b15c71f16b7f4fde1a7ee"
13SRC_URI = " \
14 git://github.com/fail2ban/fail2ban.git;branch=0.11 \
15 file://initd \
16 file://fail2ban_setup.py \
17 file://run-ptest \
18"
19
20inherit update-rc.d ptest
21
22S = "${WORKDIR}/git"
23
24INITSCRIPT_PACKAGES = "${PN}"
25INITSCRIPT_NAME = "fail2ban-server"
26INITSCRIPT_PARAMS = "defaults 25"
27
28do_compile_prepend () {
29 cp ${WORKDIR}/fail2ban_setup.py ${S}/setup.py
30}
31
32do_install_append () {
33 install -d ${D}/${sysconfdir}/fail2ban
34 install -d ${D}/${sysconfdir}/init.d
35 install -m 0755 ${WORKDIR}/initd ${D}${sysconfdir}/init.d/fail2ban-server
36 chown -R root:root ${D}/${bindir}
37}
38
39do_install_ptest_append () {
40 install -d ${D}${PTEST_PATH}
41 sed -i -e 's/##PYTHON##/${PYTHON_PN}/g' ${D}${PTEST_PATH}/run-ptest
42 install -D ${S}/bin/fail2ban-testcases ${D}${PTEST_PATH}
43}
44
45FILES_${PN} += "/run"
46
47INSANE_SKIP_${PN}_append = "already-stripped"
48
49RDEPENDS_${PN} = "sysklogd iptables sqlite3 ${PYTHON_PN} ${PYTHON_PN}-pyinotify"