1 |
floppym 13/12/23 00:40:50 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openswan-2.6.39-r1.ebuild |
5 |
Removed: openswan-2.6.39.ebuild |
6 |
Log: |
7 |
Add systemd service unit, bug 495066. |
8 |
|
9 |
(Portage version: 2.2.7/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0BBEEA1FEA4843A4) |
10 |
|
11 |
Revision Changes Path |
12 |
1.93 net-misc/openswan/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/ChangeLog?rev=1.93&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/ChangeLog?rev=1.93&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/ChangeLog?r1=1.92&r2=1.93 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v |
21 |
retrieving revision 1.92 |
22 |
retrieving revision 1.93 |
23 |
diff -u -r1.92 -r1.93 |
24 |
--- ChangeLog 28 Nov 2013 23:19:37 -0000 1.92 |
25 |
+++ ChangeLog 23 Dec 2013 00:40:49 -0000 1.93 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for net-misc/openswan |
28 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v 1.92 2013/11/28 23:19:37 floppym Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v 1.93 2013/12/23 00:40:49 floppym Exp $ |
31 |
+ |
32 |
+*openswan-2.6.39-r1 (23 Dec 2013) |
33 |
+ |
34 |
+ 23 Dec 2013; Mike Gilbert <floppym@g.o> +files/ipsec.service, |
35 |
+ +openswan-2.6.39-r1.ebuild, -openswan-2.6.39.ebuild: |
36 |
+ Add systemd service unit, bug 495066. |
37 |
|
38 |
28 Nov 2013; Mike Gilbert <floppym@g.o> openswan-2.6.38.ebuild, |
39 |
openswan-2.6.39.ebuild: |
40 |
|
41 |
|
42 |
|
43 |
1.1 net-misc/openswan/openswan-2.6.39-r1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/openswan-2.6.39-r1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/openswan-2.6.39-r1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: openswan-2.6.39-r1.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2013 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/openswan-2.6.39-r1.ebuild,v 1.1 2013/12/23 00:40:49 floppym Exp $ |
53 |
|
54 |
EAPI="4" |
55 |
|
56 |
inherit eutils linux-info systemd toolchain-funcs flag-o-matic |
57 |
|
58 |
DESCRIPTION="Open Source implementation of IPsec for the Linux operating system (was SuperFreeS/WAN)." |
59 |
HOMEPAGE="http://www.openswan.org/" |
60 |
SRC_URI="http://download.openswan.org/openswan/${P}.tar.gz" |
61 |
|
62 |
LICENSE="GPL-2 BSD-4 DES RSA" |
63 |
SLOT="0" |
64 |
KEYWORDS="amd64 ~ppc ~sparc x86" |
65 |
IUSE="caps curl ldap pam ssl extra-algorithms weak-algorithms nocrypto-algorithms ms-bad-proposal nss" |
66 |
|
67 |
RESTRICT="test" # requires user mode linux setup |
68 |
|
69 |
COMMON_DEPEND="!net-misc/strongswan |
70 |
dev-libs/gmp |
71 |
dev-lang/perl |
72 |
caps? ( sys-libs/libcap-ng ) |
73 |
curl? ( net-misc/curl ) |
74 |
ldap? ( net-nds/openldap ) |
75 |
nss? ( dev-libs/nss ) |
76 |
ssl? ( dev-libs/openssl )" |
77 |
DEPEND="${COMMON_DEPEND} |
78 |
virtual/linux-sources |
79 |
app-text/xmlto |
80 |
app-text/docbook-xml-dtd:4.1.2" # see bug 237132 |
81 |
RDEPEND="${COMMON_DEPEND} |
82 |
|| ( sys-apps/net-tools[old-output] <sys-apps/net-tools-1.60_p201111202031570500 ) |
83 |
virtual/logger |
84 |
sys-apps/iproute2" |
85 |
|
86 |
pkg_setup() { |
87 |
if use nocrypto-algorithms && ! use weak-algorithms; then |
88 |
ewarn "Enabling nocrypto-algorithms USE flag has no effect when" |
89 |
ewarn "weak-algorithms USE flag is disabled" |
90 |
fi |
91 |
|
92 |
linux-info_pkg_setup |
93 |
|
94 |
if kernel_is -ge 2 6; then |
95 |
einfo "This ebuild will set ${P} to use kernel native IPsec (KAME)." |
96 |
MYMAKE="programs" |
97 |
|
98 |
elif kernel_is 2 4; then |
99 |
if ! [[ -d "${KERNEL_DIR}/net/ipsec" ]]; then |
100 |
eerror "You need to have an IPsec enabled 2.4.x kernel." |
101 |
eerror "Ensure you have one running and make a symlink to it in /usr/src/linux" |
102 |
die |
103 |
fi |
104 |
|
105 |
einfo "Using patched-in IPsec code for kernel 2.4" |
106 |
einfo "Your kernel only supports KLIPS for kernel level IPsec." |
107 |
MYMAKE="confcheck programs" |
108 |
|
109 |
else |
110 |
die "Unsupported kernel version" |
111 |
fi |
112 |
|
113 |
# most code is OK, but programs/pluto code breaks strict aliasing |
114 |
append-cflags -fno-strict-aliasing |
115 |
} |
116 |
|
117 |
src_prepare() { |
118 |
epatch "${FILESDIR}"/${P}-gentoo.patch |
119 |
use ms-bad-proposal && epatch "${FILESDIR}"/${PN}-${PV%.*}-allow-ms-bad-proposal.patch |
120 |
|
121 |
find . -type f -regex '.*[.]\([1-8]\|html\|xml\)' -exec sed -i \ |
122 |
-e s:/usr/local:/usr:g '{}' \; || |
123 |
die "failed to replace text in docs" |
124 |
} |
125 |
|
126 |
usetf() { usex $1 true false ; } |
127 |
get_make_options() { |
128 |
make_options=( |
129 |
KERNELSRC="${KERNEL_DIR}" |
130 |
FINALEXAMPLECONFDIR=/usr/share/doc/${PF} |
131 |
INC_RCDEFAULT=/etc/init.d |
132 |
INC_USRLOCAL=/usr |
133 |
INC_MANDIR=share/man |
134 |
FINALDOCDIR=/usr/share/doc/${PF}/html |
135 |
FINALLIBDIR=/usr/$(get_libdir)/ipsec |
136 |
DESTDIR="${D}" |
137 |
USERCOMPILE="${CFLAGS}" |
138 |
USERLINK="-Wl,-z,relro ${LDFLAGS}" |
139 |
USE_LIBCAP_NG=$(usetf caps) |
140 |
USE_LIBCURL=$(usetf curl) |
141 |
USE_LDAP=$(usetf ldap) |
142 |
USE_XAUTH=true |
143 |
USE_XAUTHPAM=$(usetf pam) |
144 |
USE_LIBNSS=$(usetf nss) |
145 |
HAVE_OPENSSL=$(usetf ssl) |
146 |
USE_EXTRACRYPTO=$(usetf extra-algorithms) |
147 |
USE_WEAKSTUFF=$(usetf weak-algorithms) |
148 |
) |
149 |
|
150 |
if use weak-algorithms && use nocrypto-algorithms ; then |
151 |
make_options+=( USE_NOCRYPTO=true ) |
152 |
fi |
153 |
|
154 |
make_options+=( USE_LWRES=false ) # needs bind9 with lwres support |
155 |
if use curl || use ldap || use pam; then |
156 |
make_options+=( HAVE_THREADS=true ) |
157 |
else |
158 |
make_options+=( HAVE_THREADS=false ) |
159 |
fi |
160 |
} |
161 |
|
162 |
src_compile() { |
163 |
tc-export AR CC |
164 |
local make_options; get_make_options |
165 |
emake "${make_options[@]}" ${MYMAKE} |
166 |
} |
167 |
|
168 |
src_install() { |
169 |
local make_options; get_make_options |
170 |
emake "${make_options[@]}" install |
171 |
|
172 |
dodoc CHANGES README |
173 |
dodoc docs/{KNOWN_BUGS*,RELEASE-NOTES*,PATENTS*,debugging*} |
174 |
docinto quickstarts |
175 |
dodoc docs/quickstarts/* |
176 |
|
177 |
insinto /usr/share/doc/${PF} |
178 |
doins -r contrib |
179 |
docompress -x /usr/share/doc/${PF}/contrib |
180 |
|
181 |
newinitd "${FILESDIR}"/ipsec-initd ipsec |
182 |
systemd_dounit "${FILESDIR}"/ipsec.service |
183 |
|
184 |
# We don't need to install /var/run/pluto. |
185 |
rm -rf "${D}var" || die |
186 |
} |
187 |
|
188 |
pkg_preinst() { |
189 |
if has_version "<net-misc/openswan-2.6.14" && pushd "${ROOT}etc/ipsec"; then |
190 |
ewarn "Following files and directories were moved from '${ROOT}etc/ipsec' to '${ROOT}etc':" |
191 |
local i err=0 |
192 |
if [ -h "../ipsec.d" ]; then |
193 |
rm "../ipsec.d" || die "failed to remove ../ipsec.d symlink" |
194 |
fi |
195 |
for i in *; do |
196 |
if [ -e "../$i" ]; then |
197 |
eerror " $i NOT MOVED, ../$i already exists!" |
198 |
err=1 |
199 |
elif [ -d "$i" ]; then |
200 |
mv "$i" .. || die "failed to move $i directory" |
201 |
ewarn " directory $i" |
202 |
elif [ -f "$i" ]; then |
203 |
sed -i -e 's:/etc/ipsec/:/etc/:g' "$i" && \ |
204 |
mv "$i" .. && ewarn " file $i" || \ |
205 |
die "failed to move $i file" |
206 |
else |
207 |
eerror " $i NOT MOVED, it is not a file nor a directory!" |
208 |
err=1 |
209 |
fi |
210 |
done |
211 |
popd |
212 |
if [ $err -eq 0 ]; then |
213 |
rmdir "${ROOT}etc/ipsec" || eerror "Failed to remove ${ROOT}etc/ipsec" |
214 |
else |
215 |
ewarn "${ROOT}etc/ipsec is not empty, you will have to remove it yourself" |
216 |
fi |
217 |
fi |
218 |
} |
219 |
|
220 |
pkg_postinst() { |
221 |
if kernel_is -ge 2 6; then |
222 |
CONFIG_CHECK="~NET_KEY ~INET_XFRM_MODE_TRANSPORT ~INET_XFRM_MODE_TUNNEL ~INET_AH ~INET_ESP ~INET_IPCOMP" |
223 |
WARNING_INET_AH="CONFIG_INET_AH:\tmissing IPsec AH support (needed if you want only authentication)" |
224 |
WARNING_INET_ESP="CONFIG_INET_ESP:\tmissing IPsec ESP support (needed if you want authentication and encryption)" |
225 |
WARNING_INET_IPCOMP="CONFIG_INET_IPCOMP:\tmissing IPsec Payload Compression (required for compress=yes)" |
226 |
check_extra_config |
227 |
fi |
228 |
} |