blob: 1dbe47a99131060dd887d0fdad65e26c6d7e3b86 (
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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
# Contributor: Steve Holweg <skytep@gmail.com>
# Contributor: Baptiste Jonglez <baptiste--aur@jonglez.org>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
pkgname=kea
# NOTE: Upgrade only to even-numbered versions (e.g. 1.8.x, 1.10.x)!
# Odd-numbered versions are development versions.
# NOTE: When bumping, always rebuild all kea hooks (kea-* aports)!
pkgver=2.2.0
pkgrel=3
pkgdesc="DHCPv4 and DHCPv6 server from ISC"
url="https://kea.isc.org/"
arch="all"
license="MPL2"
depends="kea-dhcp4 kea-dhcp6"
depends_dev="boost-dev log4cplus-dev"
checkdepends="procps"
makedepends="
$depends_dev
autoconf
automake
bison
botan-dev
flex
libcap
libtool
mariadb-dev
postgresql-dev
python3-dev
"
pkgusers="kea"
pkggroups="kea"
install="$pkgname-common.pre-install $pkgname-common.post-upgrade"
subpackages="
$pkgname-doc
$pkgname-static
$pkgname-dev
$pkgname-admin::noarch
$pkgname-ctrl-agent:ctrlagent
$pkgname-dhcp-ddns:dhcpddns
$pkgname-dhcp4
$pkgname-dhcp6
$pkgname-shell::noarch
$pkgname-hook-mysql-cb:hook_mysql_cb
$pkgname-hook-pgsql-cb:hook_pgsql_cb
$pkgname-hook-ha:hook_ha
$pkgname-hook-stat-cmds:hook_stat_cmds
$pkgname-hook-lease-cmds:hook_lease_cmds
$pkgname-hook-flex-option:hook_flex_option
$pkgname-hook-bootp:hook_bootp
$pkgname-hook-run-script:hook_run_script
$pkgname-common
"
source="https://ftp.isc.org/isc/kea/$pkgver/kea-$pkgver.tar.gz
disable-db-tests.patch
configs-fix-paths.patch
use-runstatedir-for-pid-file-location.patch
put-LOCKFILE_DIR-to-runstatedir.patch
move-api-files-to-doc.patch
kea-admin-remove-builddir.patch
kea.initd.in
"
validpgpkeys="BE0E9748B718253A28BB89FFF1B11BF05CF02E57" # Internet Systems Consortium, Inc. (Signing key, 2017-2018) <codesign@isc.org>
# secfixes:
# 1.7.2-r0:
# - CVE-2019-6472
# - CVE-2019-6473
# - CVE-2019-6474
# NOTE: libkea-dhcpsrv.so depends on libkea-{mysql,pgsql}, that's why
# kea-common depends on libpq and libmariadb. :(
prepare() {
default_prepare
autoreconf -fv
# Remove the builddir path from the scripts.
# NOTE: There's a new script each release, so using patch file would be
# very inconvenient.
find src/share/database/scripts/ \
-name '*.sh.in' \
-exec sed -i 's|^\s*. @abs_top_builddir@/src/bin/admin/admin-utils.sh.*|echo "admin-utils.sh not found!"; exit 1|' {} \;
}
build() {
# Complete build for dev and doc
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib \
--runstatedir=/run \
--with-mysql \
--with-pgsql \
--disable-rpath \
--enable-generate-messages \
--enable-generate-parser \
--enable-shell
make
}
check() {
make check
}
package() {
make DESTDIR="$pkgdir" install
cd "$pkgdir"
install -d -m 0750 -o kea -g kea ./var/log/kea ./var/lib/kea
# keactrl is unnecessary since we provide OpenRC init scripts.
rm ./usr/sbin/keactrl ./etc/kea/keactrl.conf
rm -Rf ./run
}
dev() {
default_dev
amove ./usr/bin/kea-msg-compiler
}
admin() {
pkgdesc="Databases administration tools for Kea DHCP server"
depends="$pkgname-common=$pkgver-r$pkgrel"
amove ./usr/sbin/kea-admin
amove ./usr/share/kea
}
ctrlagent() {
pkgdesc="Kea Control Agent - REST service for controlling Kea DHCP server"
depends="$pkgname-common=$pkgver-r$pkgrel"
amove usr/sbin/kea-ctrl-agent
amove ./etc/kea/kea-ctrl-agent.conf
_install_initd kea-ctrl-agent
}
dhcpddns() {
pkgdesc="Kea DHCP Dynamic DNS Server"
depends="$pkgname-common=$pkgver-r$pkgrel"
amove ./usr/sbin/kea-dhcp-ddns
amove ./etc/kea/kea-dhcp-ddns.conf
amove ./usr/lib/libkea-asiodns.so.*
amove ./usr/lib/libkea-d2srv.so.*
_install_initd kea-dhcp-ddns
}
dhcp4() {
pkgdesc="Kea IPv4 DHCP Server"
depends="$pkgname-common=$pkgver-r$pkgrel"
amove ./usr/sbin/kea-dhcp4
amove ./etc/kea/kea-dhcp4.conf
_install_initd kea-dhcp4
}
dhcp6() {
pkgdesc="Kea IPv6 DHCP Server"
depends="$pkgname-common=$pkgver-r$pkgrel"
amove ./usr/sbin/kea-dhcp6
amove ./etc/kea/kea-dhcp6.conf
_install_initd kea-dhcp6
}
shell() {
pkgdesc="Text client for Kea DHCP Control Agent"
depends="python3"
amove ./usr/sbin/kea-shell
amove ./usr/lib/python3*
}
hook_mysql_cb() {
pkgdesc="Kea MySQL Configuration Backend hooks library"
depends=""
amove ./usr/lib/kea/hooks/libdhcp_mysql_cb.so
}
hook_pgsql_cb() {
pkgdesc="Kea PostgreSQL Configuration Backend hooks library"
depends=""
amove ./usr/lib/kea/hooks/libdhcp_pgsql_cb.so
}
hook_ha() {
pkgdesc="Kea High Availability hooks library"
depends="$pkgname-hook-lease-cmds"
amove ./usr/lib/kea/hooks/libdhcp_ha.so
}
hook_stat_cmds() {
pkgdesc="Kea Statistics Commands hooks library"
depends=""
amove ./usr/lib/kea/hooks/libdhcp_stat_cmds.so
}
hook_lease_cmds() {
pkgdesc="Kea Lease Commands hooks library"
depends=""
amove ./usr/lib/kea/hooks/libdhcp_lease_cmds.so
}
hook_flex_option() {
pkgdesc="Kea Flexible Option hooks library"
depends=""
amove ./usr/lib/kea/hooks/libdhcp_flex_option.so
}
hook_bootp() {
pkgdesc="Kea BOOTP hooks library"
depends=""
amove ./usr/lib/kea/hooks/libdhcp_bootp.so
}
hook_run_script() {
pkgdesc="Kea Run Script hooks library"
depends=""
amove ./usr/lib/kea/hooks/libdhcp_run_script.so
}
common() {
pkgdesc="Common files and libraries for Kea DHCP Server"
replaces="kea-utils" # for backward compatibility
provides="kea-utils=$pkgver-r$pkgrel kea-http=$pkgver-r$pkgrel" # for backward compatibility
depends=""
mkdir -p "$subpkgdir"
mv "$pkgdir"/* "$subpkgdir"/
}
_install_initd() {
local name="$1"
local caps='^cap_net_bind_service'
case "$name" in
kea-dhcp4) caps="$caps,^cap_net_raw";;
kea-ctrl-agent) caps='';;
esac
install -Dm755 "$srcdir"/kea.initd.in "$subpkgdir"/etc/init.d/$name
sed -i \
-e "s|@@NAME@@|$name|g" \
-e "s|@@CAPABILITIES@@|$caps|" \
"$subpkgdir"/etc/init.d/$name
}
sha512sums="
82cd44efea8c968ef097de242e1ca59e0183c80df25050017fd45538d35da64a9a0d2f4a5249ad3bd3d30b1f8895c360d301518bc22e60dfddd966fe020dc773 kea-2.2.0.tar.gz
9008df39883884db5fb4a6551d92262b465c186275bebd45358bdd25a637517c5613634f7541c226869dd8ca4118230726bf250b1d4c5198f3c5079527c72440 disable-db-tests.patch
3439046a80de33b31bf3f12e3c9728e47119e245fb888a1e4484a443b20e7b364f0e15e10fa96b4fcfcec29e6d2828ba9ab728a83028546a9c28f30fc404512d configs-fix-paths.patch
e22be00f74b30de0ff035de38a4b159231dbd6b248572cdb1c65dfc789f86630b4a03a22d2686607ccc5893305043526c3463bdd1fc43fdd2bf6138864ab16e0 use-runstatedir-for-pid-file-location.patch
52de95e9b4de3e518b4fbbce19799230684a2924433e666c24b866e537ffeaea9cd16b0b41499a17dd3ed528be1f899e94e67f6e464d551149b850cdbf29c1b2 put-LOCKFILE_DIR-to-runstatedir.patch
100b70f3ccecb46b98e9fd599ab6f0c3aa191d862d914ed84f4d34efea0cc119817d1e14b967c0f5024614af1ef6841a8d12e789945cad147d943965f194ece1 move-api-files-to-doc.patch
982751601d89c091d0aecf535862ad505ebf4e5f64af5f3fcfe9f791cc717aafc72915828eb467b984f8270a1e653b49968f76b39f51389ba4b69d806e1f717e kea-admin-remove-builddir.patch
2518eefe88e177b784367e67475bcd40083acf796554e2601dac5829270dd947d581488d349fb2f363fac4aea1a389e14294a88e8e8fd6d1fbc3c6bf923958f7 kea.initd.in
"
|