added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
From fdb64d21560bfdafeefccc7d20e105e4857faa99 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 28 Mar 2017 19:20:07 -0700
Subject: [PATCH] ppoe: Dont include linux/if_ether.h
Fixes build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/pppoe.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/pppoe.h b/src/pppoe.h
index ec067a0..281879c 100644
--- a/src/pppoe.h
+++ b/src/pppoe.h
@@ -127,10 +127,6 @@ typedef unsigned long UINT32_t;
#error Could not find a 32-bit integer type
#endif
-#ifdef HAVE_LINUX_IF_ETHER_H
-#include <linux/if_ether.h>
-#endif
-
#include <netinet/in.h>
#ifdef HAVE_NETINET_IF_ETHER_H

View File

@@ -0,0 +1,23 @@
From 31b6eecd7e5ebfb9a37915f28823e5af9d1062b4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 28 Mar 2017 19:24:53 -0700
Subject: [PATCH] Enable support for the kernel module
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/configure.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/configure.in b/src/configure.in
index cae0976..951a042 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -33,6 +33,7 @@ AC_CHECK_HEADERS(linux/if_pppox.h, [], [],
#include<net/ethernet.h>
#include<linux/if.h>
#include<linux/in.h>
+#include<linux/in6.h>
])
dnl Checks for typedefs, structures, and compiler characteristics.

View File

@@ -0,0 +1,19 @@
From c96dda04ec024bdef2a15d374e5f8242e041cad4 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Fri, 18 Jul 2014 08:25:16 +0000
---
configure.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index ac1a7e4..11b9f31 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-AC_INIT(src/pppoe.c)
-AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
+AC_INIT([rp-pppoe], [3.8])
+AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SUBDIRS(src)
AC_OUTPUT(Makefile)

View File

@@ -0,0 +1,133 @@
From 172907f31d64da4c3f289a439fd605d2ab51b24a Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Wed, 19 Aug 2015 12:17:03 +0900
Subject: [PATCH] configure in cross
Update the configure script to cross-compiling with OE. This hard-codes
a few target paths, reworks a few tests to be more friendly for cross
and drops other tests.
Upstream-Status: Inappropriate [build system specific changes]
---
src/configure.in | 62 ++++++++++--------------------------------------
1 file changed, 12 insertions(+), 50 deletions(-)
diff --git a/src/configure.in b/src/configure.in
index 4add50c..9dff457 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -5,6 +5,13 @@ AC_INIT(pppoe.c)
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
+ECHO=/bin/echo
+AC_ARG_VAR(PPPD)
+AC_ARG_VAR(ID)
+
AC_CONFIG_HEADER(config.h)
AC_PREFIX_DEFAULT(/usr)
@@ -45,7 +52,7 @@ ac_cv_struct_sockaddr_ll=no)
AC_MSG_RESULT($ac_cv_struct_sockaddr_ll)
if test "$ac_cv_struct_sockaddr_ll" = yes ; then
-AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL)
+AC_DEFINE([HAVE_STRUCT_SOCKADDR_LL], [], [Have struct SOCKADDR_LL])
fi
dnl Check for N_HDLC line discipline
@@ -58,7 +65,7 @@ AC_TRY_COMPILE([
ac_cv_n_hdlc=no)
AC_MSG_RESULT($ac_cv_n_hdlc)
if test "$ac_cv_n_hdlc" = yes ; then
-AC_DEFINE(HAVE_N_HDLC)
+AC_DEFINE([HAVE_N_HDLC], [], [Have N_HDLC])
fi
AC_ARG_ENABLE(plugin, [ --enable-plugin=pppd_src_path build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
@@ -106,7 +113,7 @@ PPPD_INCDIR=""
if test "$ac_cv_header_linux_if_pppox_h" = yes ; then
if test "$ac_cv_pluginpath" != no ; then
LINUX_KERNELMODE_PLUGIN=rp-pppoe.so
- AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE)
+ AC_DEFINE([HAVE_LINUX_KERNEL_PPPOE], [], [Have kernel PPPoE])
PPPD_INCDIR=$ac_cv_pluginpath
fi
fi
@@ -116,7 +123,7 @@ if test "$PPPD_INCDIR" = "" ; then
fi
if test "$ac_cv_debugging" = "yes" ; then
- AC_DEFINE(DEBUGGING_ENABLED)
+ AC_DEFINE([DEBUGGING_ENABLED], [], [Debugging enabled])
fi
AC_SUBST(LINUX_KERNELMODE_PLUGIN)
@@ -142,17 +149,8 @@ AC_CHECK_SIZEOF(unsigned short)
AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(unsigned long)
-dnl Check for location of ip
-AC_PATH_PROG(IP, ip, NOTFOUND, $PATH:/bin:/sbin:/usr/bin:/usr/sbin)
-
-dnl Check for location of pppd
-AC_PATH_PROG(PPPD, pppd, NOTFOUND, $PATH:/sbin:/usr/sbin:/usr/local/sbin)
-
-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)
@@ -195,42 +193,6 @@ if test "$GCC" = yes; then
CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes"
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
-
# Sigh... got to fix this up for tcl
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
--
2.34.1

View File

@@ -0,0 +1,25 @@
From f658181c58347c3e2b0ee4f0a6a3d19162921471 Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Tue, 12 Jun 2012 14:26:16 -0400
Subject: [PATCH] discard use of dnl in Makefile.am
Since Makefile.am is not processed by m4, but by automake, 'dnl' does
not introduce a comment.
Signed-off-by: Ting Liu <b28495@freescale.com>
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index eff6977..3091c33 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
PACKAGE = rp-pppoe
VERSION = 3.8
-dnl AM_CFLAGS = -Wall -DDEBUG
+##dnl AM_CFLAGS = -Wall -DDEBUG
SUBDIRS = src

View File

@@ -0,0 +1,22 @@
# PPPoE Server options
# Maximum segment size, not used for in kernel PPPoE
#MSS=1412
# Device(s) - Space seperated list of devices to listen on
#DEVICES="eth1"
# Local IP
#LOCAL_IP=10.0.0.1
# Starting remote IP
#REMOTE_IP=10.67.15.1
# Service name
#SERVICE_NAME="acme"
# Maximum number of sessions, default is 16
#MAX_SESSIONS=64
# Access concentrator name, default is the hostname
#ACCESS_CONCENTRATOR_NAME="pppoe-rtr-1"

View File

@@ -0,0 +1,59 @@
#! /bin/sh
test -f /usr/sbin/pppoe-server || exit 0
test -f /etc/default/pppoe-server && . /etc/default/pppoe-server
case $1 in
start)
OPTIONS=""
if [ -n "$MSS" ]; then
OPTIONS="$OPTIONS -m $MSS"
fi
if [ -n "$DEVICES" ]; then
for i in $DEVICES; do
OPTIONS="$OPTIONS -I $i"
done
fi
if [ -n "$LOCAL_IP" ]; then
OPTIONS="$OPTIONS -L $LOCAL_IP"
fi
if [ -n "$REMOTE_IP" ]; then
OPTIONS="$OPTIONS -R $REMOTE_IP"
fi
if [ -n "$SERVICE_NAME" ]; then
OPTIONS="$OPTIONS -S $SERVICE_NAME"
fi
if [ -n "$MAX_SESSIONS" ]; then
OPTIONS="$OPTIONS -N $MAX_SESSIONS"
fi
if [ -n "$ACCESS_CONCENTRATOR_NAME" ]; then
OPTIONS="$OPTIONS -C $ACCESS_CONCENTRATOR_NAME"
fi
echo -n "Starting PPPoE server: pppoe-server"
start-stop-daemon --start --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
echo "."
;;
stop)
echo -n "Stopping PPPoE server: pppoe-server"
start-stop-daemon --stop --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
echo "."
;;
status)
pid=$(pidof pppoe-server)
if [ -n "$pid" ] ; then
echo "Running with pid $pid"
else
echo "Not running"
fi
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/pppoe-server {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,11 @@
[Unit]
Description=PPPOE Service
After=network.target
[Service]
Type=forking
EnvironmentFile=-@SYSCONFDIR@/default/pppoe-server
ExecStart=@SBINDIR@/pppoe-server
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,41 @@
From 0b62f71eb5d44d4a57103566ba58022b6304fa4f Mon Sep 17 00:00:00 2001
From: Tom Rini <tom_rini@mentor.com>
Date: Wed, 27 Jul 2011 03:46:52 +0000
Subject: [PATCH] rp-pppoe: Port from oe.dev
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.
Upstream-Status: Inappropriate [build system specific change]
---
Makefile.am | 5 +++++
configure.in | 4 ++++
2 files changed, 9 insertions(+)
create mode 100644 Makefile.am
create mode 100644 configure.in
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..eff6977
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
+PACKAGE = rp-pppoe
+VERSION = 3.8
+
+dnl AM_CFLAGS = -Wall -DDEBUG
+SUBDIRS = src
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..ac1a7e4
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,4 @@
+AC_INIT(src/pppoe.c)
+AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
+AC_CONFIG_SUBDIRS(src)
+AC_OUTPUT(Makefile)

View File

@@ -0,0 +1,41 @@
From 4d34e0d7d790ec41b0afb731c7dc1b1ee90dd377 Mon Sep 17 00:00:00 2001
From: Tom Rini <tom_rini@mentor.com>
Date: Wed, 27 Jul 2011 03:46:52 +0000
Subject: [PATCH] rp-pppoe: Port from oe.dev
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.
Upstream-Status: Inappropriate [configuration]
---
configs/pppoe.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configs/pppoe.conf b/configs/pppoe.conf
index c222b2f..65618a5 100644
--- a/configs/pppoe.conf
+++ b/configs/pppoe.conf
@@ -66,7 +66,7 @@ DEFAULTROUTE=yes
# 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 @@ PPPOE_TIMEOUT=80
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

View File

@@ -0,0 +1,78 @@
SUMMARY = "A user-mode PPPoE client and server suite for Linux"
HOMEPAGE = "http://www.roaringpenguin.com/products/pppoe"
SECTION = "net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581"
PR = "r11"
SRC_URI = "https://dianne.skoll.ca/projects/rp-pppoe/download/OLD/rp-pppoe-${PV}.tar.gz \
file://top-autoconf.patch \
file://configure_in_cross.patch \
file://update-config.patch \
file://discard-use-of-dnl-in-Makefile.am.patch \
file://configure.patch \
file://pppoe-server.default \
file://pppoe-server.init \
file://pppoe-server.service \
file://0001-ppoe-Dont-include-linux-if_ether.h.patch \
file://0002-Enable-support-for-the-kernel-module.patch \
"
SRC_URI[sha256sum] = "b1f318bc7e4e5b0fd8a8e23e8803f5e6e43165245a5a10a7162a92a6cf17829a"
inherit autotools-brokensep update-rc.d systemd
CACHED_CONFIGUREVARS += "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', 'rpppoe_cv_pack_bitfields=normal', 'rpppoe_cv_pack_bitfields=rev', d)}"
# Needed for strlcpy()
CFLAGS += "-D_GNU_SOURCE"
do_install:append() {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system
sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
install -d ${D}${datadir}/doc/${PN}
if [ -f ${D}${datadir}/doc/README ]; then
mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
fi
}
do_install() {
# 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
install -m 0755 ${WORKDIR}/pppoe-server.init ${D}${sysconfdir}/init.d/pppoe-server
# Install
oe_runmake -C ${S} DESTDIR=${D} docdir=${docdir} install
chmod 4755 ${D}${sbindir}/pppoe
}
SYSTEMD_PACKAGES = "${PN}-server"
SYSTEMD_SERVICE:${PN}-server = "pppoe-server.service"
SYSTEMD_AUTO_ENABLE = "disable"
# Insert server package before main package
PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc"
FILES:${PN}-server = "${sysconfdir}/default/pppoe-server \
${sysconfdir}/init.d/pppoe-server \
${sbindir}/pppoe-server \
${sysconfdir}/ppp/pppoe-server-options"
FILES:${PN}-relay = "${sbindir}/pppoe-relay"
FILES:${PN}-sniff = "${sbindir}/pppoe-sniff"
CONFFILES:${PN} = "${sysconfdir}/ppp/pppoe.conf \
${sysconfdir}/ppp/firewall-standalone \
${sysconfdir}/ppp/firewall-masq"
CONFFILES:${PN}-server = "${sysconfdir}/ppp/pppoe-server-options \
${sysconfdir}/default/pppoe-server"
INITSCRIPT_PACKAGES = "${PN}-server"
INITSCRIPT_NAME:${PN}-server = "pppoe-server"
INITSCRIPT_PARAMS:${PN}-server = "defaults 92 8"
RDEPENDS:${PN} = "ppp"
RDEPENDS:${PN}-server = "${PN}"
RRECOMMENDS:${PN} = "ppp-oe"