summaryrefslogtreecommitdiff
path: root/meta/packages/ppp
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/ppp
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadopenembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.bz2
openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.zip
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/ppp')
-rw-r--r--meta/packages/ppp/files/08setupdns12
-rw-r--r--meta/packages/ppp/files/92removedns5
-rwxr-xr-xmeta/packages/ppp/files/init50
-rwxr-xr-xmeta/packages/ppp/files/ip-down43
-rwxr-xr-xmeta/packages/ppp/files/ip-up44
-rw-r--r--meta/packages/ppp/files/poff26
-rw-r--r--meta/packages/ppp/files/pon9
-rw-r--r--meta/packages/ppp/ppp-2.4.3/cifdefroute.patch286
-rw-r--r--meta/packages/ppp/ppp-2.4.3/enable-ipv6.patch11
-rw-r--r--meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch19
-rw-r--r--meta/packages/ppp/ppp-2.4.3/makefile.patch89
-rw-r--r--meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch7
-rw-r--r--meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch43
-rw-r--r--meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch7
-rw-r--r--meta/packages/ppp/ppp_2.4.3.bb70
15 files changed, 721 insertions, 0 deletions
diff --git a/meta/packages/ppp/files/08setupdns b/meta/packages/ppp/files/08setupdns
new file mode 100644
index 0000000000..998219de97
--- /dev/null
+++ b/meta/packages/ppp/files/08setupdns
@@ -0,0 +1,12 @@
+#!/bin/sh
+ACTUALCONF=/var/run/resolv.conf
+PPPCONF=/var/run/ppp/resolv.conf
+if [ -f $PPPCONF ] ; then
+ if [ -f $ACTUALCONF ] ; then
+ if [ ! -h $ACTUALCONF -o ! "`readlink $ACTUALCONF 2>&1`" = "$PPPCONF" ] ; then
+ mv $ACTUALCONF $ACTUALCONF.ppporig
+ fi
+ fi
+
+ ln -sf $PPPCONF $ACTUALCONF
+fi
diff --git a/meta/packages/ppp/files/92removedns b/meta/packages/ppp/files/92removedns
new file mode 100644
index 0000000000..2eadec6899
--- /dev/null
+++ b/meta/packages/ppp/files/92removedns
@@ -0,0 +1,5 @@
+#!/bin/sh
+ACTUALCONF=/var/run/resolv.conf
+if [ -f $ACTUALCONF.ppporig ] ; then
+ mv $ACTUALCONF.ppporig $ACTUALCONF
+fi
diff --git a/meta/packages/ppp/files/init b/meta/packages/ppp/files/init
new file mode 100755
index 0000000000..5b3b7abe2f
--- /dev/null
+++ b/meta/packages/ppp/files/init
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# /etc/init.d/ppp: start or stop PPP link.
+#
+# If you want PPP started on boot time (most dialup systems won't need it)
+# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and
+# follow the instructions in the comments in that file.
+
+test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
+if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
+
+case "$1" in
+ start)
+ echo -n "Starting up PPP link: pppd"
+ if [ "$RUNFILE" = "1" ]; then
+ /etc/ppp/ppp_on_boot
+ else
+ pppd call provider
+ fi
+ echo "."
+ ;;
+ stop)
+ echo -n "Shutting down PPP link: pppd"
+ if [ "$RUNFILE" = "1" ]; then
+ poff
+ else
+ poff provider
+ fi
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting PPP link: pppd"
+ if [ "$RUNFILE" = "1" ]; then
+ poff
+ sleep 5
+ /etc/ppp/ppp_on_boot
+ else
+ poff provider
+ sleep 5
+ pppd call provider
+ fi
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/packages/ppp/files/ip-down b/meta/packages/ppp/files/ip-down
new file mode 100755
index 0000000000..06d35487a5
--- /dev/null
+++ b/meta/packages/ppp/files/ip-down
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $Id: ip-down,v 1.2 1998/02/10 21:21:55 phil Exp $
+#
+# This script is run by the pppd _after_ the link is brought down.
+# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
+# routes, unset IP addresses etc. you should create script(s) there.
+#
+# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named
+# after that package), so choose local script names with that in mind.
+#
+# This script is called with the following arguments:
+# Arg Name Example
+# $1 Interface name ppp0
+# $2 The tty ttyS1
+# $3 The link speed 38400
+# $4 Local IP number 12.34.56.78
+# $5 Peer IP number 12.34.56.99
+# $6 Optional ``ipparam'' value foo
+
+# The environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_LOCAL="$4"
+PPP_REMOTE="$5"
+PPP_IPPARAM="$6"
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
+
+# as an additional convenience, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=`/usr/bin/basename "$2"`
+export PPP_TTYNAME
+
+# Main Script starts here
+
+run-parts /etc/ppp/ip-down.d
+
+# last line
diff --git a/meta/packages/ppp/files/ip-up b/meta/packages/ppp/files/ip-up
new file mode 100755
index 0000000000..fc2fae9fe0
--- /dev/null
+++ b/meta/packages/ppp/files/ip-up
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $Id: ip-up,v 1.2 1998/02/10 21:25:34 phil Exp $
+#
+# This script is run by the pppd after the link is established.
+# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
+# set IP address, run the mailq etc. you should create script(s) there.
+#
+# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
+# after that package), so choose local script names with that in mind.
+#
+# This script is called with the following arguments:
+# Arg Name Example
+# $1 Interface name ppp0
+# $2 The tty ttyS1
+# $3 The link speed 38400
+# $4 Local IP number 12.34.56.78
+# $5 Peer IP number 12.34.56.99
+# $6 Optional ``ipparam'' value foo
+
+# The environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_LOCAL="$4"
+PPP_REMOTE="$5"
+PPP_IPPARAM="$6"
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
+
+
+# as an additional convenience, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=`/usr/bin/basename "$2"`
+export PPP_TTYNAME
+
+# Main Script starts here
+
+run-parts /etc/ppp/ip-up.d
+
+# last line
diff --git a/meta/packages/ppp/files/poff b/meta/packages/ppp/files/poff
new file mode 100644
index 0000000000..0521a9406a
--- /dev/null
+++ b/meta/packages/ppp/files/poff
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Lets see how many pppds are running....
+set -- `cat /var/run/ppp*.pid 2>/dev/null`
+
+case $# in
+ 0) # pppd only creates a pid file once ppp is up, so let's try killing pppd
+ # on the assumption that we've not got that far yet.
+ killall pppd
+ ;;
+ 1) # If only one was running then it can be killed (apparently killall
+ # caused problems for some, so lets try killing the pid from the file)
+ kill $1
+ ;;
+ *) # More than one! Aieehh.. Dont know which one to kill.
+ echo "More than one pppd running. None stopped"
+ exit 1
+ ;;
+esac
+
+if [ -r /var/run/ppp-quick ]
+then
+ rm -f /var/run/ppp-quick
+fi
+
+exit 0
diff --git a/meta/packages/ppp/files/pon b/meta/packages/ppp/files/pon
new file mode 100644
index 0000000000..91c059501a
--- /dev/null
+++ b/meta/packages/ppp/files/pon
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = "quick" ]
+then
+ touch /var/run/ppp-quick
+ shift
+fi
+
+/usr/sbin/pppd call ${1:-provider}
diff --git a/meta/packages/ppp/ppp-2.4.3/cifdefroute.patch b/meta/packages/ppp/ppp-2.4.3/cifdefroute.patch
new file mode 100644
index 0000000000..d61b920c50
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.3/cifdefroute.patch
@@ -0,0 +1,286 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- ppp-2.4.3/pppd/ipcp.c~cifdefroute.patch
++++ ppp-2.4.3/pppd/ipcp.c
+@@ -197,6 +197,16 @@
+ "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
+ &ipcp_wantoptions[0].default_route },
+
++#ifdef __linux__
++ { "replacedefaultroute", o_bool,
++ &ipcp_wantoptions[0].replace_default_route,
++ "Replace default route", 1
++ },
++ { "noreplacedefaultroute", o_bool,
++ &ipcp_allowoptions[0].replace_default_route,
++ "Never replace default route", OPT_A2COPY,
++ &ipcp_wantoptions[0].replace_default_route },
++#endif
+ { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
+ "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
+ { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
+@@ -263,7 +273,7 @@
+ ip_active_pkt
+ };
+
+-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
++static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
+ static void ipcp_script __P((char *)); /* Run an up/down script */
+ static void ipcp_script_done __P((void *));
+
+@@ -1659,7 +1669,12 @@
+ if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
+ return 0;
+ if (wo->default_route)
++#ifndef __linux__
+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
++#else
++ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[u] = 1;
+ if (wo->proxy_arp)
+ if (sifproxyarp(u, wo->hisaddr))
+@@ -1741,7 +1756,8 @@
+ */
+ if (demand) {
+ if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
+- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr);
++ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr,
++ wo->replace_default_route);
+ if (go->ouraddr != wo->ouraddr) {
+ warn("Local IP address changed to %I", go->ouraddr);
+ script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
+@@ -1766,7 +1782,12 @@
+
+ /* assign a default route through the interface if required */
+ if (ipcp_wantoptions[f->unit].default_route)
++#ifndef __linux__
+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
++#else
++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[f->unit] = 1;
+
+ /* Make a proxy ARP entry if requested. */
+@@ -1813,7 +1834,12 @@
+
+ /* assign a default route through the interface if required */
+ if (ipcp_wantoptions[f->unit].default_route)
++#ifndef __linux__
+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
++#else
++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[f->unit] = 1;
+
+ /* Make a proxy ARP entry if requested. */
+@@ -1890,7 +1916,7 @@
+ sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
+ sifdown(f->unit);
+ ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
+- ipcp_hisoptions[f->unit].hisaddr);
++ ipcp_hisoptions[f->unit].hisaddr, 0);
+ }
+
+ /* Execute the ip-down script */
+@@ -1906,16 +1932,25 @@
+ * proxy arp entries, etc.
+ */
+ static void
+-ipcp_clear_addrs(unit, ouraddr, hisaddr)
++ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute)
+ int unit;
+ u_int32_t ouraddr; /* local address */
+ u_int32_t hisaddr; /* remote address */
++ bool replacedefaultroute;
+ {
+ if (proxy_arp_set[unit]) {
+ cifproxyarp(unit, hisaddr);
+ proxy_arp_set[unit] = 0;
+ }
+- if (default_route_set[unit]) {
++ /* If replacedefaultroute, sifdefaultroute will be called soon
++ * with replacedefaultroute set and that will overwrite the current
++ * default route. This is the case only when doing demand, otherwise
++ * during demand, this cifdefaultroute would restore the old default
++ * route which is not what we want in this case. In the non-demand
++ * case, we'll delete the default route and restore the old if there
++ * is one saved by an sifdefaultroute with replacedefaultroute.
++ */
++ if (!replacedefaultroute && default_route_set[unit]) {
+ cifdefaultroute(unit, ouraddr, hisaddr);
+ default_route_set[unit] = 0;
+ }
+--- ppp-2.4.3/pppd/ipcp.h~cifdefroute.patch
++++ ppp-2.4.3/pppd/ipcp.h
+@@ -70,6 +70,7 @@
+ bool old_addrs; /* Use old (IP-Addresses) option? */
+ bool req_addr; /* Ask peer to send IP address? */
+ bool default_route; /* Assign default route through interface? */
++ bool replace_default_route; /* Replace default route through interface? */
+ bool proxy_arp; /* Make proxy ARP entry for peer? */
+ bool neg_vj; /* Van Jacobson Compression? */
+ bool old_vj; /* use old (short) form of VJ option? */
+--- ppp-2.4.3/pppd/pppd.8~cifdefroute.patch
++++ ppp-2.4.3/pppd/pppd.8
+@@ -120,6 +120,13 @@
+ This entry is removed when the PPP connection is broken. This option
+ is privileged if the \fInodefaultroute\fR option has been specified.
+ .TP
++.B replacedefaultroute
++This option is a flag to the defaultroute option. If defaultroute is
++set and this flag is also set, pppd replaces an existing default route
++with the new default route.
++
++
++.TP
+ .B disconnect \fIscript
+ Execute the command specified by \fIscript\fR, by passing it to a
+ shell, after
+@@ -701,7 +708,12 @@
+ .TP
+ .B nodefaultroute
+ Disable the \fIdefaultroute\fR option. The system administrator who
+-wishes to prevent users from creating default routes with pppd
++wishes to prevent users from adding a default route with pppd
++can do so by placing this option in the /etc/ppp/options file.
++.TP
++.B noreplacedefaultroute
++Disable the \fIreplacedefaultroute\fR option. The system administrator who
++wishes to prevent users from replacing a default route with pppd
+ can do so by placing this option in the /etc/ppp/options file.
+ .TP
+ .B nodeflate
+--- ppp-2.4.3/pppd/pppd.h~cifdefroute.patch
++++ ppp-2.4.3/pppd/pppd.h
+@@ -640,7 +640,11 @@
+ int cif6addr __P((int, eui64_t, eui64_t));
+ /* Remove an IPv6 address from i/f */
+ #endif
++#ifndef __linux__
+ int sifdefaultroute __P((int, u_int32_t, u_int32_t));
++#else
++int sifdefaultroute __P((int, u_int32_t, u_int32_t, bool replace_default_rt));
++#endif
+ /* Create default route through i/f */
+ int cifdefaultroute __P((int, u_int32_t, u_int32_t));
+ /* Delete default route through i/f */
+--- ppp-2.4.3/pppd/sys-linux.c~cifdefroute.patch
++++ ppp-2.4.3/pppd/sys-linux.c
+@@ -206,6 +206,8 @@
+
+ static int if_is_up; /* Interface has been marked up */
+ static u_int32_t default_route_gateway; /* Gateway for default route added */
++static struct rtentry old_def_rt; /* Old default route */
++static int default_rt_repl_rest; /* replace and restore old default rt */
+ static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
+ static char proxy_arp_dev[16]; /* Device for proxy arp entry */
+ static u_int32_t our_old_addr; /* for detecting address changes */
+@@ -1513,6 +1515,9 @@
+ p = NULL;
+ }
+
++ SET_SA_FAMILY (rt->rt_dst, AF_INET);
++ SET_SA_FAMILY (rt->rt_gateway, AF_INET);
++
+ SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
+ SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
+ SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
+@@ -1582,19 +1587,53 @@
+ /********************************************************************
+ *
+ * sifdefaultroute - assign a default route through the address given.
++ *
++ * If the global default_rt_repl_rest flag is set, then this function
++ * already replaced the original system defaultroute with some other
++ * route and it should just replace the current defaultroute with
++ * another one, without saving the current route. Use: demand mode,
++ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
++ * and then changes the temporary addresses to the addresses for the real
++ * ppp connection when it has come up.
+ */
+
+-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
++int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
+ {
+- struct rtentry rt;
++ struct rtentry rt, tmp_rt;
++ struct rtentry *del_rt = NULL;
+
+- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
+- u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);
++
++ if (default_rt_repl_rest) {
++ /* We have already reclaced the original defaultroute, if we
++ * are called again, we will delete the current default route
++ * and set the new default route in this function.
++ * - this is normally only the case the doing demand: */
++ if (defaultroute_exists( &tmp_rt ))
++ del_rt = &tmp_rt;
++ } else if ( defaultroute_exists( &old_def_rt ) &&
++ strcmp( old_def_rt.rt_dev, ifname ) != 0) {
++ /* We did not yet replace an existing default route, let's
++ * check if we should save and replace a default route:
++ */
++ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
+
+- if (old_gateway != gateway)
+- error("not replacing existing default route to %s [%I]",
+- rt.rt_dev, old_gateway);
+- return 0;
++ if (old_gateway != gateway) {
++ if (!replace) {
++ error("not replacing default route to %s [%I]",
++ old_def_rt.rt_dev, old_gateway);
++ return 0;
++ } else {
++ // we need to copy rt_dev because we need it permanent too:
++ char * tmp_dev = malloc(strlen(old_def_rt.rt_dev)+1);
++ strcpy(tmp_dev, old_def_rt.rt_dev);
++ old_def_rt.rt_dev = tmp_dev;
++
++ notice("replacing old default route to %s [%I]",
++ old_def_rt.rt_dev, old_gateway);
++ default_rt_repl_rest = 1;
++ del_rt = &old_def_rt;
++ }
++ }
+ }
+
+ memset (&rt, '\0', sizeof (rt));
+@@ -1616,6 +1655,12 @@
+ error("default route ioctl(SIOCADDRT): %m");
+ return 0;
+ }
++ if (default_rt_repl_rest && del_rt)
++ if (ioctl(sock_fd, SIOCDELRT, del_rt) < 0) {
++ if ( ! ok_error ( errno ))
++ error("del old default route ioctl(SIOCDELRT): %m(%d)", errno);
++ return 0;
++ }
+
+ default_route_gateway = gateway;
+ return 1;
+@@ -1651,6 +1696,16 @@
+ return 0;
+ }
+ }
++ if (default_rt_repl_rest) {
++ notice("restoring old default route to %s [%I]",
++ old_def_rt.rt_dev, SIN_ADDR(old_def_rt.rt_gateway));
++ if (ioctl(sock_fd, SIOCADDRT, &old_def_rt) < 0) {
++ if ( ! ok_error ( errno ))
++ error("restore default route ioctl(SIOCADDRT): %m(%d)", errno);
++ return 0;
++ }
++ default_rt_repl_rest = 0;
++ }
+
+ return 1;
+ }
diff --git a/meta/packages/ppp/ppp-2.4.3/enable-ipv6.patch b/meta/packages/ppp/ppp-2.4.3/enable-ipv6.patch
new file mode 100644
index 0000000000..7b8acb2dd0
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.3/enable-ipv6.patch
@@ -0,0 +1,11 @@
+--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100
++++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100
+@@ -62,7 +62,7 @@
+
+ HAS_SHADOW=y
+ #USE_PAM=y
+-#HAVE_INET6=y
++HAVE_INET6=y
+
+ # Enable plugins
+ PLUGIN=y
diff --git a/meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch b/meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch
new file mode 100644
index 0000000000..574abfaf2c
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch
@@ -0,0 +1,19 @@
+--- ppp-2.4.3/pppd/Makefile.linux.orig 2006-01-17 15:09:56.000000000 +0000
++++ ppp-2.4.3/pppd/Makefile.linux 2006-01-17 15:10:21.000000000 +0000
+@@ -117,12 +117,12 @@
+ #LIBS += -lshadow $(LIBS)
+ endif
+
+-ifneq ($(wildcard /usr/include/crypt.h),)
++#ifneq ($(wildcard /usr/include/crypt.h),)
+ CFLAGS += -DHAVE_CRYPT_H=1
+-endif
+-ifneq ($(wildcard /usr/lib/libcrypt.*),)
++#endif
++#ifneq ($(wildcard /usr/lib/libcrypt.*),)
+ LIBS += -lcrypt
+-endif
++#endif
+
+ ifdef NEEDDES
+ ifndef USE_CRYPT
diff --git a/meta/packages/ppp/ppp-2.4.3/makefile.patch b/meta/packages/ppp/ppp-2.4.3/makefile.patch
new file mode 100644
index 0000000000..4b9cf30cdd
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.3/makefile.patch
@@ -0,0 +1,89 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- ppp-2.4.3/chat/Makefile.linux~pppd.patch
++++ ppp-2.4.3/chat/Makefile.linux
+@@ -25,7 +25,7 @@
+
+ install: chat
+ mkdir -p $(BINDIR)
+- $(INSTALL) -s -c chat $(BINDIR)
++ $(INSTALL) -c chat $(BINDIR)
+ $(INSTALL) -c -m 644 chat.8 $(MANDIR)
+
+ clean:
+--- ppp-2.4.3/pppd/Makefile.linux~pppd.patch
++++ ppp-2.4.3/pppd/Makefile.linux
+@@ -99,7 +99,7 @@
+ CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS += srp-entry
+-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
++EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
+ MANPAGES += srp-entry.8
+ EXTRACLEAN += srp-entry.o
+ NEEDDES=y
+@@ -202,7 +202,7 @@
+ install: pppd
+ mkdir -p $(BINDIR) $(MANDIR)
+ $(EXTRAINSTALL)
+- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
++ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
+ if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ chmod o-rx,u+s $(BINDIR)/pppd; fi
+ $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+--- ppp-2.4.3/pppdump/Makefile.linux~pppd.patch
++++ ppp-2.4.3/pppdump/Makefile.linux
+@@ -17,5 +17,5 @@
+
+ install:
+ mkdir -p $(BINDIR) $(MANDIR)
+- $(INSTALL) -s -c pppdump $(BINDIR)
++ $(INSTALL) -c pppdump $(BINDIR)
+ $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
+--- ppp-2.4.3/pppstats/Makefile.linux~pppd.patch
++++ ppp-2.4.3/pppstats/Makefile.linux
+@@ -22,7 +22,7 @@
+
+ install: pppstats
+ -mkdir -p $(MANDIR)
+- $(INSTALL) -s -c pppstats $(BINDIR)
++ $(INSTALL) -c pppstats $(BINDIR)
+ $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+
+ pppstats: $(PPPSTATSRCS)
+--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux~pppd.patch
++++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux
+@@ -39,9 +39,9 @@
+
+ install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
++ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
+ $(INSTALL) -d -m 755 $(BINDIR)
+- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
++ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
+
+ clean:
+ rm -f *.o *.so
+--- ppp-2.4.3/pppd/plugins/radius/Makefile.linux~pppd.patch
++++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux
+@@ -36,11 +36,11 @@
+
+ install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
+- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
+- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
+- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
+- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
++ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
++ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
++ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
++ $(INSTALL) -m 444 pppd-radius.8 $(MANDIR)
++ $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR)
+
+ radius.so: radius.o libradiusclient.a
+ $(CC) -o radius.so -shared radius.o libradiusclient.a
diff --git a/meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch b/meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch
new file mode 100644
index 0000000000..ac3822ac1d
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch
@@ -0,0 +1,7 @@
+--- ppp-2.4.3/pppd/plugins/Makefile.linux~ 2004-11-13 23:57:35.000000000 -0800
++++ ppp-2.4.3/pppd/plugins/Makefile.linux 2005-08-11 17:19:28.000000000 -0700
+@@ -1,4 +1,3 @@
+-CC = gcc
+ COPTS = -O2 -g
+ CFLAGS = $(COPTS) -I.. -I../../include -fPIC
+ LDFLAGS = -shared
diff --git a/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch b/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch
new file mode 100644
index 0000000000..c22d8cc085
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch
@@ -0,0 +1,43 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- ppp-2.4.3/pppd/ipcp.c~pppd-resolv-varrun.patch
++++ ppp-2.4.3/pppd/ipcp.c
+@@ -55,6 +55,8 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#include <sys/stat.h>
++#include <unistd.h>
+
+ #include "pppd.h"
+ #include "fsm.h"
+@@ -2032,6 +2034,14 @@
+ u_int32_t peerdns1, peerdns2;
+ {
+ FILE *f;
++ struct stat dirinfo;
++
++ if(stat(_PATH_OUTDIR, &dirinfo)) {
++ if(mkdir(_PATH_OUTDIR, 0775)) {
++ error("Failed to create directory %s: %m", _PATH_OUTDIR);
++ return;
++ }
++ }
+
+ f = fopen(_PATH_RESOLV, "w");
+ if (f == NULL) {
+--- ppp-2.4.3/pppd/pathnames.h~pppd-resolv-varrun.patch
++++ ppp-2.4.3/pppd/pathnames.h
+@@ -29,7 +29,8 @@
+ #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
+ #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
+ #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
+-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
++#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
++#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
+
+ #define _PATH_USEROPT ".ppprc"
+ #define _PATH_PSEUDONYM ".ppp_pseudonym"
diff --git a/meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch b/meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch
new file mode 100644
index 0000000000..5601f593d0
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch
@@ -0,0 +1,7 @@
+--- ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux.orig 2005-10-26 20:38:50.990298750 +0100
++++ ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux 2005-10-26 20:39:05.583210750 +0100
+@@ -1,4 +1,3 @@
+-CC = gcc
+ COPTS = -O2 -g
+ CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
+ LDFLAGS = -shared
diff --git a/meta/packages/ppp/ppp_2.4.3.bb b/meta/packages/ppp/ppp_2.4.3.bb
new file mode 100644
index 0000000000..b8253a1a5a
--- /dev/null
+++ b/meta/packages/ppp/ppp_2.4.3.bb
@@ -0,0 +1,70 @@
+SECTION = "console/network"
+DESCRIPTION = "Point-to-Point Protocol (PPP) daemon"
+HOMEPAGE = "http://samba.org/ppp/"
+DEPENDS = "libpcap"
+LICENSE = "BSD GPLv2"
+PR = "r1"
+
+SRC_URI = "ftp://ftp.samba.org/pub/ppp/ppp-${PV}.tar.gz \
+ file://makefile.patch;patch=1 \
+ file://cifdefroute.patch;patch=1 \
+ file://pppd-resolv-varrun.patch;patch=1 \
+ file://plugins-fix-CC.patch;patch=1 \
+ file://pppoatm-makefile.patch;patch=1 \
+ file://enable-ipv6.patch;patch=1 \
+ file://makefile-remove-hard-usr-reference.patch;patch=1 \
+ file://pon \
+ file://poff \
+ file://init \
+ file://ip-up \
+ file://ip-down \
+ file://08setupdns \
+ file://92removedns"
+
+
+inherit autotools
+
+EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}/usr/include LIBDIR=${D}/usr/lib/pppd/${PV} BINDIR=${D}/usr/sbin"
+EXTRA_OECONF = "--disable-strip"
+
+do_install_append () {
+ make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
+ mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
+ mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
+ mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
+ install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
+ install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
+ install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
+ install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/
+ install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
+ install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
+ rm -rf ${D}/${mandir}/man8/man8
+}
+
+CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
+PACKAGES += "ppp-oa ppp-oe ppp-radius ppp-winbind ppp-minconn ppp-password ppp-tools"
+FILES_${PN} = "/etc /usr/bin /usr/sbin/chat /usr/sbin/pppd"
+FILES_ppp-oa = "/usr/lib/pppd/2.4.3/pppoatm.so"
+FILES_ppp-oe = "/usr/sbin/pppoe-discovery /usr/lib/pppd/2.4.3/rp-pppoe.so"
+FILES_ppp-radius = "/usr/lib/pppd/2.4.3/radius.so /usr/lib/pppd/2.4.3/radattr.so /usr/lib/pppd/2.4.3/radrealms.so"
+FILES_ppp-winbind = "/usr/lib/pppd/2.4.3/winbind.so"
+FILES_ppp-minconn = "/usr/lib/pppd/2.4.3/minconn.so"
+FILES_ppp-password = "/usr/lib/pppd/2.4.3/pass*.so"
+FILES_ppp-tools = "/usr/sbin/pppstats /usr/sbin/pppdump"
+DESCRIPTION_ppp-oa = "Plugin for PPP needed for PPP-over-ATM"
+DESCRIPTION_ppp-oe = "Plugin for PPP needed for PPP-over-Ethernet"
+DESCRIPTION_ppp-radius = "Plugin for PPP that are related to RADIUS"
+DESCRIPTION_ppp-winbind = "Plugin for PPP to authenticate against Samba or Windows"
+DESCRIPTION_ppp-minconn = "Plugin for PPP to specify a minimum connect time before the idle timeout applies"
+DESCRIPTION_ppp-password = "Plugin for PPP to get passwords via a pipe"
+DESCRIPTION_ppp-tools = "The pppdump and pppstats utitilities"
+RDEPENDS_ppp_minconn += "libpcap0.8"
+
+pkg_postinst_${PN}() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ chmod u+s ${sbindir}/pppd
+fi
+}