Gentoo Archives: gentoo-commits

From: Dirkjan Ochtman <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/openvpn/
Date: Sat, 26 Dec 2015 10:48:04
Message-Id: 1451126858.60d570a6d4d88cbb9a4f5c91ade521d292ad6d4b.djc@gentoo
1 commit: 60d570a6d4d88cbb9a4f5c91ade521d292ad6d4b
2 Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 26 10:47:06 2015 +0000
4 Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 10:47:38 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60d570a6
7
8 net-misc/openvpn: version bump to 2.3.9
9
10 net-misc/openvpn/Manifest | 1 +
11 net-misc/openvpn/openvpn-2.3.9.ebuild | 132 ++++++++++++++++++++++++++++++++++
12 2 files changed, 133 insertions(+)
13
14 diff --git a/net-misc/openvpn/Manifest b/net-misc/openvpn/Manifest
15 index a1620d2..8f37fed 100644
16 --- a/net-misc/openvpn/Manifest
17 +++ b/net-misc/openvpn/Manifest
18 @@ -1 +1,2 @@
19 DIST openvpn-2.3.8.tar.gz 1214843 SHA256 532435eff61c14b44a583f27b72f93e7864e96c95fe51134ec0ad4b1b1107c51 SHA512 b619283d87eea2e47a2f0dfdbf0ffd1d10388fbdaadb33b43c7a2743748a4814f869fad6215d32fab156664d554ae94af456e7bf496890c68e6729b153d76db9 WHIRLPOOL 4868c735ca5e65b34f477457ea38eb6db45fae80563490d1e39ece9bf29b13976dd82d50d054da70c4ee146cb2e88e847bafc3f7ff47112d4494fa0f408d65d0
20 +DIST openvpn-2.3.9.tar.gz 1222797 SHA256 2c12fe9ea641ac1291e70322cc500641c84e5903dd4f40bf2eda7e9f209b2f9c SHA512 597ad93caf5e4489bfdc78413756af516cad88679460ebadbef91358c6ca505dd0d5c3bb508b463fd34008be80d37f464271db0beec8439619510d7cf3b3b000 WHIRLPOOL 81e06b9d27f8443a7e1ceb9037f4f84521e97e50805e134fa773219768f8e5af8d775f515a4a90f0450ea01ce90eab48e04f3d027e7be8e796388af26e057752
21
22 diff --git a/net-misc/openvpn/openvpn-2.3.9.ebuild b/net-misc/openvpn/openvpn-2.3.9.ebuild
23 new file mode 100644
24 index 0000000..7a2c3fa
25 --- /dev/null
26 +++ b/net-misc/openvpn/openvpn-2.3.9.ebuild
27 @@ -0,0 +1,132 @@
28 +# Copyright 1999-2015 Gentoo Foundation
29 +# Distributed under the terms of the GNU General Public License v2
30 +# $Id$
31 +
32 +EAPI=5
33 +
34 +inherit multilib flag-o-matic user systemd
35 +
36 +DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
37 +SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
38 +HOMEPAGE="http://openvpn.net/"
39 +
40 +LICENSE="GPL-2"
41 +SLOT="0"
42 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
43 +IUSE="examples down-root iproute2 libressl +lzo pam pkcs11 +plugins polarssl selinux socks +ssl static systemd userland_BSD"
44 +
45 +REQUIRED_USE="static? ( !plugins !pkcs11 )
46 + polarssl? ( ssl !libressl )
47 + pkcs11? ( ssl )
48 + !plugins? ( !pam !down-root )"
49 +
50 +DEPEND="
51 + kernel_linux? (
52 + iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
53 + )
54 + pam? ( virtual/pam )
55 + ssl? (
56 + !polarssl? (
57 + !libressl? ( >=dev-libs/openssl-0.9.7:* )
58 + libressl? ( dev-libs/libressl )
59 + )
60 + polarssl? ( >=net-libs/polarssl-1.2.10 )
61 + )
62 + lzo? ( >=dev-libs/lzo-1.07 )
63 + pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
64 + systemd? ( sys-apps/systemd )"
65 +RDEPEND="${DEPEND}
66 + selinux? ( sec-policy/selinux-openvpn )
67 +"
68 +
69 +src_configure() {
70 + use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
71 + local myconf
72 + use polarssl && myconf="--with-crypto-library=polarssl"
73 + econf \
74 + ${myconf} \
75 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
76 + --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
77 + $(use_enable ssl) \
78 + $(use_enable ssl crypto) \
79 + $(use_enable lzo) \
80 + $(use_enable pkcs11) \
81 + $(use_enable plugins) \
82 + $(use_enable iproute2) \
83 + $(use_enable socks) \
84 + $(use_enable pam plugin-auth-pam) \
85 + $(use_enable down-root plugin-down-root) \
86 + $(use_enable systemd)
87 +}
88 +
89 +src_install() {
90 + default
91 + find "${ED}/usr" -name '*.la' -delete
92 + # install documentation
93 + dodoc AUTHORS ChangeLog PORTS README README.IPv6
94 +
95 + # Install some helper scripts
96 + keepdir /etc/openvpn
97 + exeinto /etc/openvpn
98 + doexe "${FILESDIR}/up.sh"
99 + doexe "${FILESDIR}/down.sh"
100 +
101 + # Install the init script and config file
102 + newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
103 + newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
104 +
105 + # install examples, controlled by the respective useflag
106 + if use examples ; then
107 + # dodoc does not supportly support directory traversal, #15193
108 + insinto /usr/share/doc/${PF}/examples
109 + doins -r sample contrib
110 + fi
111 +
112 + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
113 + systemd_newunit distro/systemd/openvpn-client@.service openvpn-client@.service
114 + systemd_newunit distro/systemd/openvpn-server@.service openvpn-server@.service
115 +}
116 +
117 +pkg_postinst() {
118 + # Add openvpn user so openvpn servers can drop privs
119 + # Clients should run as root so they can change ip addresses,
120 + # dns information and other such things.
121 + enewgroup openvpn
122 + enewuser openvpn "" "" "" openvpn
123 +
124 + if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
125 + ewarn "WARNING: The openvpn init script has changed"
126 + ewarn ""
127 + fi
128 +
129 + elog "The openvpn init script expects to find the configuration file"
130 + elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
131 + elog ""
132 + elog "To create more VPNs, simply create a new .conf file for it and"
133 + elog "then create a symlink to the openvpn init script from a link called"
134 + elog "openvpn.newconfname - like so"
135 + elog " cd /etc/openvpn"
136 + elog " ${EDITOR##*/} foo.conf"
137 + elog " cd /etc/init.d"
138 + elog " ln -s openvpn openvpn.foo"
139 + elog ""
140 + elog "You can then treat openvpn.foo as any other service, so you can"
141 + elog "stop one vpn and start another if you need to."
142 +
143 + if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
144 + ewarn ""
145 + ewarn "WARNING: If you use the remote keyword then you are deemed to be"
146 + ewarn "a client by our init script and as such we force up,down scripts."
147 + ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
148 + ewarn "can move your scripts to."
149 + fi
150 +
151 + if use plugins ; then
152 + einfo ""
153 + einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
154 + fi
155 +
156 + einfo ""
157 + einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
158 + einfo "They can now be emerged via app-crypt/easy-rsa."
159 +}