Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/strongswan/
Date: Thu, 17 Jun 2021 22:18:33
Message-Id: 1623968295.3e7c9a738ed0f919586b6fb0ddc80a9ea14f745b.whissi@gentoo
1 commit: 3e7c9a738ed0f919586b6fb0ddc80a9ea14f745b
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 17 22:04:30 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 17 22:18:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e7c9a73
7
8 net-vpn/strongswan: drop old
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 net-vpn/strongswan/Manifest | 2 -
14 net-vpn/strongswan/strongswan-5.9.0.ebuild | 308 -----------------------------
15 net-vpn/strongswan/strongswan-5.9.1.ebuild | 308 -----------------------------
16 3 files changed, 618 deletions(-)
17
18 diff --git a/net-vpn/strongswan/Manifest b/net-vpn/strongswan/Manifest
19 index 269b1eb23f1..928680f8c8d 100644
20 --- a/net-vpn/strongswan/Manifest
21 +++ b/net-vpn/strongswan/Manifest
22 @@ -1,3 +1 @@
23 -DIST strongswan-5.9.0.tar.bz2 4568404 BLAKE2B daf5cce5cbe12253f9ad201d89323ab7d54ba7ff466685b84830737689e4d417fbb97d053d8c9f3de5acb6dee9a192ebae48ec0d4aa07ba3c8969ee6d8f06ab3 SHA512 b982ce7c3e940ad75ab71b02ce3e2813b41c6b098cde5b6f3f3513d095f409fe989ae6e38a31eff51c57423bf452c3610cd5cd8cd7f45ff932581d9859df1821
24 -DIST strongswan-5.9.1.tar.bz2 4590867 BLAKE2B 1515764352e7473c47f853a5aa68e582d1fd61122ac1e1577bdc7813da77e0213803c69abf41a1667166e32fb9f2a4bfe8c74616d6431e698e31cf51e939ce3e SHA512 222625e77bd86959da6dd7346cfa9f92569fc396a494bb95ddf2c8e0680b7e8041541e8a14320517a0c735d713ae0fdc0d0c4694215e812817814b0b4efc3497
25 DIST strongswan-5.9.2.tar.bz2 4607281 BLAKE2B 84f5457bc970f49c9bc99d0ef41182d815e39b8a88be349ad0a78b531a983d3b3919d5c9f3b97793b0b2569f2c6b151cc3b5d9b145a8bfd663db6f79d8ff3dd6 SHA512 dca30b9be7847e0af59d1526c2e38d440b6729055cb3f0f0637d50d7381df465c7b59e79662efe63870a7a5a44eef696c02231274d2764f9e3c430ce2fd694f6
26
27 diff --git a/net-vpn/strongswan/strongswan-5.9.0.ebuild b/net-vpn/strongswan/strongswan-5.9.0.ebuild
28 deleted file mode 100644
29 index 55030178088..00000000000
30 --- a/net-vpn/strongswan/strongswan-5.9.0.ebuild
31 +++ /dev/null
32 @@ -1,308 +0,0 @@
33 -# Copyright 1999-2021 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI="7"
37 -inherit linux-info systemd user
38 -
39 -DESCRIPTION="IPsec-based VPN solution, supporting IKEv1/IKEv2 and MOBIKE"
40 -HOMEPAGE="https://www.strongswan.org/"
41 -SRC_URI="https://download.strongswan.org/${P}.tar.bz2"
42 -
43 -LICENSE="GPL-2 RSA DES"
44 -SLOT="0"
45 -KEYWORDS="amd64 arm ~arm64 ppc ~ppc64 x86"
46 -IUSE="+caps curl +constraints debug dhcp eap farp gcrypt +gmp ldap mysql networkmanager +non-root +openssl selinux sqlite systemd pam pkcs11"
47 -
48 -STRONGSWAN_PLUGINS_STD="led lookip systime-fix unity vici"
49 -STRONGSWAN_PLUGINS_OPT="aesni blowfish bypass-lan ccm chapoly ctr forecast gcm ha ipseckey newhope ntru padlock rdrand save-keys unbound whitelist"
50 -for mod in $STRONGSWAN_PLUGINS_STD; do
51 - IUSE="${IUSE} +strongswan_plugins_${mod}"
52 -done
53 -
54 -for mod in $STRONGSWAN_PLUGINS_OPT; do
55 - IUSE="${IUSE} strongswan_plugins_${mod}"
56 -done
57 -
58 -COMMON_DEPEND="!net-misc/openswan
59 - gmp? ( >=dev-libs/gmp-4.1.5:= )
60 - gcrypt? ( dev-libs/libgcrypt:0 )
61 - caps? ( sys-libs/libcap )
62 - curl? ( net-misc/curl )
63 - ldap? ( net-nds/openldap )
64 - openssl? ( >=dev-libs/openssl-0.9.8:=[-bindist(-)] )
65 - mysql? ( dev-db/mysql-connector-c:= )
66 - sqlite? ( >=dev-db/sqlite-3.3.1 )
67 - systemd? ( sys-apps/systemd )
68 - networkmanager? ( net-misc/networkmanager )
69 - pam? ( sys-libs/pam )
70 - strongswan_plugins_unbound? ( net-dns/unbound:= net-libs/ldns )"
71 -DEPEND="${COMMON_DEPEND}
72 - virtual/linux-sources
73 - sys-kernel/linux-headers"
74 -RDEPEND="${COMMON_DEPEND}
75 - virtual/logger
76 - sys-apps/iproute2
77 - !net-vpn/libreswan
78 - selinux? ( sec-policy/selinux-ipsec )"
79 -
80 -UGID="ipsec"
81 -
82 -pkg_setup() {
83 - linux-info_pkg_setup
84 -
85 - elog "Linux kernel version: ${KV_FULL}"
86 -
87 - if ! kernel_is -ge 2 6 16; then
88 - eerror
89 - eerror "This ebuild currently only supports ${PN} with the"
90 - eerror "native Linux 2.6 IPsec stack on kernels >= 2.6.16."
91 - eerror
92 - fi
93 -
94 - if kernel_is -lt 2 6 34; then
95 - ewarn
96 - ewarn "IMPORTANT KERNEL NOTES: Please read carefully..."
97 - ewarn
98 -
99 - if kernel_is -lt 2 6 29; then
100 - ewarn "[ < 2.6.29 ] Due to a missing kernel feature, you have to"
101 - ewarn "include all required IPv6 modules even if you just intend"
102 - ewarn "to run on IPv4 only."
103 - ewarn
104 - ewarn "This has been fixed with kernels >= 2.6.29."
105 - ewarn
106 - fi
107 -
108 - if kernel_is -lt 2 6 33; then
109 - ewarn "[ < 2.6.33 ] Kernels prior to 2.6.33 include a non-standards"
110 - ewarn "compliant implementation for SHA-2 HMAC support in ESP and"
111 - ewarn "miss SHA384 and SHA512 HMAC support altogether."
112 - ewarn
113 - ewarn "If you need any of those features, please use kernel >= 2.6.33."
114 - ewarn
115 - fi
116 -
117 - if kernel_is -lt 2 6 34; then
118 - ewarn "[ < 2.6.34 ] Support for the AES-GMAC authentification-only"
119 - ewarn "ESP cipher is only included in kernels >= 2.6.34."
120 - ewarn
121 - ewarn "If you need it, please use kernel >= 2.6.34."
122 - ewarn
123 - fi
124 - fi
125 -
126 - if use non-root; then
127 - enewgroup ${UGID}
128 - enewuser ${UGID} -1 -1 -1 ${UGID}
129 - fi
130 -}
131 -
132 -src_configure() {
133 - local myconf=""
134 -
135 - if use non-root; then
136 - myconf="${myconf} --with-user=${UGID} --with-group=${UGID}"
137 - fi
138 -
139 - # If a user has already enabled db support, those plugins will
140 - # most likely be desired as well. Besides they don't impose new
141 - # dependencies and come at no cost (except for space).
142 - if use mysql || use sqlite; then
143 - myconf="${myconf} --enable-attr-sql --enable-sql"
144 - fi
145 -
146 - # strongSwan builds and installs static libs by default which are
147 - # useless to the user (and to strongSwan for that matter) because no
148 - # header files or alike get installed... so disabling them is safe.
149 - if use pam && use eap; then
150 - myconf="${myconf} --enable-eap-gtc"
151 - else
152 - myconf="${myconf} --disable-eap-gtc"
153 - fi
154 -
155 - for mod in $STRONGSWAN_PLUGINS_STD; do
156 - if use strongswan_plugins_${mod}; then
157 - myconf+=" --enable-${mod}"
158 - fi
159 - done
160 -
161 - for mod in $STRONGSWAN_PLUGINS_OPT; do
162 - if use strongswan_plugins_${mod}; then
163 - myconf+=" --enable-${mod}"
164 - fi
165 - done
166 -
167 - econf \
168 - --disable-static \
169 - --enable-ikev1 \
170 - --enable-ikev2 \
171 - --enable-swanctl \
172 - --enable-socket-dynamic \
173 - $(use_enable curl) \
174 - $(use_enable constraints) \
175 - $(use_enable ldap) \
176 - $(use_enable debug leak-detective) \
177 - $(use_enable dhcp) \
178 - $(use_enable eap eap-sim) \
179 - $(use_enable eap eap-sim-file) \
180 - $(use_enable eap eap-simaka-sql) \
181 - $(use_enable eap eap-simaka-pseudonym) \
182 - $(use_enable eap eap-simaka-reauth) \
183 - $(use_enable eap eap-identity) \
184 - $(use_enable eap eap-md5) \
185 - $(use_enable eap eap-aka) \
186 - $(use_enable eap eap-aka-3gpp2) \
187 - $(use_enable eap md4) \
188 - $(use_enable eap eap-mschapv2) \
189 - $(use_enable eap eap-radius) \
190 - $(use_enable eap eap-tls) \
191 - $(use_enable eap eap-ttls) \
192 - $(use_enable eap xauth-eap) \
193 - $(use_enable eap eap-dynamic) \
194 - $(use_enable farp) \
195 - $(use_enable gmp) \
196 - $(use_enable gcrypt) \
197 - $(use_enable mysql) \
198 - $(use_enable networkmanager nm) \
199 - $(use_enable openssl) \
200 - $(use_enable pam xauth-pam) \
201 - $(use_enable pkcs11) \
202 - $(use_enable sqlite) \
203 - $(use_enable systemd) \
204 - $(use_with caps capabilities libcap) \
205 - --with-piddir=/run \
206 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
207 - ${myconf}
208 -}
209 -
210 -src_install() {
211 - emake DESTDIR="${D}" install
212 -
213 - if ! use systemd; then
214 - rm -rf "${ED}"/lib/systemd || die
215 - fi
216 -
217 - doinitd "${FILESDIR}"/ipsec
218 -
219 - local dir_ugid
220 - if use non-root; then
221 - fowners ${UGID}:${UGID} \
222 - /etc/ipsec.conf \
223 - /etc/strongswan.conf
224 -
225 - dir_ugid="${UGID}"
226 - else
227 - dir_ugid="root"
228 - fi
229 -
230 - diropts -m 0750 -o ${dir_ugid} -g ${dir_ugid}
231 - dodir /etc/ipsec.d \
232 - /etc/ipsec.d/aacerts \
233 - /etc/ipsec.d/acerts \
234 - /etc/ipsec.d/cacerts \
235 - /etc/ipsec.d/certs \
236 - /etc/ipsec.d/crls \
237 - /etc/ipsec.d/ocspcerts \
238 - /etc/ipsec.d/private \
239 - /etc/ipsec.d/reqs
240 -
241 - dodoc NEWS README TODO
242 -
243 - # shared libs are used only internally and there are no static libs,
244 - # so it's safe to get rid of the .la files
245 - find "${D}" -name '*.la' -delete || die "Failed to remove .la files."
246 -}
247 -
248 -pkg_preinst() {
249 - has_version "<net-vpn/strongswan-4.3.6-r1"
250 - upgrade_from_leq_4_3_6=$(( !$? ))
251 -
252 - has_version "<net-vpn/strongswan-4.3.6-r1[-caps]"
253 - previous_4_3_6_with_caps=$(( !$? ))
254 -}
255 -
256 -pkg_postinst() {
257 - if ! use openssl && ! use gcrypt; then
258 - elog
259 - elog "${PN} has been compiled without both OpenSSL and libgcrypt support."
260 - elog "Please note that this might effect availability and speed of some"
261 - elog "cryptographic features. You are advised to enable the OpenSSL plugin."
262 - elif ! use openssl; then
263 - elog
264 - elog "${PN} has been compiled without the OpenSSL plugin. This might effect"
265 - elog "availability and speed of some cryptographic features. There will be"
266 - elog "no support for Elliptic Curve Cryptography (Diffie-Hellman groups 19-21,"
267 - elog "25, 26) and ECDSA."
268 - fi
269 -
270 - if [[ $upgrade_from_leq_4_3_6 == 1 ]]; then
271 - chmod 0750 "${ROOT}"/etc/ipsec.d \
272 - "${ROOT}"/etc/ipsec.d/aacerts \
273 - "${ROOT}"/etc/ipsec.d/acerts \
274 - "${ROOT}"/etc/ipsec.d/cacerts \
275 - "${ROOT}"/etc/ipsec.d/certs \
276 - "${ROOT}"/etc/ipsec.d/crls \
277 - "${ROOT}"/etc/ipsec.d/ocspcerts \
278 - "${ROOT}"/etc/ipsec.d/private \
279 - "${ROOT}"/etc/ipsec.d/reqs
280 -
281 - ewarn
282 - ewarn "The default permissions for /etc/ipsec.d/* have been tightened for"
283 - ewarn "security reasons. Your system installed directories have been"
284 - ewarn "updated accordingly. Please check if necessary."
285 - ewarn
286 -
287 - if [[ $previous_4_3_6_with_caps == 1 ]]; then
288 - if ! use non-root; then
289 - ewarn
290 - ewarn "IMPORTANT: You previously had ${PN} installed without root"
291 - ewarn "privileges because it was implied by the 'caps' USE flag."
292 - ewarn "This has been changed. If you want ${PN} with user privileges,"
293 - ewarn "you have to re-emerge it with the 'non-root' USE flag enabled."
294 - ewarn
295 - fi
296 - fi
297 - fi
298 - if ! use caps && ! use non-root; then
299 - ewarn
300 - ewarn "You have decided to run ${PN} with root privileges and built it"
301 - ewarn "without support for POSIX capability dropping. It is generally"
302 - ewarn "strongly suggested that you reconsider- especially if you intend"
303 - ewarn "to run ${PN} as server with a public ip address."
304 - ewarn
305 - ewarn "You should re-emerge ${PN} with at least the 'caps' USE flag enabled."
306 - ewarn
307 - fi
308 - if use non-root; then
309 - elog
310 - elog "${PN} has been installed without superuser privileges (USE=non-root)."
311 - elog "This imposes several limitations mainly to the IKEv1 daemon 'pluto'"
312 - elog "but also a few to the IKEv2 daemon 'charon'."
313 - elog
314 - elog "Please carefully read: http://wiki.strongswan.org/wiki/nonRoot"
315 - elog
316 - elog "pluto uses a helper script by default to insert/remove routing and"
317 - elog "policy rules upon connection start/stop which requires superuser"
318 - elog "privileges. charon in contrast does this internally and can do so"
319 - elog "even with reduced (user) privileges."
320 - elog
321 - elog "Thus if you require IKEv1 (pluto) or need to specify a custom updown"
322 - elog "script to pluto or charon which requires superuser privileges, you"
323 - elog "can work around this limitation by using sudo to grant the"
324 - elog "user \"ipsec\" the appropriate rights."
325 - elog "For example (the default case):"
326 - elog "/etc/sudoers:"
327 - elog " ipsec ALL=(ALL) NOPASSWD: SETENV: /usr/sbin/ipsec"
328 - elog "Under the specific connection block in /etc/ipsec.conf:"
329 - elog " leftupdown=\"sudo -E ipsec _updown iptables\""
330 - elog
331 - fi
332 - elog
333 - elog "Make sure you have _all_ required kernel modules available including"
334 - elog "the appropriate cryptographic algorithms. A list is available at:"
335 - elog " https://wiki.strongswan.org/projects/strongswan/wiki/KernelModules"
336 - elog
337 - elog "The up-to-date manual is available online at:"
338 - elog " https://wiki.strongswan.org/"
339 - elog
340 -}
341
342 diff --git a/net-vpn/strongswan/strongswan-5.9.1.ebuild b/net-vpn/strongswan/strongswan-5.9.1.ebuild
343 deleted file mode 100644
344 index cd1ecbe44da..00000000000
345 --- a/net-vpn/strongswan/strongswan-5.9.1.ebuild
346 +++ /dev/null
347 @@ -1,308 +0,0 @@
348 -# Copyright 1999-2021 Gentoo Authors
349 -# Distributed under the terms of the GNU General Public License v2
350 -
351 -EAPI="7"
352 -inherit linux-info systemd
353 -
354 -DESCRIPTION="IPsec-based VPN solution, supporting IKEv1/IKEv2 and MOBIKE"
355 -HOMEPAGE="https://www.strongswan.org/"
356 -SRC_URI="https://download.strongswan.org/${P}.tar.bz2"
357 -
358 -LICENSE="GPL-2 RSA DES"
359 -SLOT="0"
360 -KEYWORDS="amd64 arm ~arm64 ppc ~ppc64 x86"
361 -IUSE="+caps curl +constraints debug dhcp eap farp gcrypt +gmp ldap mysql networkmanager +non-root +openssl selinux sqlite systemd pam pkcs11"
362 -
363 -STRONGSWAN_PLUGINS_STD="led lookip systime-fix unity vici"
364 -STRONGSWAN_PLUGINS_OPT="aesni blowfish bypass-lan ccm chapoly ctr forecast gcm ha ipseckey newhope ntru padlock rdrand save-keys unbound whitelist"
365 -for mod in $STRONGSWAN_PLUGINS_STD; do
366 - IUSE="${IUSE} +strongswan_plugins_${mod}"
367 -done
368 -
369 -for mod in $STRONGSWAN_PLUGINS_OPT; do
370 - IUSE="${IUSE} strongswan_plugins_${mod}"
371 -done
372 -
373 -COMMON_DEPEND="non-root? (
374 - acct-user/ipsec
375 - acct-group/ipsec
376 - )
377 - gmp? ( >=dev-libs/gmp-4.1.5:= )
378 - gcrypt? ( dev-libs/libgcrypt:0 )
379 - caps? ( sys-libs/libcap )
380 - curl? ( net-misc/curl )
381 - ldap? ( net-nds/openldap )
382 - openssl? ( >=dev-libs/openssl-0.9.8:=[-bindist(-)] )
383 - mysql? ( dev-db/mysql-connector-c:= )
384 - sqlite? ( >=dev-db/sqlite-3.3.1 )
385 - systemd? ( sys-apps/systemd )
386 - networkmanager? ( net-misc/networkmanager )
387 - pam? ( sys-libs/pam )
388 - strongswan_plugins_unbound? ( net-dns/unbound:= net-libs/ldns )"
389 -
390 -DEPEND="${COMMON_DEPEND}
391 - virtual/linux-sources
392 - sys-kernel/linux-headers"
393 -
394 -RDEPEND="${COMMON_DEPEND}
395 - virtual/logger
396 - sys-apps/iproute2
397 - !net-vpn/libreswan
398 - selinux? ( sec-policy/selinux-ipsec )"
399 -
400 -UGID="ipsec"
401 -
402 -pkg_setup() {
403 - linux-info_pkg_setup
404 -
405 - elog "Linux kernel version: ${KV_FULL}"
406 -
407 - if ! kernel_is -ge 2 6 16; then
408 - eerror
409 - eerror "This ebuild currently only supports ${PN} with the"
410 - eerror "native Linux 2.6 IPsec stack on kernels >= 2.6.16."
411 - eerror
412 - fi
413 -
414 - if kernel_is -lt 2 6 34; then
415 - ewarn
416 - ewarn "IMPORTANT KERNEL NOTES: Please read carefully..."
417 - ewarn
418 -
419 - if kernel_is -lt 2 6 29; then
420 - ewarn "[ < 2.6.29 ] Due to a missing kernel feature, you have to"
421 - ewarn "include all required IPv6 modules even if you just intend"
422 - ewarn "to run on IPv4 only."
423 - ewarn
424 - ewarn "This has been fixed with kernels >= 2.6.29."
425 - ewarn
426 - fi
427 -
428 - if kernel_is -lt 2 6 33; then
429 - ewarn "[ < 2.6.33 ] Kernels prior to 2.6.33 include a non-standards"
430 - ewarn "compliant implementation for SHA-2 HMAC support in ESP and"
431 - ewarn "miss SHA384 and SHA512 HMAC support altogether."
432 - ewarn
433 - ewarn "If you need any of those features, please use kernel >= 2.6.33."
434 - ewarn
435 - fi
436 -
437 - if kernel_is -lt 2 6 34; then
438 - ewarn "[ < 2.6.34 ] Support for the AES-GMAC authentification-only"
439 - ewarn "ESP cipher is only included in kernels >= 2.6.34."
440 - ewarn
441 - ewarn "If you need it, please use kernel >= 2.6.34."
442 - ewarn
443 - fi
444 - fi
445 -}
446 -
447 -src_configure() {
448 - local myconf=""
449 -
450 - if use non-root; then
451 - myconf="${myconf} --with-user=${UGID} --with-group=${UGID}"
452 - fi
453 -
454 - # If a user has already enabled db support, those plugins will
455 - # most likely be desired as well. Besides they don't impose new
456 - # dependencies and come at no cost (except for space).
457 - if use mysql || use sqlite; then
458 - myconf="${myconf} --enable-attr-sql --enable-sql"
459 - fi
460 -
461 - # strongSwan builds and installs static libs by default which are
462 - # useless to the user (and to strongSwan for that matter) because no
463 - # header files or alike get installed... so disabling them is safe.
464 - if use pam && use eap; then
465 - myconf="${myconf} --enable-eap-gtc"
466 - else
467 - myconf="${myconf} --disable-eap-gtc"
468 - fi
469 -
470 - for mod in $STRONGSWAN_PLUGINS_STD; do
471 - if use strongswan_plugins_${mod}; then
472 - myconf+=" --enable-${mod}"
473 - fi
474 - done
475 -
476 - for mod in $STRONGSWAN_PLUGINS_OPT; do
477 - if use strongswan_plugins_${mod}; then
478 - myconf+=" --enable-${mod}"
479 - fi
480 - done
481 -
482 - econf \
483 - --disable-static \
484 - --enable-ikev1 \
485 - --enable-ikev2 \
486 - --enable-swanctl \
487 - --enable-socket-dynamic \
488 - $(use_enable curl) \
489 - $(use_enable constraints) \
490 - $(use_enable ldap) \
491 - $(use_enable debug leak-detective) \
492 - $(use_enable dhcp) \
493 - $(use_enable eap eap-sim) \
494 - $(use_enable eap eap-sim-file) \
495 - $(use_enable eap eap-simaka-sql) \
496 - $(use_enable eap eap-simaka-pseudonym) \
497 - $(use_enable eap eap-simaka-reauth) \
498 - $(use_enable eap eap-identity) \
499 - $(use_enable eap eap-md5) \
500 - $(use_enable eap eap-aka) \
501 - $(use_enable eap eap-aka-3gpp2) \
502 - $(use_enable eap md4) \
503 - $(use_enable eap eap-mschapv2) \
504 - $(use_enable eap eap-radius) \
505 - $(use_enable eap eap-tls) \
506 - $(use_enable eap eap-ttls) \
507 - $(use_enable eap xauth-eap) \
508 - $(use_enable eap eap-dynamic) \
509 - $(use_enable farp) \
510 - $(use_enable gmp) \
511 - $(use_enable gcrypt) \
512 - $(use_enable mysql) \
513 - $(use_enable networkmanager nm) \
514 - $(use_enable openssl) \
515 - $(use_enable pam xauth-pam) \
516 - $(use_enable pkcs11) \
517 - $(use_enable sqlite) \
518 - $(use_enable systemd) \
519 - $(use_with caps capabilities libcap) \
520 - --with-piddir=/run \
521 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
522 - ${myconf}
523 -}
524 -
525 -src_install() {
526 - emake DESTDIR="${D}" install
527 -
528 - if ! use systemd; then
529 - rm -rf "${ED}"/lib/systemd || die
530 - fi
531 -
532 - doinitd "${FILESDIR}"/ipsec
533 -
534 - local dir_ugid
535 - if use non-root; then
536 - fowners ${UGID}:${UGID} \
537 - /etc/ipsec.conf \
538 - /etc/strongswan.conf
539 -
540 - dir_ugid="${UGID}"
541 - else
542 - dir_ugid="root"
543 - fi
544 -
545 - diropts -m 0750 -o ${dir_ugid} -g ${dir_ugid}
546 - dodir /etc/ipsec.d \
547 - /etc/ipsec.d/aacerts \
548 - /etc/ipsec.d/acerts \
549 - /etc/ipsec.d/cacerts \
550 - /etc/ipsec.d/certs \
551 - /etc/ipsec.d/crls \
552 - /etc/ipsec.d/ocspcerts \
553 - /etc/ipsec.d/private \
554 - /etc/ipsec.d/reqs
555 -
556 - dodoc NEWS README TODO
557 -
558 - # shared libs are used only internally and there are no static libs,
559 - # so it's safe to get rid of the .la files
560 - find "${D}" -name '*.la' -delete || die "Failed to remove .la files."
561 -}
562 -
563 -pkg_preinst() {
564 - has_version "<net-vpn/strongswan-4.3.6-r1"
565 - upgrade_from_leq_4_3_6=$(( !$? ))
566 -
567 - has_version "<net-vpn/strongswan-4.3.6-r1[-caps]"
568 - previous_4_3_6_with_caps=$(( !$? ))
569 -}
570 -
571 -pkg_postinst() {
572 - if ! use openssl && ! use gcrypt; then
573 - elog
574 - elog "${PN} has been compiled without both OpenSSL and libgcrypt support."
575 - elog "Please note that this might effect availability and speed of some"
576 - elog "cryptographic features. You are advised to enable the OpenSSL plugin."
577 - elif ! use openssl; then
578 - elog
579 - elog "${PN} has been compiled without the OpenSSL plugin. This might effect"
580 - elog "availability and speed of some cryptographic features. There will be"
581 - elog "no support for Elliptic Curve Cryptography (Diffie-Hellman groups 19-21,"
582 - elog "25, 26) and ECDSA."
583 - fi
584 -
585 - if [[ $upgrade_from_leq_4_3_6 == 1 ]]; then
586 - chmod 0750 "${ROOT}"/etc/ipsec.d \
587 - "${ROOT}"/etc/ipsec.d/aacerts \
588 - "${ROOT}"/etc/ipsec.d/acerts \
589 - "${ROOT}"/etc/ipsec.d/cacerts \
590 - "${ROOT}"/etc/ipsec.d/certs \
591 - "${ROOT}"/etc/ipsec.d/crls \
592 - "${ROOT}"/etc/ipsec.d/ocspcerts \
593 - "${ROOT}"/etc/ipsec.d/private \
594 - "${ROOT}"/etc/ipsec.d/reqs
595 -
596 - ewarn
597 - ewarn "The default permissions for /etc/ipsec.d/* have been tightened for"
598 - ewarn "security reasons. Your system installed directories have been"
599 - ewarn "updated accordingly. Please check if necessary."
600 - ewarn
601 -
602 - if [[ $previous_4_3_6_with_caps == 1 ]]; then
603 - if ! use non-root; then
604 - ewarn
605 - ewarn "IMPORTANT: You previously had ${PN} installed without root"
606 - ewarn "privileges because it was implied by the 'caps' USE flag."
607 - ewarn "This has been changed. If you want ${PN} with user privileges,"
608 - ewarn "you have to re-emerge it with the 'non-root' USE flag enabled."
609 - ewarn
610 - fi
611 - fi
612 - fi
613 - if ! use caps && ! use non-root; then
614 - ewarn
615 - ewarn "You have decided to run ${PN} with root privileges and built it"
616 - ewarn "without support for POSIX capability dropping. It is generally"
617 - ewarn "strongly suggested that you reconsider- especially if you intend"
618 - ewarn "to run ${PN} as server with a public ip address."
619 - ewarn
620 - ewarn "You should re-emerge ${PN} with at least the 'caps' USE flag enabled."
621 - ewarn
622 - fi
623 - if use non-root; then
624 - elog
625 - elog "${PN} has been installed without superuser privileges (USE=non-root)."
626 - elog "This imposes several limitations mainly to the IKEv1 daemon 'pluto'"
627 - elog "but also a few to the IKEv2 daemon 'charon'."
628 - elog
629 - elog "Please carefully read: http://wiki.strongswan.org/wiki/nonRoot"
630 - elog
631 - elog "pluto uses a helper script by default to insert/remove routing and"
632 - elog "policy rules upon connection start/stop which requires superuser"
633 - elog "privileges. charon in contrast does this internally and can do so"
634 - elog "even with reduced (user) privileges."
635 - elog
636 - elog "Thus if you require IKEv1 (pluto) or need to specify a custom updown"
637 - elog "script to pluto or charon which requires superuser privileges, you"
638 - elog "can work around this limitation by using sudo to grant the"
639 - elog "user \"ipsec\" the appropriate rights."
640 - elog "For example (the default case):"
641 - elog "/etc/sudoers:"
642 - elog " ipsec ALL=(ALL) NOPASSWD: SETENV: /usr/sbin/ipsec"
643 - elog "Under the specific connection block in /etc/ipsec.conf:"
644 - elog " leftupdown=\"sudo -E ipsec _updown iptables\""
645 - elog
646 - fi
647 - elog
648 - elog "Make sure you have _all_ required kernel modules available including"
649 - elog "the appropriate cryptographic algorithms. A list is available at:"
650 - elog " https://wiki.strongswan.org/projects/strongswan/wiki/KernelModules"
651 - elog
652 - elog "The up-to-date manual is available online at:"
653 - elog " https://wiki.strongswan.org/"
654 - elog
655 -}