Gentoo Archives: gentoo-commits

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