Gentoo Archives: gentoo-commits

From: "Alon Bar-Lev (alonbl)" <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1_rc7-r2.ebuild openvpn-2.1_rc7-r1.ebuild
Date: Fri, 18 Apr 2008 06:22:47
Message-Id: E1Jmjzg-0002vX-RC@stork.gentoo.org
1 alonbl 08/04/18 06:22:44
2
3 Modified: ChangeLog
4 Added: openvpn-2.1_rc7-r2.ebuild
5 Removed: openvpn-2.1_rc7-r1.ebuild
6 Log:
7 Fix tun (again), bug#218129, thanks to Sigmatador
8 (Portage version: 2.1.5_rc4)
9
10 Revision Changes Path
11 1.133 net-misc/openvpn/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.133&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.133&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/ChangeLog?r1=1.132&r2=1.133
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v
20 retrieving revision 1.132
21 retrieving revision 1.133
22 diff -u -r1.132 -r1.133
23 --- ChangeLog 16 Apr 2008 16:36:38 -0000 1.132
24 +++ ChangeLog 18 Apr 2008 06:22:44 -0000 1.133
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-misc/openvpn
27 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.132 2008/04/16 16:36:38 alonbl Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.133 2008/04/18 06:22:44 alonbl Exp $
30 +
31 +*openvpn-2.1_rc7-r2 (18 Apr 2008)
32 +
33 + 18 Apr 2008; Alon Bar-Lev <alonbl@g.o>
34 + files/openvpn-2.1_rc7-tap.patch, -openvpn-2.1_rc7-r1.ebuild,
35 + +openvpn-2.1_rc7-r2.ebuild:
36 + Fix tun (again), bug#218129, thanks to Sigmatador
37
38 *openvpn-2.1_rc7-r1 (16 Apr 2008)
39
40
41
42
43 1.1 net-misc/openvpn/openvpn-2.1_rc7-r2.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/openvpn-2.1_rc7-r2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/openvpn-2.1_rc7-r2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: openvpn-2.1_rc7-r2.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/openvpn-2.1_rc7-r2.ebuild,v 1.1 2008/04/18 06:22:44 alonbl Exp $
53
54 inherit eutils multilib
55
56 DESCRIPTION="OpenVPN is a robust and highly flexible tunneling application compatible with many OSes."
57 SRC_URI="http://openvpn.net/release/${P}.tar.gz"
58 HOMEPAGE="http://openvpn.net/"
59
60 LICENSE="GPL-2"
61 SLOT="0"
62 KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
63 IUSE="examples iproute2 minimal pam passwordsave selinux ssl static pkcs11 threads userland_BSD"
64
65 DEPEND=">=dev-libs/lzo-1.07
66 kernel_linux? (
67 iproute2? ( sys-apps/iproute2 ) !iproute2? ( sys-apps/net-tools )
68 )
69 !minimal? ( pam? ( virtual/pam ) )
70 selinux? ( sec-policy/selinux-openvpn )
71 ssl? ( >=dev-libs/openssl-0.9.6 )
72 pkcs11? ( >=dev-libs/pkcs11-helper-1.05 )"
73
74 pkg_setup() {
75 if use iproute2 ; then
76 if built_with_use sys-apps/iproute2 minimal ; then
77 eerror "iproute2 support requires that sys-apps/iproute2 was not"
78 eerror "built with the minimal USE flag"
79 die "iproute2 support not available"
80 fi
81 fi
82 }
83
84 src_unpack() {
85 unpack ${A}
86 cd "${S}"
87 epatch "${FILESDIR}/${P}-tap.patch"
88 }
89
90 src_compile() {
91 local myconf=""
92
93 if use minimal ; then
94 myconf="${myconf} --disable-plugins"
95 myconf="${myconf} --disable-pkcs11"
96 else
97 myconf="$(use_enable pkcs11)"
98 fi
99
100 econf ${myconf} \
101 $(use_enable passwordsave password-save) \
102 $(use_enable ssl) \
103 $(use_enable ssl crypto) \
104 $(use_enable threads pthread) \
105 $(use_enable iproute2) \
106 || die "configure failed"
107
108 use static && sed -i -e '/^LIBS/s/LIBS = /LIBS = -static /' Makefile
109
110 emake || die "make failed"
111
112 if ! use minimal ; then
113 cd plugin
114 for i in $( ls 2>/dev/null ); do
115 [[ ${i} == "README" || ${i} == "examples" ]] && continue
116 [[ ${i} == "auth-pam" ]] && ! use pam && continue
117 einfo "Building ${i} plugin"
118 cd "${i}"
119 emake || die "make failed"
120 cd ..
121 done
122 cd ..
123 fi
124 }
125
126 src_install() {
127 make DESTDIR="${D}" install || die "make install failed"
128
129 # install documentation
130 dodoc AUTHORS ChangeLog PORTS README
131
132 # Empty dir
133 dodir /etc/openvpn
134 keepdir /etc/openvpn
135
136 # Install some helper scripts
137 exeinto /etc/openvpn
138 doexe "${FILESDIR}/up.sh"
139 doexe "${FILESDIR}/down.sh"
140
141 # Install the init script and config file
142 newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
143 newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
144
145 # install examples, controlled by the respective useflag
146 if use examples ; then
147 # dodoc does not supportly support directory traversal, #15193
148 insinto /usr/share/doc/${PF}/examples
149 doins -r sample-{config-files,keys,scripts} contrib
150 prepalldocs
151 fi
152
153 # Install plugins and easy-rsa
154 if ! use minimal ; then
155 cd easy-rsa/2.0
156 make install "DESTDIR=${D}/usr/share/${PN}/easy-rsa"
157 cd ../..
158
159 exeinto "/usr/$(get_libdir)/${PN}"
160 doexe plugin/*/*.so
161 fi
162 }
163
164 pkg_postinst() {
165 # Add openvpn user so openvpn servers can drop privs
166 # Clients should run as root so they can change ip addresses,
167 # dns information and other such things.
168 enewgroup openvpn
169 enewuser openvpn "" "" "" openvpn
170
171 if [[ -n $(ls /etc/openvpn/*/local.conf 2>/dev/null) ]] ; then
172 ewarn "WARNING: The openvpn init script has changed"
173 ewarn ""
174 fi
175
176 einfo "The openvpn init script expects to find the configuration file"
177 einfo "openvpn.conf in /etc/openvpn along with any extra files it may need."
178 einfo ""
179 einfo "To create more VPNs, simply create a new .conf file for it and"
180 einfo "then create a symlink to the openvpn init script from a link called"
181 einfo "openvpn.newconfname - like so"
182 einfo " cd /etc/openvpn"
183 einfo " ${EDITOR##*/} foo.conf"
184 einfo " cd /etc/init.d"
185 einfo " ln -s openvpn openvpn.foo"
186 einfo ""
187 einfo "You can then treat openvpn.foo as any other service, so you can"
188 einfo "stop one vpn and start another if you need to."
189
190 if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
191 ewarn ""
192 ewarn "WARNING: If you use the remote keyword then you are deemed to be"
193 ewarn "a client by our init script and as such we force up,down scripts."
194 ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
195 ewarn "can move your scripts to."
196 fi
197
198 if ! use minimal ; then
199 einfo ""
200 einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
201 fi
202 }
203
204
205
206 --
207 gentoo-commits@l.g.o mailing list