Gentoo Archives: gentoo-commits

From: "Alin Nastac (mrness)" <mrness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dialup/ppp: ChangeLog ppp-2.4.4-r16.ebuild
Date: Wed, 25 Jun 2008 21:12:43
Message-Id: E1KBcI9-0003kg-2j@stork.gentoo.org
1 mrness 08/06/25 21:12:37
2
3 Modified: ChangeLog
4 Added: ppp-2.4.4-r16.ebuild
5 Log:
6 Patch passwordfd plugin to read password as soon as it gets the fd number - openrc use stdin for that, fd that could be closed by pppd before plugin reads the password (#209294).
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.217 net-dialup/ppp/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/ppp/ChangeLog?rev=1.217&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/ppp/ChangeLog?rev=1.217&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/ppp/ChangeLog?r1=1.216&r2=1.217
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v
19 retrieving revision 1.216
20 retrieving revision 1.217
21 diff -u -r1.216 -r1.217
22 --- ChangeLog 21 Jun 2008 19:58:27 -0000 1.216
23 +++ ChangeLog 25 Jun 2008 21:12:36 -0000 1.217
24 @@ -1,6 +1,13 @@
25 # ChangeLog for net-dialup/ppp
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.216 2008/06/21 19:58:27 corsair Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.217 2008/06/25 21:12:36 mrness Exp $
29 +
30 +*ppp-2.4.4-r16 (25 Jun 2008)
31 +
32 + 25 Jun 2008; Alin Năstac <mrness@g.o> +ppp-2.4.4-r16.ebuild:
33 + Patch passwordfd plugin to read password as soon as it gets the fd number -
34 + openrc use stdin for that, fd that could be closed by pppd before plugin
35 + reads the password (#209294).
36
37 21 Jun 2008; Markus Rothe <corsair@g.o> ppp-2.4.4-r15.ebuild:
38 Stable on ppc64; bug #227183
39
40
41
42 1.1 net-dialup/ppp/ppp-2.4.4-r16.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/ppp/ppp-2.4.4-r16.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/ppp/ppp-2.4.4-r16.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ppp-2.4.4-r16.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ppp-2.4.4-r16.ebuild,v 1.1 2008/06/25 21:12:36 mrness Exp $
52
53 inherit eutils flag-o-matic toolchain-funcs linux-info pam
54
55 DESCRIPTION="Point-to-Point Protocol (PPP)"
56 HOMEPAGE="http://www.samba.org/ppp"
57 SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
58 http://dev.gentoo.org/~mrness/distfiles/${P}-gentoo-20080625.tar.gz
59 dhcp? ( http://www.netservers.co.uk/gpl/ppp-dhcpc.tgz )"
60
61 LICENSE="BSD GPL-2"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
64 IUSE="activefilter atm dhcp eap-tls gtk ipv6 mppe-mppc pam radius"
65
66 DEPEND="activefilter? ( >=virtual/libpcap-0.9.4 )
67 atm? ( net-dialup/linux-atm )
68 pam? ( virtual/pam )
69 gtk? ( >=x11-libs/gtk+-2.8 )
70 eap-tls? ( net-misc/curl >=dev-libs/openssl-0.9.7 )"
71
72 pkg_setup() {
73 if use mppe-mppc; then
74 echo
75 ewarn "The mppe-mppc flag overwrites the pppd native MPPE support with MPPE-MPPC"
76 ewarn "patch developed by Jan Dubiec."
77 ewarn "The resulted pppd will work only with patched kernels with version <= 2.6.14."
78 ewarn "You could obtain the kernel patch from MPPE-MPPC homepage:"
79 ewarn " http://mppe-mppc.alphacron.de/"
80 ewarn "CAUTION: MPPC is a U.S. patented algorithm!"
81 ewarn "Ask yourself if you really need it and, if you do, consult your lawyer first."
82 ebeep
83 fi
84 }
85
86 src_unpack() {
87 unpack ${A}
88 cd "${S}"
89
90 epatch "${WORKDIR}/patch/make-vars.patch"
91 epatch "${WORKDIR}/patch/mpls.patch"
92 epatch "${WORKDIR}/patch/killaddr-smarter.patch"
93 epatch "${WORKDIR}/patch/wait-children.patch"
94 epatch "${WORKDIR}/patch/maxoctets-2Glimit.patch"
95 epatch "${WORKDIR}/patch/defaultgateway.patch"
96 epatch "${WORKDIR}/patch/mschapv2-initialize-response.patch"
97 epatch "${WORKDIR}/patch/linkpidfile.patch"
98 epatch "${WORKDIR}/patch/qa-fixes.patch"
99 epatch "${WORKDIR}/patch/kill-pg.patch"
100 epatch "${WORKDIR}/patch/auth-fail.patch"
101 epatch "${WORKDIR}/patch/defaultmetric.patch"
102 epatch "${WORKDIR}/patch/dev-ppp.patch"
103 epatch "${WORKDIR}/patch/gtk2.patch"
104 epatch "${WORKDIR}/patch/pppoe-lcp-timeout.patch"
105 epatch "${WORKDIR}/patch/passwordfd-read-early.patch"
106
107 use eap-tls && {
108 # see http://eaptls.spe.net/index.html for more info
109 einfo "Enabling EAP-TLS support"
110 epatch "${WORKDIR}/patch/eaptls-0.7-gentoo.patch"
111 use mppe-mppc || epatch "${WORKDIR}/patch/eaptls-mppe-0.7.patch"
112 }
113
114 use mppe-mppc && {
115 einfo "Enabling MPPE-MPPC support"
116 epatch "${WORKDIR}/patch/mppe-mppc-1.1.patch"
117 use eap-tls && epatch "${WORKDIR}/patch/eaptls-mppe-0.7-with-mppc.patch"
118 }
119
120 use atm && {
121 einfo "Enabling PPPoATM support"
122 sed -i "s/^#HAVE_LIBATM=yes/HAVE_LIBATM=yes/" pppd/plugins/pppoatm/Makefile.linux
123 }
124
125 use activefilter || {
126 einfo "Disabling active filter"
127 sed -i "s/^FILTER=y/#FILTER=y/" pppd/Makefile.linux
128 }
129
130 use pam && {
131 einfo "Enabling PAM"
132 sed -i "s/^#USE_PAM=y/USE_PAM=y/" pppd/Makefile.linux
133 }
134
135 use ipv6 && {
136 einfo "Enabling IPv6"
137 sed -i "s/#HAVE_INET6/HAVE_INET6/" pppd/Makefile.linux
138 }
139
140 einfo "Enabling CBCP"
141 sed -i "s/^#CBCP=y/CBCP=y/" pppd/Makefile.linux
142
143 use dhcp && {
144 # copy the ppp-dhcp plugin files
145 einfo "Copying ppp-dhcp plugin files..."
146 tar -xzf "${DISTDIR}/ppp-dhcpc.tgz" -C pppd/plugins/ \
147 && sed -i -e 's/SUBDIRS := rp-pppoe/SUBDIRS := rp-pppoe dhcp/' pppd/plugins/Makefile.linux \
148 || die "ppp-dhcp plugin addition failed"
149 epatch "${WORKDIR}/patch/dhcp-make-vars.patch"
150 epatch "${WORKDIR}/patch/dhcp-sys_error_to_strerror.patch"
151 }
152
153 # Set correct libdir
154 sed -i -e "s:/lib/pppd:/$(get_libdir)/pppd:" \
155 pppd/{pathnames.h,pppd.8}
156
157 use radius && {
158 #set the right paths in radiusclient.conf
159 sed -i -e "s:/usr/local/etc:/etc:" \
160 -e "s:/usr/local/sbin:/usr/sbin:" pppd/plugins/radius/etc/radiusclient.conf
161 #set config dir to /etc/ppp/radius
162 sed -i -e "s:/etc/radiusclient:/etc/ppp/radius:g" \
163 pppd/plugins/radius/{*.8,*.c,*.h} \
164 pppd/plugins/radius/etc/*
165 }
166 }
167
168 src_compile() {
169 export CC="$(tc-getCC)"
170 export AR="$(tc-getAR)"
171 append-ldflags -Wl,--allow-shlib-undefined # otherwise linking plugins might fail with undef errors (#210837)
172 econf || die "configuration failed"
173 emake COPTS="${CFLAGS} -D_GNU_SOURCE" || die "compile failed"
174
175 #build pppgetpass
176 cd contrib/pppgetpass
177 if use gtk; then
178 emake -f Makefile.linux || die "failed to build pppgetpass"
179 else
180 emake pppgetpass.vt || die "failed to build pppgetpass"
181 fi
182 }
183
184 pkg_preinst() {
185 has_version "<${CATEGORY}/${PN}-2.4.3-r5"
186 previous_less_than_2_4_3_r5=$?
187
188 if use radius && [ -d "${ROOT}/etc/radiusclient" ] && \
189 [[ $previous_less_than_2_4_3_r5 = 0 ]] ; then
190 ebegin "Copy /etc/radiusclient to /etc/ppp/radius"
191 cp -pPR "${ROOT}/etc/radiusclient" "${ROOT}/etc/ppp/radius"
192 eend $?
193 fi
194 }
195
196 src_install() {
197 local i
198 for i in chat pppd pppdump pppstats
199 do
200 doman ${i}/${i}.8
201 dosbin ${i}/${i}
202 done
203 fperms u+s-w /usr/sbin/pppd
204
205 # Install pppd header files
206 pushd pppd && \
207 make INSTROOT="${D}" install-devel && \
208 popd || die "make install-devel failed"
209
210 dosbin pppd/plugins/rp-pppoe/pppoe-discovery
211
212 dodir /etc/ppp/peers
213 insinto /etc/ppp
214 insopts -m0600
215 newins etc.ppp/pap-secrets pap-secrets.example
216 newins etc.ppp/chap-secrets chap-secrets.example
217
218 insopts -m0644
219 doins etc.ppp/options
220
221 exeinto /etc/ppp
222 for i in ip-up ip-down ; do
223 doexe "${WORKDIR}/scripts/${i}"
224 insinto /etc/ppp/${i}.d
225 use ipv6 && dosym ${i} /etc/ppp/${i/ip/ipv6}
226 doins "${WORKDIR}/scripts/${i}.d"/*
227 done
228
229 pamd_mimic_system ppp auth account session
230
231 local PLUGINS_DIR=/usr/$(get_libdir)/pppd/$(awk -F '"' '/VERSION/ {print $2}' pppd/patchlevel.h)
232 #closing " for syntax coloring
233 insinto "${PLUGINS_DIR}"
234 insopts -m0755
235 doins pppd/plugins/minconn.so || die "minconn.so not build"
236 doins pppd/plugins/passprompt.so || die "passprompt.so not build"
237 doins pppd/plugins/passwordfd.so || die "passwordfd.so not build"
238 doins pppd/plugins/winbind.so || die "winbind.so not build"
239 doins pppd/plugins/rp-pppoe/rp-pppoe.so || die "rp-pppoe.so not build"
240 if use atm; then
241 doins pppd/plugins/pppoatm/pppoatm.so || die "pppoatm.so not build"
242 fi
243 if use dhcp; then
244 doins pppd/plugins/dhcp/dhcpc.so || die "dhcpc.so not build"
245 fi
246 if use radius; then
247 doins pppd/plugins/radius/radius.so || die "radius.so not build"
248 doins pppd/plugins/radius/radattr.so || die "radattr.so not build"
249 doins pppd/plugins/radius/radrealms.so || die "radrealms.so not build"
250
251 #Copy radiusclient configuration files (#92878)
252 insinto /etc/ppp/radius
253 insopts -m0644
254 doins pppd/plugins/radius/etc/{dictionary*,issue,port-id-map,radiusclient.conf,realms,servers}
255
256 doman pppd/plugins/radius/pppd-radius.8
257 doman pppd/plugins/radius/pppd-radattr.8
258 fi
259
260 insinto /etc/modprobe.d
261 insopts -m0644
262 newins "${FILESDIR}/modules.ppp" ppp
263 if use mppe-mppc; then
264 sed -i -e 's/ppp_mppe/ppp_mppe_mppc/' "${D}/etc/modprobe.d/ppp"
265 fi
266
267 dodoc PLUGINS README* SETUP Changes-2.3 FAQ
268 dodoc "${FILESDIR}/README.mpls"
269
270 dosbin scripts/pon
271 dosbin scripts/poff
272 dosbin scripts/plog
273 doman scripts/pon.1
274
275 # Adding misc. specialized scripts to doc dir
276 insinto /usr/share/doc/${PF}/scripts/chatchat
277 doins scripts/chatchat/*
278 insinto /usr/share/doc/${PF}/scripts
279 doins scripts/*
280
281 if use gtk; then
282 dosbin contrib/pppgetpass/{pppgetpass.vt,pppgetpass.gtk}
283 newsbin contrib/pppgetpass/pppgetpass.sh pppgetpass
284 else
285 newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass
286 fi
287 doman contrib/pppgetpass/pppgetpass.8
288 }
289
290 pkg_postinst() {
291 if get_version ; then
292 echo
293 ewarn "If the following test report contains a missing kernel configuration option that you need,"
294 ewarn "you should reconfigure and rebuild your kernel before running pppd."
295 CONFIG_CHECK="~PPP ~PPP_ASYNC ~PPP_SYNC_TTY"
296 local ERROR_PPP="CONFIG_PPP:\t missing PPP support (REQUIRED)"
297 local ERROR_PPP_ASYNC="CONFIG_PPP_ASYNC:\t missing asynchronous serial line discipline (optional, but highly recommended)"
298 local WARNING_PPP_SYNC_TTY="CONFIG_PPP_SYNC_TTY:\t missing synchronous serial line discipline (optional; used by 'sync' pppd option)"
299 if use activefilter ; then
300 CONFIG_CHECK="${CONFIG_CHECK} ~PPP_FILTER"
301 local ERROR_PPP_FILTER="CONFIG_PPP_FILTER:\t missing PPP filtering support (REQUIRED)"
302 fi
303 CONFIG_CHECK="${CONFIG_CHECK} ~PPP_DEFLATE ~PPP_BSDCOMP"
304 local ERROR_PPP_DEFLATE="CONFIG_PPP_DEFLATE:\t missing Deflate compression (optional, but highly recommended)"
305 local ERROR_PPP_BSDCOMP="CONFIG_PPP_BSDCOMP:\t missing BSD-Compress compression (optional, but highly recommended)"
306 if use mppe-mppc ; then
307 CONFIG_CHECK="${CONFIG_CHECK} ~PPP_MPPE_MPPC"
308 local WARNING_PPP_MPPE_MPPC="CONFIG_PPP_MPPE_MPPC:\t missing MPPE/MPPC encryption/compression (optional, mostly used by PPTP links)"
309 else
310 CONFIG_CHECK="${CONFIG_CHECK} ~PPP_MPPE"
311 local WARNING_PPP_MPPE="CONFIG_PPP_MPPE:\t missing MPPE encryption (optional, mostly used by PPTP links)"
312 fi
313 CONFIG_CHECK="${CONFIG_CHECK} ~PPPOE"
314 local WARNING_PPPOE="CONFIG_PPPOE:\t missing PPPoE support (optional needed by rp-pppoe plugin)"
315 if use atm ; then
316 CONFIG_CHECK="${CONFIG_CHECK} ~PPPOATM"
317 local WARNING_PPPOATM="CONFIG_PPPOATM:\t missing PPPoA support (optional, needed by pppoatm plugin)"
318 fi
319 check_extra_config
320 fi
321
322 if [ ! -e "${ROOT}/dev/.devfsd" ] && [ ! -e "${ROOT}/dev/.udev" ] && [ ! -e "${ROOT}/dev/ppp" ]; then
323 mknod "${ROOT}/dev/ppp" c 108 0
324 fi
325 if [ "$ROOT" = "/" ]; then
326 [ -x /sbin/update-modules ] && /sbin/update-modules || /sbin/modules-update
327 fi
328
329 # create *-secrets files if not exists
330 [ -f "${ROOT}/etc/ppp/pap-secrets" ] || \
331 cp -pP "${ROOT}/etc/ppp/pap-secrets.example" "${ROOT}/etc/ppp/pap-secrets"
332 [ -f "${ROOT}/etc/ppp/chap-secrets" ] || \
333 cp -pP "${ROOT}/etc/ppp/chap-secrets.example" "${ROOT}/etc/ppp/chap-secrets"
334
335 # lib name has changed
336 sed -i -e "s:^pppoe.so:rp-pppoe.so:" "${ROOT}/etc/ppp/options"
337
338 if use radius && [[ $previous_less_than_2_4_3_r5 = 0 ]] ; then
339 echo
340 ewarn "As of ${PN}-2.4.3-r5, the RADIUS configuration files have moved from"
341 ewarn " /etc/radiusclient to /etc/ppp/radius."
342 einfo "For your convenience, radiusclient directory was copied to the new location."
343 fi
344
345 echo
346 elog "Pon, poff and plog scripts have been supplied for experienced users."
347 elog "Users needing particular scripts (ssh,rsh,etc.) should check out the"
348 elog "/usr/share/doc/${PF}/scripts directory."
349
350 # move the old user-defined files into ip-{up,down}.d directories
351 local i
352 for i in ip-up ip-down; do
353 if [ -f "${ROOT}"/etc/ppp/${i}.local ]; then
354 mv /etc/ppp/${i}.local /etc/ppp/${i}.d/90-local.sh && \
355 einfo "/etc/ppp/${i}.local has been moved to /etc/ppp/${i}.d/90-local.sh"
356 fi
357 done
358 }
359
360
361
362 --
363 gentoo-commits@l.g.o mailing list