aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdns-recursor/APKBUILD
blob: 3b097772d861460ca77375d7592f6f60d4a98e64 (plain) (blame)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Contributor: Olivier Mauras <olivier@mauras.ch>
# Maintainer:
_pkgname=pdns-recursor # upstream package name
pkgname=pdns-recursor
pkgver=4.4.2
pkgrel=1
pkgdesc="PowerDNS Recursive Server"
url="https://www.powerdns.com/"
arch="all !s390x !mips !mips64" # broken context
license="GPL-2.0-only"
depends="dns-root-hints"
makedepends="autoconf automake libtool boost-dev openssl-dev libsodium-dev lua5.3-dev
	net-snmp-dev protobuf-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
pkgusers="recursor"
pkggroups="recursor"
source="https://downloads.powerdns.com/releases/$_pkgname-$pkgver.tar.bz2
	https://github.com/tsuna/boost.m4/raw/3d67ee84e9149f6279a8df2113f5a86f0a83bd0d/build-aux/boost.m4
	$pkgname-GPGKEYS::https://www.powerdns.com/powerdns-keyblock.asc
	$_pkgname.initd
	recursor.conf
	"
# secfixes:
#   4.3.5-r0:
#     - CVE-2020-25829
#   4.3.2-r0:
#     - CVE-2020-14196
#   4.3.1-r0:
#     - CVE-2020-10995
#     - CVE-2020-12244
#   4.1.9-r0:
#     - CVE-2019-3806
#     - CVE-2019-3807
#   4.1.8-r0:
#     - CVE-2018-16855
#   4.1.7-r0:
#     - CVE-2018-10851
#     - CVE-2018-14644
#     - CVE-2018-14626
#   4.1.1-r0:
#     - CVE-2018-1000003
#   4.0.7-r0:
#     - CVE-2017-15090
#     - CVE-2017-15092
#     - CVE-2017-15093
#     - CVE-2017-15094

# Work-around for boost version 1.72 until next 4.3.x release
prepare() {
	default_prepare
	mv "$srcdir"/boost.m4 "$builddir"/m4/boost.m4
	autoreconf -i
}

build() {
	./configure --prefix=/usr \
		--sysconfdir=/etc/pdns \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--libdir=/usr/lib/pdns \
		--enable-unit-tests
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -v "$pkgdir"/etc/pdns/recursor.conf-dist

	install -m755 -D "$srcdir/$_pkgname.initd" \
		"$pkgdir/etc/init.d/$pkgname"

	install -v -m640 -o root -g recursor \
		-D "$srcdir/recursor.conf" \
		"$pkgdir/etc/pdns/recursor.conf"

	ln -s ../../usr/share/dns-root-hints/named.root \
		"$pkgdir/etc/pdns/root.hints"
}

_gpg_signature_extensions="sig"
_gpgfingerprints="
	FBAE 0323 821C 7706 A5CA 151B  DCF5 13FA 7EED 19F3
	1628 90D0 689D D12D D33E 4696  1C5E E990 D2E7 1575
	good:B76C D467 1C09 68BA A87D  E61C 5E50 715B F2FF E1A7
	good:16E1 2866 B773 8C73 976A  5743 6FFC 3343 9B0D 04DF
	"

sha512sums="31fdf62d87e5ee8f9570c6b738339bc8cc65c43800f18c7fb49aa5c53fc9ad76a1ddf02cc44f7129e06b41700b5cb3768ff8f81cc521c28147ea6538c73f8781  pdns-recursor-4.4.2.tar.bz2
490e1afd940bfd3ffe0c3e32d778eaf08ef5c92cb46fc09b527b7b2bac6fc2aba1afbcc0e8e88481809330d701679126b1c1ed81d2770bc605d3b000e177c561  boost.m4
7027c12c450ecdf4fa569e882eebdb437f166c71090f867928fddb08c558df452922ee3b33fa1dad3097b322bdb79a2096e07d9d2e9f15423464a64df6a9cde3  pdns-recursor-GPGKEYS
71f7be51d3a9a78f22f3946e95534d4f5b37b3bcbd1891ad3a17095be545fdb0eaf239d58c9f40ccc642542150c0b35ed025bf69acabfa779c0ab10c67a5e796  pdns-recursor.initd
466852d5e865630a3443ce96b6b3122f39d1a508fa8e3d884956925d04b1208724a3ca436920a765f106f5cb76ce3d8f5481ff16b9e02cf2e6b7c44f8c811e03  recursor.conf"