Gentoo Archives: gentoo-commits

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