diff options
| author | Li xin <lixin.fnst@cn.fujitsu.com> | 2015-06-05 16:49:02 +0800 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-06-05 19:05:40 -0400 |
| commit | 40639902b51f88d15de30cbe9c1d98ada4685486 (patch) | |
| tree | 8d02def7df45bdff7301a996735501521e0bf5f3 | |
| parent | 671304f007694b4329518aeb88e2f283fae75385 (diff) | |
| download | meta-openembedded-40639902b51f88d15de30cbe9c1d98ada4685486.tar.gz | |
rp-pppoe: add systemd support and fix error in the step of do_configure.
The error is as follows:
error: unrecognized command line option '-V'
conftest.c:9:28: fatal error: ac_nonexistent.h:
No such file or directory #include <ac_nonexistent.h>.
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
3 files changed, 82 insertions, 2 deletions
diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.8/configure.in-Error-fix.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.8/configure.in-Error-fix.patch new file mode 100644 index 0000000000..1e815f35d3 --- /dev/null +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.8/configure.in-Error-fix.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | From a546942a784a177080d9722dda873bfd7416ad41 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
| 3 | Date: Fri, 10 Apr 2015 13:13:06 +0900 | ||
| 4 | Subject: [PATCH] configure.in: Error fix. | ||
| 5 | |||
| 6 | the error is: conftest.c:9:28: fatal error: ac_nonexistent.h: | ||
| 7 | No such file or directory #include <ac_nonexistent.h> | ||
| 8 | |||
| 9 | Upstream-Status: pending | ||
| 10 | |||
| 11 | Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> | ||
| 12 | --- | ||
| 13 | src/configure.in | 28 ---------------------------- | ||
| 14 | 1 file changed, 28 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/src/configure.in b/src/configure.in | ||
| 17 | index c4f1a8c..74956cc 100644 | ||
| 18 | --- a/src/configure.in | ||
| 19 | +++ b/src/configure.in | ||
| 20 | @@ -183,34 +183,6 @@ if test "$GCC" = yes; then | ||
| 21 | CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -ansi" | ||
| 22 | fi | ||
| 23 | |||
| 24 | -dnl Figure out packing order of structures | ||
| 25 | -AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[ | ||
| 26 | -AC_TRY_RUN([ | ||
| 27 | -union foo { | ||
| 28 | - struct bar { | ||
| 29 | - unsigned int ver:4; | ||
| 30 | - unsigned int type:4; | ||
| 31 | - } bb; | ||
| 32 | - unsigned char baz; | ||
| 33 | -}; | ||
| 34 | - | ||
| 35 | -int | ||
| 36 | -main(void) | ||
| 37 | -{ | ||
| 38 | - union foo x; | ||
| 39 | - x.bb.ver = 1; | ||
| 40 | - x.bb.type = 2; | ||
| 41 | - if (x.baz == 0x21) { | ||
| 42 | - return 1; | ||
| 43 | - } else if (x.baz == 0x12) { | ||
| 44 | - return 0; | ||
| 45 | - } else { | ||
| 46 | - return 2; | ||
| 47 | - } | ||
| 48 | -}], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev, | ||
| 49 | -$ECHO "no defaults for cross-compiling"; exit 1) | ||
| 50 | -]) | ||
| 51 | - | ||
| 52 | if test "$rpppoe_cv_pack_bitfields" = "rev" ; then | ||
| 53 | AC_MSG_RESULT(reversed) | ||
| 54 | AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields]) | ||
| 55 | -- | ||
| 56 | 1.8.4.2 | ||
| 57 | |||
diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.8/pppoe-server.service b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.8/pppoe-server.service new file mode 100644 index 0000000000..41e0b9e851 --- /dev/null +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.8/pppoe-server.service | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=PPPOE Service | ||
| 3 | After=network.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=forking | ||
| 7 | EnvironmentFile=-@SYSCONFDIR@/default/pppoe-server | ||
| 8 | ExecStart=@SBINDIR@/pppoe-server | ||
| 9 | |||
| 10 | [Install] | ||
| 11 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.8.bb b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.8.bb index d1b0481b9e..f3bd994a05 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.8.bb +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.8.bb | |||
| @@ -16,12 +16,21 @@ SRC_URI = "http://www.roaringpenguin.com/files/download/${BP}.tar.gz \ | |||
| 16 | file://use-ldflags.patch \ | 16 | file://use-ldflags.patch \ |
| 17 | file://configure.patch \ | 17 | file://configure.patch \ |
| 18 | file://pppoe-server.default \ | 18 | file://pppoe-server.default \ |
| 19 | file://pppoe-server.init" | 19 | file://pppoe-server.init \ |
| 20 | file://configure.in-Error-fix.patch \ | ||
| 21 | file://pppoe-server.service" | ||
| 20 | 22 | ||
| 21 | SRC_URI[md5sum] = "0e32760f498f9cde44081ee6aafc823b" | 23 | SRC_URI[md5sum] = "0e32760f498f9cde44081ee6aafc823b" |
| 22 | SRC_URI[sha256sum] = "d916e9cfe1e62395f63a5361936fa855f6d0f0a37dc7227b394cdb725f553479" | 24 | SRC_URI[sha256sum] = "d916e9cfe1e62395f63a5361936fa855f6d0f0a37dc7227b394cdb725f553479" |
| 23 | 25 | ||
| 24 | inherit autotools-brokensep update-rc.d | 26 | inherit autotools-brokensep update-rc.d systemd |
| 27 | |||
| 28 | do_install_append() { | ||
| 29 | install -d ${D}${systemd_unitdir}/system | ||
| 30 | install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system | ||
| 31 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service | ||
| 32 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service | ||
| 33 | } | ||
| 25 | 34 | ||
| 26 | do_install() { | 35 | do_install() { |
| 27 | # Install init script and default settings | 36 | # Install init script and default settings |
| @@ -33,6 +42,9 @@ do_install() { | |||
| 33 | chmod 4755 ${D}${sbindir}/pppoe | 42 | chmod 4755 ${D}${sbindir}/pppoe |
| 34 | } | 43 | } |
| 35 | 44 | ||
| 45 | SYSTEMD_PACKAGES = "${PN}-server" | ||
| 46 | SYSTEMD_SERVICE_${PN}-server = "pppoe-server.service" | ||
| 47 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 36 | # Insert server package before main package | 48 | # Insert server package before main package |
| 37 | PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc" | 49 | PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc" |
| 38 | 50 | ||
