[arch-commits] Commit in ppp/trunk (6 files)

Thomas Bächler thomas at archlinux.org
Fri May 15 21:30:16 EDT 2009


    Date: Friday, May 15, 2009 @ 21:30:16
  Author: thomas
Revision: 39393

upgpkg: ppp 2.4.4-8

Added:
  ppp/trunk/closelog-fix.patch
  ppp/trunk/ip-down.d.dns.sh
  ppp/trunk/ip-up.d.dns.sh
Modified:
  ppp/trunk/PKGBUILD
  ppp/trunk/ip-down
  ppp/trunk/ip-up

--------------------+
 PKGBUILD           |   66 +++++++++++++++++++++++++++++++++------------------
 closelog-fix.patch |   33 +++++++++++++++++++++++++
 ip-down            |    8 ++++++
 ip-down.d.dns.sh   |    3 ++
 ip-up              |    8 ++++++
 ip-up.d.dns.sh     |    6 ++++
 6 files changed, 101 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-05-15 22:11:52 UTC (rev 39392)
+++ PKGBUILD	2009-05-16 01:30:16 UTC (rev 39393)
@@ -1,8 +1,8 @@
 # $Id$
-# Maintainer: judd <jvinet at zeroflux.org>
+# Maintainer: Thomas Baechler <thomas at archlinux.org>
 pkgname=ppp
 pkgver=2.4.4
-pkgrel=7
+pkgrel=8
 pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
 arch=(i686 x86_64) 
 url="http://www.samba.org/ppp/"
@@ -10,16 +10,26 @@
 groups=('base')
 depends=('glibc' 'libpcap>=1.0.0')
 backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down})
-source=(ftp://ftp.samba.org/pub/ppp/ppp-$pkgver.tar.gz \
-        options pon poff ppp plog pon.1 ip-up ip-down)
-md5sums=('183800762e266132218b204dfb428d29' '7a9259a8f038073eeea7e4552ff1849f'\
-         '48c024f73a80c8b69c4def22f86902cc' '2d811f8470ccdea3b8c4505a438483e9'\
-         '7561c73b557292d5ba1a9c5dbd270fde' '86cdaf133f7a79fb464f02d83afc7734'\
-         '44cc662ba9aa61dd9add3ddd4c5ded57' 'fac0c773490371ea673f4be0977a230f'\
-         'a88b40b1bf91eb5cca3762b7195e4fe2')
+source=(ftp://ftp.samba.org/pub/ppp/ppp-${pkgver}.tar.gz
+        options pon poff ppp plog pon.1 ip-up ip-down
+        closelog-fix.patch
+        ip-up.d.dns.sh
+        ip-down.d.dns.sh)
+md5sums=('183800762e266132218b204dfb428d29'
+         '7a9259a8f038073eeea7e4552ff1849f'
+         '48c024f73a80c8b69c4def22f86902cc'
+         '2d811f8470ccdea3b8c4505a438483e9'
+         '7561c73b557292d5ba1a9c5dbd270fde'
+         '86cdaf133f7a79fb464f02d83afc7734'
+         '44cc662ba9aa61dd9add3ddd4c5ded57'
+         'e4beb16ed600b61336d50b2bd2df7cd5'
+         '2fa0671f40711e69194ccf60979f8b33'
+         '6f20c1f20ea332767669552bf3c3f7c8'
+         'edb4a555d97d00560ccdb9b722a5e6bb'
+         '8d1be5af8e46393ba6eb273377831e38')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
+  cd ${srcdir}/${pkgname}-${pkgver}
   # fix CFLAGS
   sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" pppd/Makefile.linux
   sed -i "s:-g -O2:${CFLAGS}:" pppd/plugins/Makefile.linux
@@ -29,19 +39,29 @@
 
   # enable active filter
   sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
-
+  # enable ipv6 support
+  sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
+  # Enable Microsoft proprietary Callback Control Protocol
+  sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux 
+  # Fix #8757
+  patch -Np1 -i ${srcdir}/closelog-fix.patch || return 1
+  
   ./configure --prefix=/usr
   make || return 1
-  make DESTDIR=$startdir/pkg/usr install
-  install -D -m644 $startdir/src/options $startdir/pkg/etc/ppp/options
-  install -D -m755 $startdir/src/ip-up $startdir/pkg/etc/ppp/ip-up
-  install -D -m755 $startdir/src/ip-down $startdir/pkg/etc/ppp/ip-down
-  install -D -m755 $startdir/src/pon $startdir/pkg/usr/bin/pon
-  install -D -m755 $startdir/src/poff $startdir/pkg/usr/bin/poff
-  install -D -m755 $startdir/src/plog $startdir/pkg/usr/sbin/plog
-  install -D -m600 etc.ppp/pap-secrets $startdir/pkg/etc/ppp/pap-secrets
-  install -D -m600 etc.ppp/chap-secrets $startdir/pkg/etc/ppp/chap-secrets
-  install -D -m755 $startdir/src/ppp $startdir/pkg/etc/rc.d/ppp 
-  install -D -m644 $startdir/src/pon.1 $startdir/pkg/usr/share/man/man1/pon.1
-  mkdir -p $startdir/pkg/etc/ppp/peers
+  make DESTDIR=${pkgdir}/usr install || return 1
+  install -D -m644 ${srcdir}/options ${pkgdir}/etc/ppp/options || return 1
+  install -D -m755 ${srcdir}/ip-up ${pkgdir}/etc/ppp/ip-up || return 1
+  install -D -m755 ${srcdir}/ip-down ${pkgdir}/etc/ppp/ip-down || return 1
+  install -d -m755 ${pkgdir}/etc/ppp/ip-up.d || return 1
+  install -d -m755 ${pkgdir}/etc/ppp/ip-down.d || return 1
+  install -m755 ${srcdir}/ip-up.d.dns.sh ${pkgdir}/etc/ppp/ip-up.d/00-dns.sh || return 1
+  install -m755 ${srcdir}/ip-down.d.dns.sh ${pkgdir}/etc/ppp/ip-down.d/00-dns.sh || return 1
+  install -D -m755 ${srcdir}/pon ${pkgdir}/usr/bin/pon || return 1
+  install -D -m755 ${srcdir}/poff ${pkgdir}/usr/bin/poff || return 1
+  install -D -m755 ${srcdir}/plog ${pkgdir}/usr/sbin/plog || return 1
+  install -D -m600 etc.ppp/pap-secrets ${pkgdir}/etc/ppp/pap-secrets  || return 1
+  install -D -m600 etc.ppp/chap-secrets ${pkgdir}/etc/ppp/chap-secrets || return 1
+  install -D -m755 ${srcdir}/ppp ${pkgdir}/etc/rc.d/ppp  || return 1
+  install -D -m644 ${srcdir}/pon.1 ${pkgdir}/usr/share/man/man1/pon.1 || return 1
+  install -d -m755 ${pkgdir}/etc/ppp/peers || return 1
 }

Added: closelog-fix.patch
===================================================================
--- closelog-fix.patch	                        (rev 0)
+++ closelog-fix.patch	2009-05-16 01:30:16 UTC (rev 39393)
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /cvsroot/ppp/pppd/main.c,v
+retrieving revision 1.153
+retrieving revision 1.154
+diff -u -r1.153 -r1.154
+--- ppp/pppd/main.c	2006/06/04 03:52:50	1.153
++++ ppp/pppd/main.c	2006/12/19 07:48:19	1.154
+@@ -66,7 +66,7 @@
+  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
+-#define RCSID	"$Id: main.c,v 1.153 2006/06/04 03:52:50 paulus Exp $"
++#define RCSID	"$Id: main.c,v 1.154 2006/12/19 07:48:19 paulus Exp $"
+ 
+ #include <stdio.h>
+ #include <ctype.h>
+@@ -1567,6 +1567,8 @@
+ 	if (errfd == 0 || errfd == 1)
+ 		errfd = dup(errfd);
+ 
++	closelog();
++
+ 	/* dup the in, out, err fds to 0, 1, 2 */
+ 	if (infd != 0)
+ 		dup2(infd, 0);
+@@ -1575,7 +1577,6 @@
+ 	if (errfd != 2)
+ 		dup2(errfd, 2);
+ 
+-	closelog();
+ 	if (log_to_fd > 2)
+ 		close(log_to_fd);
+ 	if (the_channel->close)

Modified: ip-down
===================================================================
--- ip-down	2009-05-15 22:11:52 UTC (rev 39392)
+++ ip-down	2009-05-16 01:30:16 UTC (rev 39393)
@@ -2,3 +2,11 @@
 #
 # This script is run by pppd after the connection has ended.
 #
+
+# Execute all scripts in /etc/ppp/ip-up.d/
+for ipdown in /etc/ppp/ip-down.d/*.sh; do
+  if [ -x $ipdown ]; then
+    # Parameters: interface-name tty-device speed local-IP-address remote-IP-address ipparam
+    $ipdown "$@"
+  fi
+done

Added: ip-down.d.dns.sh
===================================================================
--- ip-down.d.dns.sh	                        (rev 0)
+++ ip-down.d.dns.sh	2009-05-16 01:30:16 UTC (rev 39393)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+[ -e /etc/resolv.conf.backup.${IFNAME} ] && mv /etc/resolv.conf.backup.${IFNAME} /etc/resolv.conf

Modified: ip-up
===================================================================
--- ip-up	2009-05-15 22:11:52 UTC (rev 39392)
+++ ip-up	2009-05-16 01:30:16 UTC (rev 39393)
@@ -2,3 +2,11 @@
 #
 # This script is run by pppd when there's a successful ppp connection.
 #
+
+# Execute all scripts in /etc/ppp/ip-up.d/
+for ipup in /etc/ppp/ip-up.d/*.sh; do
+  if [ -x $ipup ]; then
+    # Parameters: interface-name tty-device speed local-IP-address remote-IP-address ipparam
+    $ipup "$@"
+  fi
+done

Added: ip-up.d.dns.sh
===================================================================
--- ip-up.d.dns.sh	                        (rev 0)
+++ ip-up.d.dns.sh	2009-05-16 01:30:16 UTC (rev 39393)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "$USEPEERDNS" = "1" -a -f /etc/ppp/resolv.conf ]; then
+  [ -e /etc/resolv.conf ] && mv /etc/resolv.conf /etc/resolv.conf.backup.${IFNAME}
+  mv /etc/ppp/resolv.conf /etc/resolv.conf
+fi



More information about the arch-commits mailing list