Gentoo Archives: gentoo-commits

From: "Dirkjan Ochtman (djc)" <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.2.0.ebuild
Date: Sat, 30 Apr 2011 21:03:03
Message-Id: 20110430210253.4F2BC20054@flycatcher.gentoo.org
1 djc 11/04/30 21:02:53
2
3 Modified: ChangeLog
4 Added: openvpn-2.2.0.ebuild
5 Log:
6 Version bump openvpn to 2.2.0, add ipv6 payload support (bug 335563).
7
8 (Portage version: 2.1.9.46/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.213 net-misc/openvpn/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.213&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.213&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/ChangeLog?r1=1.212&r2=1.213
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v
20 retrieving revision 1.212
21 retrieving revision 1.213
22 diff -u -r1.212 -r1.213
23 --- ChangeLog 21 Mar 2011 08:22:40 -0000 1.212
24 +++ ChangeLog 30 Apr 2011 21:02:53 -0000 1.213
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-misc/openvpn
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.212 2011/03/21 08:22:40 xarthisius Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.213 2011/04/30 21:02:53 djc Exp $
30 +
31 +*openvpn-2.2.0 (30 Apr 2011)
32 +
33 + 30 Apr 2011; Dirkjan Ochtman <djc@g.o> +openvpn-2.2.0.ebuild:
34 + Version bump to 2.2.0, add ipv6 payload support (bug 335563).
35
36 21 Mar 2011; Kacper Kowalik <xarthisius@g.o> openvpn-2.1.4.ebuild:
37 ppc/ppc64 stable wrt #354661
38
39
40
41 1.1 net-misc/openvpn/openvpn-2.2.0.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/openvpn-2.2.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/openvpn-2.2.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openvpn-2.2.0.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/openvpn-2.2.0.ebuild,v 1.1 2011/04/30 21:02:53 djc Exp $
51
52 EAPI=2
53
54 inherit eutils multilib toolchain-funcs autotools flag-o-matic
55
56 IPV6_VERSION="2.2RC2-ipv6-20110424-2"
57 DESCRIPTION="OpenVPN is a robust and highly flexible tunneling application compatible with many OSes."
58 SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz
59 ipv6? (
60 http://www.greenie.net/ipv6/openvpn-${IPV6_VERSION}.patch.gz
61 )"
62 HOMEPAGE="http://openvpn.net/"
63
64 LICENSE="GPL-2"
65 SLOT="0"
66 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
67 IUSE="examples iproute2 ipv6 minimal pam passwordsave selinux ssl static pkcs11 userland_BSD"
68
69 DEPEND=">=dev-libs/lzo-1.07
70 kernel_linux? (
71 iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
72 )
73 !minimal? ( pam? ( virtual/pam ) )
74 selinux? ( sec-policy/selinux-openvpn )
75 ssl? ( >=dev-libs/openssl-0.9.6 )
76 pkcs11? ( >=dev-libs/pkcs11-helper-1.05 )"
77 RDEPEND="${DEPEND}"
78
79 src_prepare() {
80 epatch "${FILESDIR}/${PN}-2.1_rc20-pkcs11.patch"
81 use ipv6 && epatch "${WORKDIR}/${PN}-${IPV6_VERSION}.patch"
82 sed -i \
83 -e "s/gcc \${CC_FLAGS}/\${CC} \${CFLAGS} -Wall/" \
84 -e "s/-shared/-shared \${LDFLAGS}/" \
85 plugin/*/Makefile || die "sed failed"
86 if use ipv6; then
87 eautoreconf
88 fi
89 }
90
91 src_configure() {
92 # basic.h defines a type 'bool' that conflicts with the altivec
93 # keyword bool which has to be fixed upstream, see bugs #293840
94 # and #297854.
95 # For now, filter out -maltivec on ppc and append -mno-altivec, as
96 # -maltivec is enabled implicitly by -mcpu and similar flags.
97 (use ppc || use ppc64) && filter-flags -maltivec && append-flags -mno-altivec
98
99 local myconf=""
100
101 if use minimal ; then
102 myconf="${myconf} --disable-plugins"
103 myconf="${myconf} --disable-pkcs11"
104 else
105 myconf="$(use_enable pkcs11)"
106 fi
107
108 econf ${myconf} \
109 $(use_enable passwordsave password-save) \
110 $(use_enable ssl) \
111 $(use_enable ssl crypto) \
112 $(use_enable iproute2)
113 }
114
115 src_compile() {
116
117 if use static ; then
118 sed -i -e '/^LIBS/s/LIBS = /LIBS = -static /' Makefile || die "sed failed"
119 fi
120
121 emake || die "make failed"
122
123 if ! use minimal ; then
124 cd plugin
125 for i in *; do
126 [[ ${i} == "README" || ${i} == "examples" || ${i} == "defer" ]] && continue
127 [[ ${i} == "auth-pam" ]] && ! use pam && continue
128 einfo "Building ${i} plugin"
129 emake -C "${i}" CC=$(tc-getCC) || die "make failed"
130 done
131 cd ..
132 fi
133 }
134
135 src_install() {
136 emake DESTDIR="${D}" install || die "make install failed"
137
138 # install documentation
139 dodoc AUTHORS ChangeLog PORTS README
140 use eurephia && dodoc README.eurephia
141
142 # remove empty dir
143 rmdir "${D}/usr/share/doc/openvpn" || die "rmdir failed"
144 keepdir /etc/openvpn
145
146 # Install some helper scripts
147 exeinto /etc/openvpn
148 doexe "${FILESDIR}/up.sh" || die "doexe failed"
149 doexe "${FILESDIR}/down.sh" || die "doexe failed"
150
151 # Install the init script and config file
152 newinitd "${FILESDIR}/${PN}-2.1.init" openvpn || die "newinitd failed"
153 newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn || die "newconfd failed"
154
155 # install examples, controlled by the respective useflag
156 if use examples ; then
157 # dodoc does not supportly support directory traversal, #15193
158 insinto /usr/share/doc/${PF}/examples
159 doins -r sample-{config-files,keys,scripts} contrib
160 prepalldocs
161 fi
162
163 # Install plugins and easy-rsa
164 doenvd "${FILESDIR}/65openvpn" # config-protect easy-rsa
165 if ! use minimal ; then
166 cd easy-rsa/2.0
167 make install "DESTDIR=${D}/usr/share/${PN}/easy-rsa"
168 cd ../..
169
170 exeinto "/usr/$(get_libdir)/${PN}"
171 doexe plugin/*/*.so
172 fi
173 }
174
175 pkg_postinst() {
176 # Add openvpn user so openvpn servers can drop privs
177 # Clients should run as root so they can change ip addresses,
178 # dns information and other such things.
179 enewgroup openvpn
180 enewuser openvpn "" "" "" openvpn
181
182 if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
183 ewarn "WARNING: The openvpn init script has changed"
184 ewarn ""
185 fi
186
187 elog "The openvpn init script expects to find the configuration file"
188 elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
189 elog ""
190 elog "To create more VPNs, simply create a new .conf file for it and"
191 elog "then create a symlink to the openvpn init script from a link called"
192 elog "openvpn.newconfname - like so"
193 elog " cd /etc/openvpn"
194 elog " ${EDITOR##*/} foo.conf"
195 elog " cd /etc/init.d"
196 elog " ln -s openvpn openvpn.foo"
197 elog ""
198 elog "You can then treat openvpn.foo as any other service, so you can"
199 elog "stop one vpn and start another if you need to."
200
201 if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
202 ewarn ""
203 ewarn "WARNING: If you use the remote keyword then you are deemed to be"
204 ewarn "a client by our init script and as such we force up,down scripts."
205 ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
206 ewarn "can move your scripts to."
207 fi
208
209 if ! use minimal ; then
210 einfo ""
211 einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
212 fi
213
214 if use ipv6 ; then
215 einfo ""
216 einfo "This build contains IPv6-Patch from JuanJo Ciarlante."
217 einfo "For more information please visit:"
218 einfo "http://github.com/jjo/openvpn-ipv6"
219 fi
220
221 if use eurephia ; then
222 einfo ""
223 einfo "This build contains eurephia patch."
224 einfo "For more information please visit:"
225 einfo "http://www.eurephia.net/"
226 fi
227 }