[oe-commits] org.oe.dev rp-pppoe: Add version 3.8.

lenehan commit openembedded-commits at lists.openembedded.org
Mon Apr 30 07:58:14 UTC 2007


rp-pppoe: Add version 3.8.
* The source for version 3.5 hasn't been available for a long time.
* Make sure pppoe is installed suid root.
* Always try to reconnect, pppd handles stop/starting pppoe. This prevents
  lots of annoying problems with pppoe totally giving up (debian patch)
* Accept PPPoE packets from multicast addresses (debian patch)
* Don't check the version of the hosts ppp, we don't support the older
  versions of ppp anyway so just remove those checks.
* RDEPEND on ppp, which is needed to use pppoe
* Hard code pppd and id paths, don't search for them on the host system.

Author: lenehan at openembedded.org
Branch: org.openembedded.dev
Revision: e01aa57a064467dc10728a98320d6197fc050374
ViewMTN: http://monotone.openembedded.org/revision.psp?id=e01aa57a064467dc10728a98320d6197fc050374
Files:
1
packages/rp-pppoe/rp-pppoe-3.8
packages/rp-pppoe/rp-pppoe-3.8/configure_in_cross.patch
packages/rp-pppoe/rp-pppoe-3.8/pppoe-no-timeout.patch
packages/rp-pppoe/rp-pppoe-3.8/pppoe-src-restrictions.patch
packages/rp-pppoe/rp-pppoe_3.8.bb
Diffs:

#
# mt diff -r2fa2932e70b418af80252f58e45927c3a6f98be9 -re01aa57a064467dc10728a98320d6197fc050374
#
# 
# 
# add_dir "packages/rp-pppoe/rp-pppoe-3.8"
# 
# add_file "packages/rp-pppoe/rp-pppoe-3.8/configure_in_cross.patch"
#  content [e525fbd3c93e4c9b98a8fba1ca0c73ead7e403d4]
# 
# add_file "packages/rp-pppoe/rp-pppoe-3.8/pppoe-no-timeout.patch"
#  content [3151a2931021fe8bd10a919eeb183d0e6fc4c27a]
# 
# add_file "packages/rp-pppoe/rp-pppoe-3.8/pppoe-src-restrictions.patch"
#  content [a609cf119181bbf0ca535190d81cd604738096d7]
# 
# add_file "packages/rp-pppoe/rp-pppoe_3.8.bb"
#  content [a3828f0f926b651d5d2b49df5e6845f25bce3ec6]
# 
============================================================
--- packages/rp-pppoe/rp-pppoe-3.8/configure_in_cross.patch	e525fbd3c93e4c9b98a8fba1ca0c73ead7e403d4
+++ packages/rp-pppoe/rp-pppoe-3.8/configure_in_cross.patch	e525fbd3c93e4c9b98a8fba1ca0c73ead7e403d4
@@ -0,0 +1,86 @@
+--- rp-pppoe-3.8/src/configure.in	2007/04/30 07:21:25	1.1
++++ rp-pppoe-3.8/src/configure.in	2007/04/30 07:22:06
+@@ -5,6 +5,12 @@
+ dnl pppd directory for kernel-mode PPPoE
+ PPPD_DIR=ppp-2.4.1.pppoe2
+ 
++dnl hard code some paths
++PPPD=/usr/sbin/pppd
++ID=/usr/bin/id
++AC_ARG_VAR(PPPD)
++AC_ARG_VAR(ID)
++
+ AC_CONFIG_HEADER(config.h)
+ 
+ AC_PREFIX_DEFAULT(/usr)
+@@ -131,15 +137,10 @@
+ AC_CHECK_SIZEOF(unsigned int)
+ AC_CHECK_SIZEOF(unsigned long)
+ 
+-dnl Check for location of pppd
+-AC_PATH_PROG(PPPD, pppd, NOTFOUND, $PATH:/sbin:/usr/sbin:/usr/local/sbin)
+ AC_PATH_PROG(ECHO, echo, echo)
+ 
+-dnl Check for setsid (probably Linux-specific)
+-AC_PATH_PROG(SETSID, setsid, "", $PATH:/sbin:/usr/sbin:/usr/local/sbin)
+-
+ dnl Check for an "id" which accepts "-u" option -- hack for Solaris.
+-AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH)
++dnl AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH)
+ 
+ dnl Check for Linux-specific kernel support for PPPoE
+ AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
+@@ -183,44 +184,8 @@
+ 	CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -ansi"
+ fi
+ 
+-dnl If we couldn't find pppd, die
+-if test "$PPPD" = "NOTFOUND"; then
+-        AC_MSG_WARN([*** Oops!  I couldn't find pppd, the PPP daemon anywhere.])
+-	AC_MSG_WARN([*** You must install pppd, version 2.3.10 or later.])
+-	AC_MSG_WARN([*** I will keep going, but it may not work.])
+-	PPPD=pppd
+-fi
+-
+-dnl Figure out pppd version.  2.3.7 to 2.3.9 -- issue warning.  Less than
+-dnl 2.3.7 -- stop
+-
+-PPPD_VERSION=`$PPPD --version 2>&1 | awk ' /version/ {print $NF}'`
+-
+-case "$PPPD_VERSION" in
+-1.*|2.0.*|2.1.*|2.2.*|2.3.0|2.3.1|2.3.2|2.3.3|2.3.4|2.3.5|2.3.6)
+-	AC_MSG_WARN([*** Oops! Your version of pppd is $PPPD_VERSION, which is too old.])
+-	AC_MSG_WARN([*** You need at least 2.3.7 (2.3.10 or newer recommended.])
+-	AC_MSG_WARN([*** I will keep going, but it may not work.])
+-	;;
+-
+-2.3.7|2.3.8|2.3.9)
+-	AC_MSG_WARN([*** Warning.  Your version of pppd is $PPPD_VERSION.  You will])
+-	AC_MSG_WARN([*** not be able to use connect-on-demand.  Upgrade to pppd])
+-	AC_MSG_WARN([*** 2.3.10 or newer if you need connect-on-demand.])
+-	;;
+-
+-2*|3*|4*|5*|6*|7*|8*|9*)
+-	;;
+-
+-*)
+-	AC_MSG_WARN([*** Oops.  I cannot figure out what version of pppd you have.])
+-	AC_MSG_WARN([*** All I got back was '$PPPD_VERSION'])
+-	AC_MSG_WARN([*** I will keep going, but it may not work.])
+-	;;
+-esac
+-
+ dnl Figure out packing order of structures
+-AC_MSG_CHECKING([packing order of bit fields])
++AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[
+ AC_TRY_RUN([
+ union foo {
+     struct bar {
+@@ -245,6 +210,7 @@
+     }
+ }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
+ $ECHO "no defaults for cross-compiling"; exit 0)
++])
+ 
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ 	AC_MSG_RESULT(reversed)
============================================================
--- packages/rp-pppoe/rp-pppoe-3.8/pppoe-no-timeout.patch	3151a2931021fe8bd10a919eeb183d0e6fc4c27a
+++ packages/rp-pppoe/rp-pppoe-3.8/pppoe-no-timeout.patch	3151a2931021fe8bd10a919eeb183d0e6fc4c27a
@@ -0,0 +1,16 @@
+Don't time out and give up re-trying PPPoE. We want PPPD to control
+if we give up or not. From debian. This fixes lots of bugs and makes
+it compatible with the default debian version.
+
+
+--- rp-pppoe-3.8.orig/configs/pppoe.conf
++++ rp-pppoe-3.8/configs/pppoe.conf
+@@ -66,7 +66,7 @@
+ # to connect forever after pppoe-start is called.  Otherwise, it will
+ # give out after CONNECT_TIMEOUT seconds and will not attempt to
+ # connect again, making it impossible to reach.
+-CONNECT_TIMEOUT=30
++CONNECT_TIMEOUT=0
+ 
+ # How often in seconds pppoe-start polls to check if link is up
+ CONNECT_POLL=2
============================================================
--- packages/rp-pppoe/rp-pppoe-3.8/pppoe-src-restrictions.patch	a609cf119181bbf0ca535190d81cd604738096d7
+++ packages/rp-pppoe/rp-pppoe-3.8/pppoe-src-restrictions.patch	a609cf119181bbf0ca535190d81cd604738096d7
@@ -0,0 +1,18 @@
+Relax restrictions on the PPPoE src address, as per debian bug
+293811:
+
+  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=293811
+
+--- rp-pppoe-3.8.orig/src/discovery.c
++++ rp-pppoe-3.8/src/discovery.c
+@@ -376,8 +376,8 @@
+ 	if (!packetIsForMe(conn, &packet)) continue;
+ 
+ 	if (packet.code == CODE_PADO) {
+-	    if (NOT_UNICAST(packet.ethHdr.h_source)) {
+-		printErr("Ignoring PADO packet from non-unicast MAC address");
++	    if (BROADCAST(packet.ethHdr.h_source)) {
++		printErr("Ignoring broadcast PADO packet");
+ 		continue;
+ 	    }
+ 	    parsePacket(&packet, parsePADOTags, &pc);
============================================================
--- packages/rp-pppoe/rp-pppoe_3.8.bb	a3828f0f926b651d5d2b49df5e6845f25bce3ec6
+++ packages/rp-pppoe/rp-pppoe_3.8.bb	a3828f0f926b651d5d2b49df5e6845f25bce3ec6
@@ -0,0 +1,29 @@
+DESCRIPTION = "A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE = "http://www.roaringpenguin.com/en/penguin/openSourceProducts/rpPppoe"
+SECTION = "console/network"
+LICENSE = "GPLv2"
+RDEPENDS = "ppp"
+PR = "r0"
+
+SRC_URI = "http://www.roaringpenguin.com/files/download/${P}.tar.gz \
+           file://configure_in_cross.patch;patch=1;pnum=2 \
+           file://pppoe-src-restrictions.patch;patch=1;pnum=2"
+
+S = "${WORKDIR}/${P}/src"
+
+inherit autotools
+
+do_install() {
+        # Set timeout to 0. Fixes lots of reconnect issues
+        # Can't patch this in because it's outside of what we have {S} set to.
+        sed -i -e 's,\(CONNECT_TIMEOUT=\)30,\10,g' ${S}/../configs/pppoe.conf
+        # Install
+        oe_runmake -C ${S} RPM_INSTALL_ROOT=${D} docdir=${docdir} install
+}
+
+pkg_postinst() {
+    if [ x"$D" != "x" ]; then
+        exit 1
+    fi
+    chmod 4755 ${sbindir}/pppoe
+}






More information about the Openembedded-commits mailing list