Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-firewall/ipsec-tools: ChangeLog ipsec-tools-0.8.0-r1.ebuild
Date: Sun, 04 Mar 2012 18:18:37
Message-Id: 20120304181827.7D6F32004B@flycatcher.gentoo.org
1 blueness 12/03/04 18:18:27
2
3 Modified: ChangeLog ipsec-tools-0.8.0-r1.ebuild
4 Log:
5 Make linux-info output easy to interpret, bug #335510
6
7 (Portage version: 2.1.10.44/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.84 net-firewall/ipsec-tools/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipsec-tools/ChangeLog?rev=1.84&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipsec-tools/ChangeLog?rev=1.84&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipsec-tools/ChangeLog?r1=1.83&r2=1.84
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ChangeLog,v
19 retrieving revision 1.83
20 retrieving revision 1.84
21 diff -u -r1.83 -r1.84
22 --- ChangeLog 4 Mar 2012 03:55:25 -0000 1.83
23 +++ ChangeLog 4 Mar 2012 18:18:27 -0000 1.84
24 @@ -1,6 +1,10 @@
25 # ChangeLog for net-firewall/ipsec-tools
26 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ChangeLog,v 1.83 2012/03/04 03:55:25 blueness Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ChangeLog,v 1.84 2012/03/04 18:18:27 blueness Exp $
29 +
30 + 04 Mar 2012; Anthony G. Basile <blueness@g.o>
31 + ipsec-tools-0.8.0-r1.ebuild:
32 + Make linux-info output easy to interpret, bug #335510
33
34 04 Mar 2012; Anthony G. Basile <blueness@g.o>
35 ipsec-tools-0.8.0-r1.ebuild:
36
37
38
39 1.3 net-firewall/ipsec-tools/ipsec-tools-0.8.0-r1.ebuild
40
41 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.8.0-r1.ebuild?rev=1.3&view=markup
42 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.8.0-r1.ebuild?rev=1.3&content-type=text/plain
43 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.8.0-r1.ebuild?r1=1.2&r2=1.3
44
45 Index: ipsec-tools-0.8.0-r1.ebuild
46 ===================================================================
47 RCS file: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.8.0-r1.ebuild,v
48 retrieving revision 1.2
49 retrieving revision 1.3
50 diff -u -r1.2 -r1.3
51 --- ipsec-tools-0.8.0-r1.ebuild 4 Mar 2012 03:55:25 -0000 1.2
52 +++ ipsec-tools-0.8.0-r1.ebuild 4 Mar 2012 18:18:27 -0000 1.3
53 @@ -1,6 +1,6 @@
54 # Copyright 1999-2012 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.8.0-r1.ebuild,v 1.2 2012/03/04 03:55:25 blueness Exp $
57 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.8.0-r1.ebuild,v 1.3 2012/03/04 18:18:27 blueness Exp $
58
59 EAPI="4"
60
61 @@ -33,44 +33,97 @@
62 >=sys-kernel/linux-headers-2.6.30"
63
64 pkg_setup() {
65 + linux-info_pkg_setup
66 +
67 get_version
68 - if kernel_is -ge 2 6 19 ; then
69 - einfo "Checking for suitable kernel configuration (Networking | Networking support | Networking options)"
70
71 - if use nat; then
72 - CONFIG_CHECK="${CONFIG_CHECK} ~NETFILTER_XT_MATCH_POLICY"
73 - export WARNING_NETFILTER_XT_MATCH_POLICY="NAT support may fail weirdly unless you enable this option in your kernel"
74 - fi
75 + if linux_config_exists && kernel_is -ge 2 6 19; then
76 + ewarn
77 + ewarn "\033[1;33m**************************************************\033[1;33m"
78 + ewarn
79 + ewarn "Checking kernel configuration in /usr/src/linux or"
80 + ewarn "or /proc/config.gz for compatibility with ${PN}."
81 + ewarn
82 + ewarn "WARNING: If your *configured* and *running* kernel"
83 + ewarn "differ either now or in the future, then these checks"
84 + ewarn "may lead to misleading results."
85
86 + # Check options for all flavors of IPSec
87 + local msg=""
88 for i in XFRM_USER NET_KEY; do
89 - CONFIG_CHECK="${CONFIG_CHECK} ~${i}"
90 - eval "export WARNING_${i}='No tunnels will be available at all'"
91 + if ! linux_chkconfig_present ${i}; then
92 + msg="${msg} ${i}"
93 + fi
94 done
95 + if [[ ! -z "$msg" ]]; then
96 + ewarn
97 + ewarn "ALL IPSec may fail. CHECK:"
98 + ewarn "${msg}"
99 + fi
100 +
101 + # Check unencrypted IPSec
102 + if ! linux_chkconfig_present CRYPTO_NULL; then
103 + ewarn
104 + ewarn "Unencrypted IPSec may fail. CHECK:"
105 + ewarn " CRYPTO_NULL"
106 + fi
107
108 - for i in INET_IPCOMP INET_AH INET_ESP \
109 + # Check IPv4 IPSec
110 + msg=""
111 + for i in \
112 + INET_IPCOMP INET_AH INET_ESP \
113 INET_XFRM_MODE_TRANSPORT \
114 INET_XFRM_MODE_TUNNEL \
115 - INET_XFRM_MODE_BEET ; do
116 - CONFIG_CHECK="${CONFIG_CHECK} ~${i}"
117 - eval "export WARNING_${i}='IPv4 tunnels will not be available'"
118 + INET_XFRM_MODE_BEET
119 + do
120 + if ! linux_chkconfig_present ${i}; then
121 + msg="${msg} ${i}"
122 + fi
123 done
124 + if [[ ! -z "$msg" ]]; then
125 + ewarn
126 + ewarn "IPv4 IPSec may fail. CHECK:"
127 + ewarn "${msg}"
128 + fi
129
130 - for i in INET6_IPCOMP INET6_AH INET6_ESP \
131 - INET6_XFRM_MODE_TRANSPORT \
132 - INET6_XFRM_MODE_TUNNEL \
133 - INET6_XFRM_MODE_BEET ; do
134 - CONFIG_CHECK="${CONFIG_CHECK} ~${i}"
135 - eval "export WARNING_${i}='IPv6 tunnels will not be available'"
136 - done
137 + # Check IPv6 IPSec
138 + if use ipv6; then
139 + msg=""
140 + for i in INET6_IPCOMP INET6_AH INET6_ESP \
141 + INET6_XFRM_MODE_TRANSPORT \
142 + INET6_XFRM_MODE_TUNNEL \
143 + INET6_XFRM_MODE_BEET
144 + do
145 + if ! linux_chkconfig_present ${i}; then
146 + msg="${msg} ${i}"
147 + fi
148 + done
149 + if [[ ! -z "$msg" ]]; then
150 + ewarn
151 + ewarn "IPv6 IPSec may fail. CHECK:"
152 + ewarn "${msg}"
153 + fi
154 + fi
155
156 - CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_NULL"
157 - export WARNING_CRYPTO_NULL="Unencrypted tunnels will not be available"
158 - export CONFIG_CHECK
159 + # Check IPSec behind NAT
160 + if use nat; then
161 + if ! linux_chkconfig_present NETFILTER_XT_MATCH_POLICY; then
162 + ewarn
163 + ewarn "IPSec behind NAT may fail. CHECK:"
164 + ewarn " NETFILTER_XT_MATCH_POLICY"
165 + fi
166 + fi
167
168 - check_extra_config
169 + ewarn
170 + ewarn "\033[1;33m**************************************************\033[1;33m"
171 + ewarn
172 else
173 - eerror "You must have a kernel >=2.6.19 to run ipsec-tools."
174 - eerror "Building now, assuming that you will run on a different kernel"
175 + eerror
176 + eerror "\033[1;31m**************************************************\033[1;31m"
177 + eerror "Make sure that your *running* kernel is/will be >=2.6.19."
178 + eerror "Building ${PN} now, assuming that you know what you're doing."
179 + eerror "\033[1;31m**************************************************\033[1;31m"
180 + eerror
181 fi
182 }