blob: 5e674651b1f99cf7cf4579b8fbaf44662e13ec4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Contributor: prymeroot <pryme@gmx.com>
# Contributor: Jeff Bilyk <jbilyk@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fail2ban
pkgver=0.10.4
pkgrel=2
pkgdesc="Scans log files for login failures then updates iptables to reject originating ip address"
url="https://www.fail2ban.org"
arch="noarch"
license="GPL-2.0-or-later"
depends="python3 iptables ip6tables logrotate"
makedepends="python3-dev py3-setuptools bash"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz
testIpToName-fixed-for-reverse-IP-of-google-dns.patch
fail2ban.confd
fail2ban.logrotate
alpine-ssh.jaild
alpine-sshd.filterd
alpine-sshd-ddos.filterd
"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
sh fail2ban-2to3
python3 setup.py build
}
check() {
cd "$builddir"
python3 setup.py test
}
package() {
cd "$builddir"
python3 setup.py install --root "$pkgdir"
install -Dm755 files/gentoo-initd "$pkgdir"/etc/init.d/fail2ban
install -Dm644 "$srcdir"/fail2ban.confd "$pkgdir"/etc/conf.d/fail2ban
install -Dm644 "$srcdir"/fail2ban.logrotate \
"$pkgdir"/etc/logrotate.d/fail2ban
install -Dm644 "$srcdir"/alpine-ssh.jaild \
"$pkgdir"/etc/fail2ban/jail.d/alpine-ssh.conf
install -Dm644 "$srcdir"/alpine-sshd.filterd \
"$pkgdir"/etc/fail2ban/filter.d/alpine-sshd.conf
install -Dm644 "$srcdir"/alpine-sshd-ddos.filterd \
"$pkgdir"/etc/fail2ban/filter.d/alpine-sshd-ddos.conf
}
sha512sums="3f4af84b7e3332b887240c927c1f706d2b3020217df2a68c64897619d54eb6dfa972992e3153f4ea150d025e2c8a2b537da47cf71a6dfee1df3c8d029a6d5f42 fail2ban-0.10.4.tar.gz
e58c2c77c5e02094551e4b6082839e63764a237d8d5ce4924684c15a09648cf6f222108e9e01ad7801da5e2a17b343126b377dbca8c2cd41de60caed1c8342a6 testIpToName-fixed-for-reverse-IP-of-google-dns.patch
1e7581dd04e7777d6fd5c40cc842a7ec5f4e6a0374673d020d89dd61bf4093d48934844bee89bcac9084f9ae44f3beb66e714cf3c2763d79c3e8feb790c5e43b fail2ban.confd
4ff9dd2793f42e414d83676104f47966f781b9e042e90dbc839d4e6b27faee08ebea2231b178d1d41084fa6c59aa62689bdb713977096d8b235a33e73268ccc5 fail2ban.logrotate
84915967ae1276f1e14a5813680ee2ebf081af1ff452a688ae5f9ac3363f4aff90e39f8e6456b5c33d5699917d28a16308797095fd1ef9bb1fbcb46d4cea3def alpine-ssh.jaild
3e8e08d5e349e857b51ce34a9d968f16661b34e1cec06bec0aa9a32723bbe9be5a9890dd479331a9cc860821d33b1bf3b8e995182e319dead5a3d434b1816304 alpine-sshd.filterd
36a81b771be0b36fe0dfb5ee4c72c9cb5b504e110618a8eb6f0f241b4e57d92df01dc5cc04b6b68d5bc6a5e6d68de1000092770285d7a328e5937e50b4b226a3 alpine-sshd-ddos.filterd"
|