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.5-r1.ebuild ppp-2.4.4-r24.ebuild
Date: Sat, 27 Nov 2010 10:07:50
Message-Id: 20101127100657.539C520051@flycatcher.gentoo.org
1 mrness 10/11/27 10:06:57
2
3 Modified: ChangeLog
4 Added: ppp-2.4.5-r1.ebuild
5 Removed: ppp-2.4.4-r24.ebuild
6 Log:
7 Fix PPPOE freeze when garbage packets are received iso PADO/PADS (#340267).
8 Add lcp-echo-adaptive option (#344273).
9 (Portage version: 2.1.8.3/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.266 net-dialup/ppp/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dialup/ppp/ChangeLog?rev=1.266&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dialup/ppp/ChangeLog?rev=1.266&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dialup/ppp/ChangeLog?r1=1.265&r2=1.266
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v
21 retrieving revision 1.265
22 retrieving revision 1.266
23 diff -u -r1.265 -r1.266
24 --- ChangeLog 2 Nov 2010 07:01:42 -0000 1.265
25 +++ ChangeLog 27 Nov 2010 10:06:57 -0000 1.266
26 @@ -1,6 +1,13 @@
27 # ChangeLog for net-dialup/ppp
28 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.265 2010/11/02 07:01:42 jer Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.266 2010/11/27 10:06:57 mrness Exp $
31 +
32 +*ppp-2.4.5-r1 (27 Nov 2010)
33 +
34 + 27 Nov 2010; Alin Năstac <mrness@g.o> -ppp-2.4.4-r24.ebuild,
35 + +ppp-2.4.5-r1.ebuild:
36 + Fix PPPOE freeze when garbage packets are received iso PADO/PADS
37 + (#340267). Add lcp-echo-adaptive option (#344273).
38
39 02 Nov 2010; Jeroen Roovers <jer@g.o> ppp-2.4.4-r25.ebuild:
40 Stable for PPC (bug #331611).
41
42
43
44 1.1 net-dialup/ppp/ppp-2.4.5-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dialup/ppp/ppp-2.4.5-r1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dialup/ppp/ppp-2.4.5-r1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: ppp-2.4.5-r1.ebuild
50 ===================================================================
51 # Copyright 1999-2010 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ppp-2.4.5-r1.ebuild,v 1.1 2010/11/27 10:06:57 mrness Exp $
54
55 EAPI="2"
56
57 inherit eutils toolchain-funcs linux-info pam
58
59 DESCRIPTION="Point-to-Point Protocol (PPP)"
60 HOMEPAGE="http://www.samba.org/ppp"
61 SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
62 mirror://gentoo/${P}-gentoo-20101127.tar.gz
63 dhcp? ( http://www.netservers.co.uk/gpl/ppp-dhcpc.tgz )"
64
65 LICENSE="BSD GPL-2"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
68 IUSE="activefilter atm dhcp eap-tls gtk ipv6 pam radius"
69
70 DEPEND="activefilter? ( virtual/libpcap )
71 atm? ( net-dialup/linux-atm )
72 pam? ( virtual/pam )
73 gtk? ( x11-libs/gtk+:2 )
74 eap-tls? ( net-misc/curl dev-libs/openssl )"
75 RDEPEND="${DEPEND}"
76
77 src_prepare() {
78 epatch "${WORKDIR}/patch/make-vars.patch"
79 epatch "${WORKDIR}/patch/mpls.patch"
80 epatch "${WORKDIR}/patch/killaddr-smarter.patch"
81 epatch "${WORKDIR}/patch/wait-children.patch"
82 epatch "${WORKDIR}/patch/defaultgateway.patch"
83 epatch "${WORKDIR}/patch/linkpidfile.patch"
84 epatch "${WORKDIR}/patch/qa-fixes.patch"
85 epatch "${WORKDIR}/patch/auth-fail.patch"
86 epatch "${WORKDIR}/patch/defaultmetric.patch"
87 epatch "${WORKDIR}/patch/dev-ppp.patch"
88 epatch "${WORKDIR}/patch/gtk2.patch"
89 epatch "${WORKDIR}/patch/passwordfd-read-early.patch"
90 epatch "${WORKDIR}/patch/pppd-usepeerwins.patch"
91 epatch "${WORKDIR}/patch/connect-errors.patch"
92 epatch "${WORKDIR}/patch/Makefile.patch"
93 epatch "${WORKDIR}/patch/pppol2tpv3-2.6.35.patch"
94 epatch "${WORKDIR}/patch/pado-timeout.patch"
95 epatch "${WORKDIR}/patch/lcp-echo-adaptive.patch"
96
97 use eap-tls && {
98 # see http://www.nikhef.nl/~janjust/ppp for more info
99 einfo "Enabling EAP-TLS support"
100 epatch "${WORKDIR}/patch/eaptls-mppe-0.98-gentoo.patch"
101 }
102
103 use atm && {
104 einfo "Enabling PPPoATM support"
105 sed -i "s/^#HAVE_LIBATM=yes/HAVE_LIBATM=yes/" pppd/plugins/pppoatm/Makefile.linux
106 }
107
108 use activefilter || {
109 einfo "Disabling active filter"
110 sed -i "s/^FILTER=y/#FILTER=y/" pppd/Makefile.linux
111 }
112
113 use pam && {
114 einfo "Enabling PAM"
115 sed -i "s/^#USE_PAM=y/USE_PAM=y/" pppd/Makefile.linux
116 }
117
118 use ipv6 && {
119 einfo "Enabling IPv6"
120 sed -i "s/#HAVE_INET6/HAVE_INET6/" pppd/Makefile.linux
121 }
122
123 einfo "Enabling CBCP"
124 sed -i "s/^#CBCP=y/CBCP=y/" pppd/Makefile.linux
125
126 use dhcp && {
127 # copy the ppp-dhcp plugin files
128 einfo "Adding ppp-dhcp plugin files..."
129 mv "${WORKDIR}/dhcp" "${S}/pppd/plugins" \
130 && sed -i -e 's/\(SUBDIRS := .*rp-pppoe.*\)$/\1 dhcp/' pppd/plugins/Makefile.linux \
131 || die "ppp-dhcp plugin addition failed"
132 epatch "${WORKDIR}/patch/dhcp-make-vars.patch"
133 epatch "${WORKDIR}/patch/dhcp-sys_error_to_strerror.patch"
134 }
135
136 # Set correct libdir
137 sed -i -e "s:/lib/pppd:/$(get_libdir)/pppd:" \
138 pppd/{pathnames.h,pppd.8}
139
140 if use radius; then
141 #set the right paths in radiusclient.conf
142 sed -i -e "s:/usr/local/etc:/etc:" \
143 -e "s:/usr/local/sbin:/usr/sbin:" pppd/plugins/radius/etc/radiusclient.conf
144 #set config dir to /etc/ppp/radius
145 sed -i -e "s:/etc/radiusclient:/etc/ppp/radius:g" \
146 pppd/plugins/radius/{*.8,*.c,*.h} \
147 pppd/plugins/radius/etc/*
148 else
149 einfo "Disabling radius"
150 sed -i -e '/+= radius/s:^:#:' pppd/plugins/Makefile.linux
151 fi
152 }
153
154 src_configure() {
155 export CC="$(tc-getCC)"
156 export AR="$(tc-getAR)"
157 econf || die "econf failed"
158 }
159
160 src_compile() {
161 emake COPTS="${CFLAGS} -D_GNU_SOURCE" || die "compile failed"
162
163 #build pppgetpass
164 cd contrib/pppgetpass
165 if use gtk; then
166 emake -f Makefile.linux || die "failed to build pppgetpass"
167 else
168 emake pppgetpass.vt || die "failed to build pppgetpass"
169 fi
170 }
171
172 src_install() {
173 local i
174 for i in chat pppd pppdump pppstats ; do
175 doman ${i}/${i}.8 || die "man page for ${i} not build"
176 dosbin ${i}/${i} || die "${i} not build"
177 done
178 fperms u+s-w /usr/sbin/pppd
179
180 # Install pppd header files
181 pushd pppd >/dev/null
182 emake INSTROOT="${D}" install-devel || die "emake install-devel failed"
183 popd >/dev/null
184
185 dosbin pppd/plugins/rp-pppoe/pppoe-discovery || die "pppoe-discovery not build"
186
187 dodir /etc/ppp/peers
188 insinto /etc/ppp
189 insopts -m0600
190 newins etc.ppp/pap-secrets pap-secrets.example || die "pap-secrets.example not found"
191 newins etc.ppp/chap-secrets chap-secrets.example || die "chap-secrets.example not found"
192
193 insopts -m0644
194 doins etc.ppp/options
195
196 exeinto /etc/ppp
197 for i in ip-up ip-down ; do
198 doexe "${WORKDIR}/scripts/${i}" || die "failed to install ${i} script"
199 insinto /etc/ppp/${i}.d
200 use ipv6 && dosym ${i} /etc/ppp/${i/ip/ipv6}
201 doins "${WORKDIR}/scripts/${i}.d"/* || die "failed to install ${i}.d scripts"
202 done
203
204 pamd_mimic_system ppp auth account session
205
206 local PLUGINS_DIR=/usr/$(get_libdir)/pppd/$(awk -F '"' '/VERSION/ {print $2}' pppd/patchlevel.h)
207 #closing " for syntax coloring
208 insinto "${PLUGINS_DIR}"
209 insopts -m0755
210 doins pppd/plugins/minconn.so || die "minconn.so not build"
211 doins pppd/plugins/passprompt.so || die "passprompt.so not build"
212 doins pppd/plugins/passwordfd.so || die "passwordfd.so not build"
213 doins pppd/plugins/winbind.so || die "winbind.so not build"
214 doins pppd/plugins/rp-pppoe/rp-pppoe.so || die "rp-pppoe.so not build"
215 doins pppd/plugins/pppol2tp/openl2tp.so || die "openl2tp.so not build"
216 doins pppd/plugins/pppol2tp/pppol2tp.so || die "pppol2tp.so not build"
217 if use atm; then
218 doins pppd/plugins/pppoatm/pppoatm.so || die "pppoatm.so not build"
219 fi
220 if use dhcp; then
221 doins pppd/plugins/dhcp/dhcpc.so || die "dhcpc.so not build"
222 fi
223 if use radius; then
224 doins pppd/plugins/radius/radius.so || die "radius.so not build"
225 doins pppd/plugins/radius/radattr.so || die "radattr.so not build"
226 doins pppd/plugins/radius/radrealms.so || die "radrealms.so not build"
227
228 #Copy radiusclient configuration files (#92878)
229 insinto /etc/ppp/radius
230 insopts -m0644
231 doins pppd/plugins/radius/etc/{dictionary*,issue,port-id-map,radiusclient.conf,realms,servers}
232
233 doman pppd/plugins/radius/pppd-radius.8
234 doman pppd/plugins/radius/pppd-radattr.8
235 fi
236
237 insinto /etc/modprobe.d
238 insopts -m0644
239 newins "${FILESDIR}/modules.ppp" ppp.conf
240
241 dodoc PLUGINS README* SETUP Changes-2.3 FAQ
242 dodoc "${FILESDIR}/README.mpls"
243
244 dosbin scripts/pon && \
245 dosbin scripts/poff && \
246 dosbin scripts/plog && \
247 doman scripts/pon.1 || die "failed to install pon&poff scripts"
248
249 # Adding misc. specialized scripts to doc dir
250 insinto /usr/share/doc/${PF}/scripts/chatchat
251 doins scripts/chatchat/* || die "failed to install chat scripts in doc dir"
252 insinto /usr/share/doc/${PF}/scripts
253 doins scripts/* || die "failed to install scripts in doc dir"
254
255 if use gtk; then
256 dosbin contrib/pppgetpass/{pppgetpass.vt,pppgetpass.gtk}
257 newsbin contrib/pppgetpass/pppgetpass.sh pppgetpass
258 else
259 newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass
260 fi
261 doman contrib/pppgetpass/pppgetpass.8
262 }
263
264 pkg_postinst() {
265 if linux-info_get_any_version && linux_config_src_exists; then
266 echo
267 ewarn "If the following test report contains a missing kernel configuration option that you need,"
268 ewarn "you should reconfigure and rebuild your kernel before running pppd."
269 CONFIG_CHECK="~PPP ~PPP_ASYNC ~PPP_SYNC_TTY"
270 local ERROR_PPP="CONFIG_PPP:\t missing PPP support (REQUIRED)"
271 local ERROR_PPP_ASYNC="CONFIG_PPP_ASYNC:\t missing asynchronous serial line discipline (optional, but highly recommended)"
272 local WARNING_PPP_SYNC_TTY="CONFIG_PPP_SYNC_TTY:\t missing synchronous serial line discipline (optional; used by 'sync' pppd option)"
273 if use activefilter ; then
274 CONFIG_CHECK="${CONFIG_CHECK} ~PPP_FILTER"
275 local ERROR_PPP_FILTER="CONFIG_PPP_FILTER:\t missing PPP filtering support (REQUIRED)"
276 fi
277 CONFIG_CHECK="${CONFIG_CHECK} ~PPP_DEFLATE ~PPP_BSDCOMP ~PPP_MPPE"
278 local ERROR_PPP_DEFLATE="CONFIG_PPP_DEFLATE:\t missing Deflate compression (optional, but highly recommended)"
279 local ERROR_PPP_BSDCOMP="CONFIG_PPP_BSDCOMP:\t missing BSD-Compress compression (optional, but highly recommended)"
280 local WARNING_PPP_MPPE="CONFIG_PPP_MPPE:\t missing MPPE encryption (optional, mostly used by PPTP links)"
281 CONFIG_CHECK="${CONFIG_CHECK} ~PPPOE ~PACKET"
282 local WARNING_PPPOE="CONFIG_PPPOE:\t missing PPPoE support (optional, needed by rp-pppoe plugin)"
283 local WARNING_PACKET="CONFIG_PACKET:\t missing AF_PACKET support (optional, used by rp-pppoe and dhcpc plugins)"
284 if use atm ; then
285 CONFIG_CHECK="${CONFIG_CHECK} ~PPPOATM"
286 local WARNING_PPPOATM="CONFIG_PPPOATM:\t missing PPPoA support (optional, needed by pppoatm plugin)"
287 fi
288 check_extra_config
289 fi
290
291 if [ ! -e "${ROOT}/dev/.devfsd" ] && [ ! -e "${ROOT}/dev/.udev" ] && [ ! -e "${ROOT}/dev/ppp" ]; then
292 mknod "${ROOT}/dev/ppp" c 108 0
293 fi
294 if [ "$ROOT" = "/" ]; then
295 if [ -x /sbin/update-modules ]; then
296 /sbin/update-modules
297 else
298 /sbin/modules-update
299 fi
300 fi
301
302 # create *-secrets files if not exists
303 [ -f "${ROOT}/etc/ppp/pap-secrets" ] || \
304 cp -pP "${ROOT}/etc/ppp/pap-secrets.example" "${ROOT}/etc/ppp/pap-secrets"
305 [ -f "${ROOT}/etc/ppp/chap-secrets" ] || \
306 cp -pP "${ROOT}/etc/ppp/chap-secrets.example" "${ROOT}/etc/ppp/chap-secrets"
307
308 # lib name has changed
309 sed -i -e "s:^pppoe.so:rp-pppoe.so:" "${ROOT}/etc/ppp/options"
310
311 if use radius && [[ $previous_less_than_2_4_3_r5 = 0 ]] ; then
312 echo
313 ewarn "As of ${PN}-2.4.3-r5, the RADIUS configuration files have moved from"
314 ewarn " /etc/radiusclient to /etc/ppp/radius."
315 einfo "For your convenience, radiusclient directory was copied to the new location."
316 fi
317
318 echo
319 elog "Pon, poff and plog scripts have been supplied for experienced users."
320 elog "Users needing particular scripts (ssh,rsh,etc.) should check out the"
321 elog "/usr/share/doc/${PF}/scripts directory."
322
323 # move the old user-defined files into ip-{up,down}.d directories
324 # TO BE REMOVED AFTER SEPT 2008
325 local i
326 for i in ip-up ip-down; do
327 if [ -f "${ROOT}"/etc/ppp/${i}.local ]; then
328 mv /etc/ppp/${i}.local /etc/ppp/${i}.d/90-local.sh && \
329 ewarn "/etc/ppp/${i}.local has been moved to /etc/ppp/${i}.d/90-local.sh"
330 fi
331 done
332 }