[oe-commits] org.oe.dev rp-pppoe 3.8: Fix issues caused by autoconf needing to run in the src

lenehan commit openembedded-commits at lists.openembedded.org
Fri Jun 8 06:19:42 UTC 2007


rp-pppoe 3.8: Fix issues caused by autoconf needing to run in the src
subdirectory of the source code. The OE autotools.bbclass runs the autoconf
stuff in ${S}, so you need to change ${S} to the src subdirectory to get it
to work. But ${S} is also where patches are appplied, so you can't patch the
config files and other things which aren't in the src directory. So add some
autoconf at the top level which just says there's a sub-autoconf project in
the src subdirectory, fix up the patches, remove the sed hacks and add a new
patch to do what the sed hacks were doing before.

Author: lenehan at openembedded.org
Branch: org.openembedded.dev
Revision: 0bb26a96930655b4ff4a1ce04d2e989a87f07e7c
ViewMTN: http://monotone.openembedded.org/revision.psp?id=0bb26a96930655b4ff4a1ce04d2e989a87f07e7c
Files:
1
packages/rp-pppoe/rp-pppoe-3.8/top-autoconf.patch
packages/rp-pppoe/rp-pppoe-3.8/update-config.patch
packages/rp-pppoe/rp-pppoe_3.8.bb
Diffs:

#
# mt diff -rc6fbef1bf07ff4d4f87bb5eb9112c008a45285c1 -r0bb26a96930655b4ff4a1ce04d2e989a87f07e7c
#
# 
# 
# add_file "packages/rp-pppoe/rp-pppoe-3.8/top-autoconf.patch"
#  content [2c90d9ced0f2be952e0fa6940f88b50b2e707ea1]
# 
# add_file "packages/rp-pppoe/rp-pppoe-3.8/update-config.patch"
#  content [89b7239097ce86ce321e4b4bce447cc6bbfed856]
# 
# patch "packages/rp-pppoe/rp-pppoe_3.8.bb"
#  from [9500041e7b54eda0efc12ac5860267c5dd8e2231]
#    to [f5e17a83e7c06f8fad1294aae082fe09b0585f8d]
# 
============================================================
--- packages/rp-pppoe/rp-pppoe-3.8/top-autoconf.patch	2c90d9ced0f2be952e0fa6940f88b50b2e707ea1
+++ packages/rp-pppoe/rp-pppoe-3.8/top-autoconf.patch	2c90d9ced0f2be952e0fa6940f88b50b2e707ea1
@@ -0,0 +1,25 @@
+The autoconf stuff is all in a subdirectory, which is rather annoying
+as OE expects patches to be applied and autoconf stuff to be done in
+S. This adds enough autoconf at the top level to allow it to be
+called there - all it does is run a sub autoconf stuff in the src
+directory.
+
+Index: rp-pppoe-3.8/Makefile.am
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ rp-pppoe-3.8/Makefile.am	2007-06-08 15:58:16.000000000 +1000
+@@ -0,0 +1,5 @@
++PACKAGE = rp-pppoe
++VERSION = 3.8
++
++dnl AM_CFLAGS = -Wall -DDEBUG
++SUBDIRS = src
+Index: rp-pppoe-3.8/configure.in
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ rp-pppoe-3.8/configure.in	2007-06-08 15:58:16.000000000 +1000
+@@ -0,0 +1,4 @@
++AC_INIT(src/pppoe.c)
++AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
++AC_CONFIG_SUBDIRS(src)
++AC_OUTPUT(Makefile)
============================================================
--- packages/rp-pppoe/rp-pppoe-3.8/update-config.patch	89b7239097ce86ce321e4b4bce447cc6bbfed856
+++ packages/rp-pppoe/rp-pppoe-3.8/update-config.patch	89b7239097ce86ce321e4b4bce447cc6bbfed856
@@ -0,0 +1,30 @@
+Set the timeout to 0 since we don't want pppoe to try reconnecting,
+we want whatever is calling it to reconnect. Lots of odd things
+happen when you have pppoe retrying itself.
+
+The path for the plugin is wrong, it's now part of ppp and is in a
+ppp's plugin lib directory. If no path is specified then that's where
+ppp looks, so that's what we do here.
+
+Index: rp-pppoe-3.8/configs/pppoe.conf
+===================================================================
+--- rp-pppoe-3.8.orig/configs/pppoe.conf	2006-04-03 00:29:41.000000000 +1000
++++ rp-pppoe-3.8/configs/pppoe.conf	2007-06-08 16:02:47.000000000 +1000
+@@ -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
+@@ -115,7 +115,7 @@
+ FIREWALL=NONE
+ 
+ # Linux kernel-mode plugin for pppd.  If you want to try the kernel-mode
+-# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
++# plugin, use LINUX_PLUGIN=rp-pppoe.so
+ LINUX_PLUGIN=
+ 
+ # Any extra arguments to pass to pppoe.  Normally, use a blank string
============================================================
--- packages/rp-pppoe/rp-pppoe_3.8.bb	9500041e7b54eda0efc12ac5860267c5dd8e2231
+++ packages/rp-pppoe/rp-pppoe_3.8.bb	f5e17a83e7c06f8fad1294aae082fe09b0585f8d
@@ -5,25 +5,21 @@ RRECOMMENDS_${PN} = "ppp-oe"
 RDEPENDS_${PN} = "ppp"
 RDEPENDS_${PN}-server = "${PN}"
 RRECOMMENDS_${PN} = "ppp-oe"
-PR = "r3"
+PR = "r4"
 
 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 \
+           file://top-autoconf.patch;patch=1 \
+           file://configure_in_cross.patch;patch=1 \
+           file://pppoe-src-restrictions.patch;patch=1 \
+           file://update-config.patch;patch=1 \
            file://pppoe-server.default \
            file://pppoe-server.init"
 
-S = "${WORKDIR}/${P}/src"
+S = "${WORKDIR}/${P}"
 
 inherit autotools update-rc.d
 
 do_install() {
-        # Set timeout to 0. Fixes lots of reconnect issues
-        # No need for full path to the PPPoE plugin, and it's in a different 
-        # 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' \
-               -e 's,\(LINUX_PLUGIN=\)/etc/ppp/plugins/rp-pppoe.so,\1rp-pppoe.so,g' \
-               ${S}/../configs/pppoe.conf
         # Install init script and default settings
         install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d
         install -m 0644 ${WORKDIR}/pppoe-server.default ${D}${sysconfdir}/default/pppoe-server






More information about the Openembedded-commits mailing list