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: Tue, 24 Dec 2019 15:07:31
Message-Id: 1577200039.a4e0438d97e9c3645b65bbe9618116fe81f64a3b.whissi@gentoo
1 commit: a4e0438d97e9c3645b65bbe9618116fe81f64a3b
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 24 15:03:25 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 24 15:07:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4e0438d
7
8 net-vpn/strongswan: drop old
9
10 Package-Manager: Portage-2.3.82, Repoman-2.3.20
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 net-vpn/strongswan/Manifest | 1 -
14 net-vpn/strongswan/strongswan-5.7.2.ebuild | 304 -----------------------------
15 2 files changed, 305 deletions(-)
16
17 diff --git a/net-vpn/strongswan/Manifest b/net-vpn/strongswan/Manifest
18 index a4d64485f65..bfe47d0734f 100644
19 --- a/net-vpn/strongswan/Manifest
20 +++ b/net-vpn/strongswan/Manifest
21 @@ -1,2 +1 @@
22 -DIST strongswan-5.7.2.tar.bz2 4997818 BLAKE2B e5a160ea8d31ae14c9731e414e42653ecb12f259fbe76ec7289f44afe5687f4123d89750a8f57c9ea006aec7f0be28e0f0c56d6c0a4bc96f0e1ba69c29da904f SHA512 e2169dbbc0c03737e34af90d7bc07e444408c5e2ac1f81764eeccbac8b142b984ce9ed512a89071075a930e0997632267f6912aa5b352eee2edbd551b5a64e7e
23 DIST strongswan-5.8.1.tar.bz2 4517921 BLAKE2B 07a82309515a054b267a063fc0e2f49fd03d16b221b1ee26a33c8d367df140797320e1ef7007a39074e40c472022d941656b3ae93d2eb860152cdc5a5d3dbc8a SHA512 630d24643b3d61e931bb25cdd083ad3c55f92fe41f3fcd3198012eee486fb3b1a16dc3f80936162afb7da9e471d45d92b7d183a00153a558babb2a79e5f6813f
24
25 diff --git a/net-vpn/strongswan/strongswan-5.7.2.ebuild b/net-vpn/strongswan/strongswan-5.7.2.ebuild
26 deleted file mode 100644
27 index 2c19bfbd44a..00000000000
28 --- a/net-vpn/strongswan/strongswan-5.7.2.ebuild
29 +++ /dev/null
30 @@ -1,304 +0,0 @@
31 -# Copyright 1999-2019 Gentoo Authors
32 -# Distributed under the terms of the GNU General Public License v2
33 -
34 -EAPI="7"
35 -inherit linux-info systemd user
36 -
37 -DESCRIPTION="IPsec-based VPN solution, supporting IKEv1/IKEv2 and MOBIKE"
38 -HOMEPAGE="https://www.strongswan.org/"
39 -SRC_URI="https://download.strongswan.org/${P}.tar.bz2"
40 -
41 -LICENSE="GPL-2 RSA DES"
42 -SLOT="0"
43 -KEYWORDS="amd64 arm ppc ~ppc64 x86"
44 -IUSE="+caps curl +constraints debug dhcp eap farp gcrypt +gmp ldap mysql networkmanager +non-root +openssl selinux sqlite systemd pam pkcs11"
45 -
46 -STRONGSWAN_PLUGINS_STD="led lookip systime-fix unity vici"
47 -STRONGSWAN_PLUGINS_OPT="aesni blowfish ccm chapoly ctr forecast gcm ha ipseckey newhope ntru padlock rdrand save-keys unbound whitelist"
48 -for mod in $STRONGSWAN_PLUGINS_STD; do
49 - IUSE="${IUSE} +strongswan_plugins_${mod}"
50 -done
51 -
52 -for mod in $STRONGSWAN_PLUGINS_OPT; do
53 - IUSE="${IUSE} strongswan_plugins_${mod}"
54 -done
55 -
56 -COMMON_DEPEND="!net-misc/openswan
57 - gmp? ( >=dev-libs/gmp-4.1.5:= )
58 - gcrypt? ( dev-libs/libgcrypt:0 )
59 - caps? ( sys-libs/libcap )
60 - curl? ( net-misc/curl )
61 - ldap? ( net-nds/openldap )
62 - openssl? ( >=dev-libs/openssl-0.9.8:=[-bindist] )
63 - mysql? ( dev-db/mysql-connector-c:= )
64 - sqlite? ( >=dev-db/sqlite-3.3.1 )
65 - systemd? ( sys-apps/systemd )
66 - networkmanager? ( net-misc/networkmanager )
67 - pam? ( sys-libs/pam )
68 - strongswan_plugins_unbound? ( net-dns/unbound:= net-libs/ldns )"
69 -DEPEND="${COMMON_DEPEND}
70 - virtual/linux-sources
71 - sys-kernel/linux-headers"
72 -RDEPEND="${COMMON_DEPEND}
73 - virtual/logger
74 - sys-apps/iproute2
75 - !net-vpn/libreswan
76 - selinux? ( sec-policy/selinux-ipsec )"
77 -
78 -UGID="ipsec"
79 -
80 -pkg_setup() {
81 - linux-info_pkg_setup
82 -
83 - elog "Linux kernel version: ${KV_FULL}"
84 -
85 - if ! kernel_is -ge 2 6 16; then
86 - eerror
87 - eerror "This ebuild currently only supports ${PN} with the"
88 - eerror "native Linux 2.6 IPsec stack on kernels >= 2.6.16."
89 - eerror
90 - fi
91 -
92 - if kernel_is -lt 2 6 34; then
93 - ewarn
94 - ewarn "IMPORTANT KERNEL NOTES: Please read carefully..."
95 - ewarn
96 -
97 - if kernel_is -lt 2 6 29; then
98 - ewarn "[ < 2.6.29 ] Due to a missing kernel feature, you have to"
99 - ewarn "include all required IPv6 modules even if you just intend"
100 - ewarn "to run on IPv4 only."
101 - ewarn
102 - ewarn "This has been fixed with kernels >= 2.6.29."
103 - ewarn
104 - fi
105 -
106 - if kernel_is -lt 2 6 33; then
107 - ewarn "[ < 2.6.33 ] Kernels prior to 2.6.33 include a non-standards"
108 - ewarn "compliant implementation for SHA-2 HMAC support in ESP and"
109 - ewarn "miss SHA384 and SHA512 HMAC support altogether."
110 - ewarn
111 - ewarn "If you need any of those features, please use kernel >= 2.6.33."
112 - ewarn
113 - fi
114 -
115 - if kernel_is -lt 2 6 34; then
116 - ewarn "[ < 2.6.34 ] Support for the AES-GMAC authentification-only"
117 - ewarn "ESP cipher is only included in kernels >= 2.6.34."
118 - ewarn
119 - ewarn "If you need it, please use kernel >= 2.6.34."
120 - ewarn
121 - fi
122 - fi
123 -
124 - if use non-root; then
125 - enewgroup ${UGID}
126 - enewuser ${UGID} -1 -1 -1 ${UGID}
127 - fi
128 -}
129 -
130 -src_configure() {
131 - local myconf=""
132 -
133 - if use non-root; then
134 - myconf="${myconf} --with-user=${UGID} --with-group=${UGID}"
135 - fi
136 -
137 - # If a user has already enabled db support, those plugins will
138 - # most likely be desired as well. Besides they don't impose new
139 - # dependencies and come at no cost (except for space).
140 - if use mysql || use sqlite; then
141 - myconf="${myconf} --enable-attr-sql --enable-sql"
142 - fi
143 -
144 - # strongSwan builds and installs static libs by default which are
145 - # useless to the user (and to strongSwan for that matter) because no
146 - # header files or alike get installed... so disabling them is safe.
147 - if use pam && use eap; then
148 - myconf="${myconf} --enable-eap-gtc"
149 - else
150 - myconf="${myconf} --disable-eap-gtc"
151 - fi
152 -
153 - for mod in $STRONGSWAN_PLUGINS_STD; do
154 - if use strongswan_plugins_${mod}; then
155 - myconf+=" --enable-${mod}"
156 - fi
157 - done
158 -
159 - for mod in $STRONGSWAN_PLUGINS_OPT; do
160 - if use strongswan_plugins_${mod}; then
161 - myconf+=" --enable-${mod}"
162 - fi
163 - done
164 -
165 - econf \
166 - --disable-static \
167 - --enable-ikev1 \
168 - --enable-ikev2 \
169 - --enable-swanctl \
170 - --enable-socket-dynamic \
171 - $(use_enable curl) \
172 - $(use_enable constraints) \
173 - $(use_enable ldap) \
174 - $(use_enable debug leak-detective) \
175 - $(use_enable dhcp) \
176 - $(use_enable eap eap-sim) \
177 - $(use_enable eap eap-sim-file) \
178 - $(use_enable eap eap-simaka-sql) \
179 - $(use_enable eap eap-simaka-pseudonym) \
180 - $(use_enable eap eap-simaka-reauth) \
181 - $(use_enable eap eap-identity) \
182 - $(use_enable eap eap-md5) \
183 - $(use_enable eap eap-aka) \
184 - $(use_enable eap eap-aka-3gpp2) \
185 - $(use_enable eap md4) \
186 - $(use_enable eap eap-mschapv2) \
187 - $(use_enable eap eap-radius) \
188 - $(use_enable eap eap-tls) \
189 - $(use_enable eap eap-ttls) \
190 - $(use_enable eap xauth-eap) \
191 - $(use_enable eap eap-dynamic) \
192 - $(use_enable farp) \
193 - $(use_enable gmp) \
194 - $(use_enable gcrypt) \
195 - $(use_enable mysql) \
196 - $(use_enable networkmanager nm) \
197 - $(use_enable openssl) \
198 - $(use_enable pam xauth-pam) \
199 - $(use_enable pkcs11) \
200 - $(use_enable sqlite) \
201 - $(use_enable systemd) \
202 - $(use_with caps capabilities libcap) \
203 - --with-piddir=/run \
204 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
205 - ${myconf}
206 -}
207 -
208 -src_install() {
209 - emake DESTDIR="${D}" install
210 -
211 - doinitd "${FILESDIR}"/ipsec
212 -
213 - local dir_ugid
214 - if use non-root; then
215 - fowners ${UGID}:${UGID} \
216 - /etc/ipsec.conf \
217 - /etc/strongswan.conf
218 -
219 - dir_ugid="${UGID}"
220 - else
221 - dir_ugid="root"
222 - fi
223 -
224 - diropts -m 0750 -o ${dir_ugid} -g ${dir_ugid}
225 - dodir /etc/ipsec.d \
226 - /etc/ipsec.d/aacerts \
227 - /etc/ipsec.d/acerts \
228 - /etc/ipsec.d/cacerts \
229 - /etc/ipsec.d/certs \
230 - /etc/ipsec.d/crls \
231 - /etc/ipsec.d/ocspcerts \
232 - /etc/ipsec.d/private \
233 - /etc/ipsec.d/reqs
234 -
235 - dodoc NEWS README TODO
236 -
237 - # shared libs are used only internally and there are no static libs,
238 - # so it's safe to get rid of the .la files
239 - find "${D}" -name '*.la' -delete || die "Failed to remove .la files."
240 -}
241 -
242 -pkg_preinst() {
243 - has_version "<net-vpn/strongswan-4.3.6-r1"
244 - upgrade_from_leq_4_3_6=$(( !$? ))
245 -
246 - has_version "<net-vpn/strongswan-4.3.6-r1[-caps]"
247 - previous_4_3_6_with_caps=$(( !$? ))
248 -}
249 -
250 -pkg_postinst() {
251 - if ! use openssl && ! use gcrypt; then
252 - elog
253 - elog "${PN} has been compiled without both OpenSSL and libgcrypt support."
254 - elog "Please note that this might effect availability and speed of some"
255 - elog "cryptographic features. You are advised to enable the OpenSSL plugin."
256 - elif ! use openssl; then
257 - elog
258 - elog "${PN} has been compiled without the OpenSSL plugin. This might effect"
259 - elog "availability and speed of some cryptographic features. There will be"
260 - elog "no support for Elliptic Curve Cryptography (Diffie-Hellman groups 19-21,"
261 - elog "25, 26) and ECDSA."
262 - fi
263 -
264 - if [[ $upgrade_from_leq_4_3_6 == 1 ]]; then
265 - chmod 0750 "${ROOT}"/etc/ipsec.d \
266 - "${ROOT}"/etc/ipsec.d/aacerts \
267 - "${ROOT}"/etc/ipsec.d/acerts \
268 - "${ROOT}"/etc/ipsec.d/cacerts \
269 - "${ROOT}"/etc/ipsec.d/certs \
270 - "${ROOT}"/etc/ipsec.d/crls \
271 - "${ROOT}"/etc/ipsec.d/ocspcerts \
272 - "${ROOT}"/etc/ipsec.d/private \
273 - "${ROOT}"/etc/ipsec.d/reqs
274 -
275 - ewarn
276 - ewarn "The default permissions for /etc/ipsec.d/* have been tightened for"
277 - ewarn "security reasons. Your system installed directories have been"
278 - ewarn "updated accordingly. Please check if necessary."
279 - ewarn
280 -
281 - if [[ $previous_4_3_6_with_caps == 1 ]]; then
282 - if ! use non-root; then
283 - ewarn
284 - ewarn "IMPORTANT: You previously had ${PN} installed without root"
285 - ewarn "privileges because it was implied by the 'caps' USE flag."
286 - ewarn "This has been changed. If you want ${PN} with user privileges,"
287 - ewarn "you have to re-emerge it with the 'non-root' USE flag enabled."
288 - ewarn
289 - fi
290 - fi
291 - fi
292 - if ! use caps && ! use non-root; then
293 - ewarn
294 - ewarn "You have decided to run ${PN} with root privileges and built it"
295 - ewarn "without support for POSIX capability dropping. It is generally"
296 - ewarn "strongly suggested that you reconsider- especially if you intend"
297 - ewarn "to run ${PN} as server with a public ip address."
298 - ewarn
299 - ewarn "You should re-emerge ${PN} with at least the 'caps' USE flag enabled."
300 - ewarn
301 - fi
302 - if use non-root; then
303 - elog
304 - elog "${PN} has been installed without superuser privileges (USE=non-root)."
305 - elog "This imposes several limitations mainly to the IKEv1 daemon 'pluto'"
306 - elog "but also a few to the IKEv2 daemon 'charon'."
307 - elog
308 - elog "Please carefully read: http://wiki.strongswan.org/wiki/nonRoot"
309 - elog
310 - elog "pluto uses a helper script by default to insert/remove routing and"
311 - elog "policy rules upon connection start/stop which requires superuser"
312 - elog "privileges. charon in contrast does this internally and can do so"
313 - elog "even with reduced (user) privileges."
314 - elog
315 - elog "Thus if you require IKEv1 (pluto) or need to specify a custom updown"
316 - elog "script to pluto or charon which requires superuser privileges, you"
317 - elog "can work around this limitation by using sudo to grant the"
318 - elog "user \"ipsec\" the appropriate rights."
319 - elog "For example (the default case):"
320 - elog "/etc/sudoers:"
321 - elog " ipsec ALL=(ALL) NOPASSWD: SETENV: /usr/sbin/ipsec"
322 - elog "Under the specific connection block in /etc/ipsec.conf:"
323 - elog " leftupdown=\"sudo -E ipsec _updown iptables\""
324 - elog
325 - fi
326 - elog
327 - elog "Make sure you have _all_ required kernel modules available including"
328 - elog "the appropriate cryptographic algorithms. A list is available at:"
329 - elog " http://wiki.strongswan.org/projects/strongswan/wiki/KernelModules"
330 - elog
331 - elog "The up-to-date manual is available online at:"
332 - elog " http://wiki.strongswan.org/"
333 - elog
334 -}