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