public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-dialup/rp-pppoe/files/, net-dialup/rp-pppoe/
@ 2018-11-28 12:16 Lars Wendler
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Wendler @ 2018-11-28 12:16 UTC (permalink / raw
  To: gentoo-commits

commit:     6941c29b3715e56592141a6d59dbe355a529f8e5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 12:13:58 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 12:15:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6941c29b

net-dialup/rp-pppoe: Bump to version 3.13

Added pppoe-server init script.
Thanks to Oleg Gawriloff <barzog <AT> telecom.by> for providing the script
and the config file.

Closes: https://bugs.gentoo.org/258515
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-dialup/rp-pppoe/Manifest                       |   1 +
 net-dialup/rp-pppoe/files/pppoe-server.confd       |  10 ++
 net-dialup/rp-pppoe/files/pppoe-server.initd       |   9 ++
 .../rp-pppoe/files/rp-pppoe-3.13-autotools.patch   | 110 ++++++++++++++++++++
 .../files/rp-pppoe-3.13-linux-headers.patch        |  25 +++++
 net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild           | 111 +++++++++++++++++++++
 6 files changed, 266 insertions(+)

diff --git a/net-dialup/rp-pppoe/Manifest b/net-dialup/rp-pppoe/Manifest
index ffdf948661e..1644caa4947 100644
--- a/net-dialup/rp-pppoe/Manifest
+++ b/net-dialup/rp-pppoe/Manifest
@@ -1,3 +1,4 @@
 DIST ppp-2.4.7.tar.gz 688117 BLAKE2B e1c94ce31d98674536929d19e956e4013eb2b02c20c34e6184c0b99b50262ad1cd7fb6f4a1ed302872527a0c164af340e15ad1e2eaf191392c3f6ae2de21f5dd SHA512 e34ce24020af6a73e7a26c83c4f73a9c83fa455b7b363794dba27bf01f70368be06bff779777843949bd77f4bc9385d6ad455ea48bf8fff4e0d73cc8fef16ae2
 DIST rp-pppoe-3.11.tar.gz 223234 BLAKE2B 48a733f2b454284934a123383c32484e5715f131dd45e78a1dd8844dc7e9da74a62f2d4e144b8d57e30652be6eefef480d88a7b61fade7312a47ea750ddcbcda SHA512 cb9579ad94f6b6cfd709e8061aacac0a007f1f58ffd50bd0603f5a2b612c0cf4831febdbfeee290b97932fd30f8ae7f707d532a291124c4aeae2333131d53905
 DIST rp-pppoe-3.12.tar.gz 224125 BLAKE2B 27fe75e794624acaeb81806d67a6f4e5601a6b6a466100898ae3cccc8acb5f72ad9275fecd28735df1b01162ff0e60b74ad0373a24a60c7a5731b0744b86e019 SHA512 1b9e4c806fcbad1bc21f7b74a780ae98682b10a69d91fb08df6dbd1fff86f6271995ebded43f926f8249a17cdddb541edccbbb3ee28e1a2dc89173ad61cd3de1
+DIST rp-pppoe-3.13.tar.gz 224204 BLAKE2B 8ac3cd59c809f7f2e10fea580dfbda20fc99ae443851513cdc6d0ba8e8df848d7bd6f10d2b0ac6592bc4b48ee1945c299d3cbd73eb9dd6ddc23d0c1c39cd1b77 SHA512 e29ddc39252a0e71d509096e275f6f195f86a5871052dd558e8fb174d13086b1c601e6652f45619279a1eb2fbda96ba0ec85dea9edb27459af56ded4a52b5f36

diff --git a/net-dialup/rp-pppoe/files/pppoe-server.confd b/net-dialup/rp-pppoe/files/pppoe-server.confd
new file mode 100644
index 00000000000..bb5b2e9088d
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/pppoe-server.confd
@@ -0,0 +1,10 @@
+#Multiple interfaces allowed. Example: PPPOE_INTERFACE="vlan10 -I vlan11 -I vlan12" and so on.
+#Multiple interfaces allowed. Example: PPPOE_INTERFACE="vlan10 -I vlan11 -I vlan12" and so on.
+
+#PPPOE_INTERFACE=<interface name>
+#AC_NAME=<AC Name>
+#SERVICE_NAME=<Service Name>
+#MAX_SESSIONS=<Max PPPoE Sessions>
+#MAX_SESESSION_PER_MAC=<Max PPPoE Sessions per MAC>
+#LOCAL_IP=<PPP Local IP Addr>
+#OTHER_OPTIONS="-p /etc/ppp/ip-pools"

diff --git a/net-dialup/rp-pppoe/files/pppoe-server.initd b/net-dialup/rp-pppoe/files/pppoe-server.initd
new file mode 100644
index 00000000000..39caee9d761
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/pppoe-server.initd
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="rp-pppoe server"
+pidfile="/run/pppoe-server.pid"
+command="/usr/sbin/pppoe-server"
+command_args="-I ${PPPOE_INTERFACE:-eth0} -C ${AC_NAME:-$(hostname)} -S ${SERVICE_NAME:-default} -N ${MAX_SESSIONS:-64} -x ${MAX_SESESSION_PER_MAC:-1} -L ${LOCAL_IP:-10.0.0.1.} -k -F ${OTHER_OPTIONS}"
+command_background="true"

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch
new file mode 100644
index 00000000000..d098de8cdbc
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch
@@ -0,0 +1,110 @@
+--- rp-pppoe-3.13/gui/Makefile.in
++++ rp-pppoe-3.13/gui/Makefile.in
+@@ -46,7 +46,7 @@
+ 	-mkdir -p $(DESTDIR)$(sbindir)
+ 	-mkdir -p $(DESTDIR)$(bindir)
+ 	-mkdir -p $(DESTDIR)/etc/ppp/rp-pppoe-gui
+-	$(install) -m 4755 -s pppoe-wrapper $(DESTDIR)$(sbindir)
++	$(install) -m 4755 pppoe-wrapper $(DESTDIR)$(sbindir)
+ 	$(install) -m 755 tkpppoe $(DESTDIR)$(bindir)
+ 	-mkdir -p $(DESTDIR)$(mandir)/man1
+ 	$(install) -m 644 pppoe-wrapper.1 $(DESTDIR)$(mandir)/man1
+--- rp-pppoe-3.13/src/configure.in
++++ rp-pppoe-3.13/src/configure.in
+@@ -45,7 +45,7 @@
+ 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, 1, [Define if you have struct sockaddr_ll])
+ fi
+ 
+ dnl Check for N_HDLC line discipline
+@@ -58,7 +58,7 @@
+ 	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, 1, [Define if you have the N_HDLC line discipline in linux/termios.h])
+ fi
+ 
+ AC_ARG_ENABLE(plugin, [  --enable-plugin=pppd_src_path   build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
+@@ -106,7 +106,7 @@
+ 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, 1, [Define if you have kernel-mode PPPoE in Linux file])
+ 		PPPD_INCDIR=$ac_cv_pluginpath
+ 	fi
+ fi
+@@ -116,7 +116,7 @@
+ fi
+ 
+ if test "$ac_cv_debugging" = "yes" ; then
+-   AC_DEFINE(DEBUGGING_ENABLED)
++   AC_DEFINE(DEBUGGING_ENABLED, 1, [Define to include debugging code])
+ fi
+ 
+ AC_SUBST(LINUX_KERNELMODE_PLUGIN)
+@@ -156,15 +156,15 @@
+ AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
+ AC_CACHE_VAL(ac_cv_linux_kernel_pppoe,[
+ if test "`uname -s`" = "Linux" ; then
+-if test $cross_compiling = "no"; then
++dnl if test $cross_compiling = "no"; then
+ 
+ dnl Do a bunch of modprobes.  Can't hurt; might help.
+-modprobe ppp_generic > /dev/null 2>&1
+-modprobe ppp_async > /dev/null 2>&1
+-modprobe n_hdlc > /dev/null 2>&1
+-modprobe ppp_synctty > /dev/null 2>&1
+-modprobe pppoe > /dev/null 2>&1
+-fi
++dnl modprobe ppp_generic > /dev/null 2>&1
++dnl modprobe ppp_async > /dev/null 2>&1
++dnl modprobe n_hdlc > /dev/null 2>&1
++dnl modprobe ppp_synctty > /dev/null 2>&1
++dnl modprobe pppoe > /dev/null 2>&1
++dnl fi
+ AC_TRY_RUN([#include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <linux/if_pppox.h>
+@@ -204,7 +204,7 @@
+ 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}'`
++PPPD_VERSION=$PPPD_VER
+ 
+ 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)
+@@ -260,7 +260,7 @@
+ 
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ 	AC_MSG_RESULT(reversed)
+-	AC_DEFINE(PACK_BITFIELDS_REVERSED)
++	AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order])
+ else
+ 	AC_MSG_RESULT(normal)
+ fi
+--- rp-pppoe-3.13/src/plugin.c
++++ rp-pppoe-3.13/src/plugin.c
+@@ -24,7 +24,6 @@
+ *
+ ***********************************************************************/
+ 
+-#define _GNU_SOURCE 1
+ #include "pppoe.h"
+ 
+ #include "pppd/pppd.h"
+--- rp-pppoe-3.13/src/relay.c
++++ rp-pppoe-3.13/src/relay.c
+@@ -14,7 +14,6 @@
+ * $Id$
+ *
+ ***********************************************************************/
+-#define _GNU_SOURCE 1 /* For SA_RESTART */
+ #include "config.h"
+ 
+ #include <sys/socket.h>

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch
new file mode 100644
index 00000000000..1ee989dce87
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch
@@ -0,0 +1,25 @@
+the linux headers have started adding shims to not define types or structs
+when C lib headers are active, but in order to work, the C lib headers have
+to be included before the linux headers.
+
+move the netinet/in.h include up above the linux/ includes.
+
+Mike Frysinger <vapier@gentoo.org>
+
+--- rp-pppoe-3.13/src/pppoe.h
++++ rp-pppoe-3.13/src/pppoe.h
+@@ -120,12 +120,12 @@
+ #error Could not find a 32-bit integer type
+ #endif
+ 
++#include <netinet/in.h>
++
+ #ifdef HAVE_LINUX_IF_ETHER_H
+ #include <linux/if_ether.h>
+ #endif
+ 
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+ 

diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild
new file mode 100644
index 00000000000..5a62bbd8569
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic readme.gentoo-r1
+
+PPP_P="ppp-2.4.7"
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="https://www.roaringpenguin.com/products/pppoe"
+SRC_URI="https://dianne.skoll.ca/projects/rp-pppoe/download/${P}.tar.gz
+	https://www.samba.org/ftp/pub/ppp/${PPP_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="tk"
+
+RDEPEND="
+	net-dialup/ppp:=
+	tk? ( dev-lang/tk:= )
+"
+DEPEND=">=sys-kernel/linux-headers-2.6.25
+	${RDEPEND}"
+
+DOC_CONTENTS="Use pppoe-setup to configure your dialup connection"
+
+pkg_setup() {
+	# This is needed in multiple phases
+	PPPD_VER=$(best_version net-dialup/ppp)
+	PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+	PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV}
+}
+
+PATCHES=(
+	# Patch to enable integration of pppoe-start and pppoe-stop with
+	# baselayout-1.11.x so that the pidfile can be found reliably per interface
+	"${FILESDIR}/${PN}-3.10-gentoo-netscripts.patch"
+
+	"${FILESDIR}/${PN}-3.10-username-charset.patch" # bug 82410
+	"${FILESDIR}/${PN}-3.10-plugin-options.patch"
+	"${FILESDIR}/${PN}-3.13-autotools.patch"
+	"${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch"
+	"${FILESDIR}/${PN}-3.11-gentoo.patch"
+	"${FILESDIR}/${PN}-3.11-kmode.patch" #364941
+	"${FILESDIR}/${PN}-3.13-linux-headers.patch"
+	"${FILESDIR}/${PN}-3.12-ifconfig-path.patch" #602344
+)
+
+src_prepare() {
+	if has_version '<sys-kernel/linux-headers-2.6.35' ; then
+		PATCHES+=(
+			"${FILESDIR}/${PN}-3.10-linux-headers.patch" #334197
+		)
+	fi
+
+	default
+
+	cd "${S}"/src || die
+	eautoreconf
+}
+
+src_configure() {
+	addpredict /dev/ppp
+
+	cd "${S}/src" || die
+	# PPPD_VER variable is required for correct pppd detection
+	# This was added through the rp-pppoe-*-autotools.patch
+	econf PPPD_VER="${PPPD_VER}" --enable-plugin=../../ppp-${PPPD_VER}
+}
+
+src_compile() {
+	cd "${S}/src" || die
+	emake
+
+	if use tk; then
+		emake -C "${S}/gui" || die "gui make failed"
+	fi
+}
+
+src_install () {
+	cd "${S}/src" || die
+	emake DESTDIR="${D}" install #docdir=/usr/share/doc/${PF} install
+
+	#Don't use compiled rp-pppoe plugin - see pkg_preinst below
+	local pppoe_plugin="${ED%/}/etc/ppp/plugins/rp-pppoe.so"
+	if [ -f "${pppoe_plugin}" ] ; then
+		rm "${pppoe_plugin}" || die
+	fi
+
+	if use tk; then
+		emake -C "${S}/gui" \
+			DESTDIR="${D}" \
+			datadir=/usr/share/doc/${PF}/ \
+			install
+		dosym doc/${PF}/tkpppoe /usr/share/tkpppoe
+	fi
+
+	newinitd "${FILESDIR}"/pppoe-server.initd pppoe-server
+	newconfd "${FILESDIR}"/pppoe-server.confd pppoe-server
+
+	readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+	# Use the rp-pppoe plugin that comes with net-dialup/pppd
+	if [ -n "${PPPD_VER}" ] && [ -f "${EROOT%/}/usr/lib/pppd/${PPPD_VER}/rp-pppoe.so" ] ; then
+		dosym ../../../usr/lib/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so
+	fi
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dialup/rp-pppoe/files/, net-dialup/rp-pppoe/
@ 2021-05-06 10:53 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2021-05-06 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     ee9e01b9f38f0b2ee0ca46d7b479b978ee748ae3
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu May  6 10:53:07 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu May  6 10:53:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee9e01b9

net-dialup/rp-pppoe: Remove old 3.12-r1, 3.13

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 net-dialup/rp-pppoe/Manifest                       |   3 -
 .../rp-pppoe/files/rp-pppoe-3.10-autotools.patch   | 115 ----------------
 .../files/rp-pppoe-3.10-gentoo-netscripts.patch    | 150 ---------------------
 .../files/rp-pppoe-3.10-linux-headers.patch        |  31 -----
 .../files/rp-pppoe-3.10-plugin-options.patch       |  39 ------
 .../rp-pppoe-3.10-posix-source-sigaction.patch     |  18 ---
 .../files/rp-pppoe-3.10-username-charset.patch     |  58 --------
 .../rp-pppoe/files/rp-pppoe-3.11-gentoo.patch      |  11 --
 .../rp-pppoe/files/rp-pppoe-3.11-kmode.patch       |  10 --
 .../files/rp-pppoe-3.12-ifconfig-path.patch        |  65 ---------
 .../files/rp-pppoe-3.12-linux-headers.patch        |  28 ----
 .../rp-pppoe/files/rp-pppoe-3.13-autotools.patch   | 110 ---------------
 .../files/rp-pppoe-3.13-linux-headers.patch        |  25 ----
 net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild        | 106 ---------------
 net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild           | 111 ---------------
 15 files changed, 880 deletions(-)

diff --git a/net-dialup/rp-pppoe/Manifest b/net-dialup/rp-pppoe/Manifest
index 81e6d6cafff..dbedaee9e47 100644
--- a/net-dialup/rp-pppoe/Manifest
+++ b/net-dialup/rp-pppoe/Manifest
@@ -1,6 +1,3 @@
-DIST ppp-2.4.7.tar.gz 688117 BLAKE2B e1c94ce31d98674536929d19e956e4013eb2b02c20c34e6184c0b99b50262ad1cd7fb6f4a1ed302872527a0c164af340e15ad1e2eaf191392c3f6ae2de21f5dd SHA512 e34ce24020af6a73e7a26c83c4f73a9c83fa455b7b363794dba27bf01f70368be06bff779777843949bd77f4bc9385d6ad455ea48bf8fff4e0d73cc8fef16ae2
 DIST ppp-2.4.8.tar.gz 697530 BLAKE2B 235114288699db45501bc7d9ce8f36c0b5684ab0dab09da93d7f2b4f7c3eca030ae26e34dfff25efa971374fbd7fde62f121ea6aa69872658f44c5ac8c7850a2 SHA512 a99b3b6c7bd80cd133bda4e29d33c793a76f3b67e1f8db774547e88932ce29564fad390a4f51d3fe30a75e006499b95000b042ae0f64cd360548426f8091a478
-DIST rp-pppoe-3.12.tar.gz 224125 BLAKE2B 27fe75e794624acaeb81806d67a6f4e5601a6b6a466100898ae3cccc8acb5f72ad9275fecd28735df1b01162ff0e60b74ad0373a24a60c7a5731b0744b86e019 SHA512 1b9e4c806fcbad1bc21f7b74a780ae98682b10a69d91fb08df6dbd1fff86f6271995ebded43f926f8249a17cdddb541edccbbb3ee28e1a2dc89173ad61cd3de1
-DIST rp-pppoe-3.13.tar.gz 224204 BLAKE2B 8ac3cd59c809f7f2e10fea580dfbda20fc99ae443851513cdc6d0ba8e8df848d7bd6f10d2b0ac6592bc4b48ee1945c299d3cbd73eb9dd6ddc23d0c1c39cd1b77 SHA512 e29ddc39252a0e71d509096e275f6f195f86a5871052dd558e8fb174d13086b1c601e6652f45619279a1eb2fbda96ba0ec85dea9edb27459af56ded4a52b5f36
 DIST rp-pppoe-3.14-patches-01.tar.xz 4708 BLAKE2B d0c294490f5c4c8f3f81fccb8234d5eec2257350a41206bf05882aa7e2aa0e2cb0944a962d77e23451f604376168298d5ef99c70b134989c35261bae6046b882 SHA512 0ae0f91e8b9cfcd7d1a1af6cb55f7972e9bc029cd4b10469d5be696ae750d6aabb5f59426e9bf6f700d5a56decd3ddf85a097bb98ae1d06f0b167967b5b8b8ea
 DIST rp-pppoe-3.14.tar.gz 224688 BLAKE2B bfac215d206ce53ead2a10d5440f8243cce4763f7ef15d52f7bd609e8eebdebf5bc52204350988cb1d1b69d1df9092aca77173333e753e8bb9752ead8618569c SHA512 0fa26e9478d387d4752ab85837dab9d1464f27c1ca832bad265deb01b5c3565aa341e3c75278b43a56aed466f02861af11b3bc64bae932a13cb103c4f0b91a29

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch
deleted file mode 100644
index 265d15db093..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-diff -Nru rp-pppoe-3.10.orig/gui/Makefile.in rp-pppoe-3.10/gui/Makefile.in
---- rp-pppoe-3.10.orig/gui/Makefile.in	2008-06-30 16:00:41.000000000 +0200
-+++ rp-pppoe-3.10/gui/Makefile.in	2008-06-30 22:30:56.000000000 +0200
-@@ -46,7 +46,7 @@
- 	-mkdir -p $(DESTDIR)$(sbindir)
- 	-mkdir -p $(DESTDIR)$(bindir)
- 	-mkdir -p $(DESTDIR)/etc/ppp/rp-pppoe-gui
--	$(install) -m 4755 -s pppoe-wrapper $(DESTDIR)$(sbindir)
-+	$(install) -m 4755 pppoe-wrapper $(DESTDIR)$(sbindir)
- 	$(install) -m 755 tkpppoe $(DESTDIR)$(bindir)
- 	-mkdir -p $(DESTDIR)$(mandir)/man1
- 	$(install) -m 644 pppoe-wrapper.1 $(DESTDIR)$(mandir)/man1
-diff -Nru rp-pppoe-3.10.orig/src/configure.in rp-pppoe-3.10/src/configure.in
---- rp-pppoe-3.10.orig/src/configure.in	2008-06-30 16:00:42.000000000 +0200
-+++ rp-pppoe-3.10/src/configure.in	2008-06-30 22:29:53.000000000 +0200
-@@ -45,7 +45,7 @@
- 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, 1, [Define if you have struct sockaddr_ll])
- fi
- 
- dnl Check for N_HDLC line discipline
-@@ -56,7 +56,7 @@
- 	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, 1, [Define if you have the N_HDLC line discipline in linux/termios.h])
- fi
- 
- AC_ARG_ENABLE(plugin, [  --enable-plugin=pppd_src_path   build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
-@@ -104,7 +104,7 @@
- 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, 1, [Define if you have kernel-mode PPPoE in Linux file])
- 		PPPD_INCDIR=$ac_cv_pluginpath
- 	fi
- fi
-@@ -114,7 +114,7 @@
- fi
- 
- if test "$ac_cv_debugging" = "yes" ; then
--   AC_DEFINE(DEBUGGING_ENABLED)
-+   AC_DEFINE(DEBUGGING_ENABLED, 1, [Define to include debugging code])
- fi
- 
- AC_SUBST(LINUX_KERNELMODE_PLUGIN)
-@@ -154,15 +154,15 @@
- AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
- AC_CACHE_VAL(ac_cv_linux_kernel_pppoe,[
- if test "`uname -s`" = "Linux" ; then
--if test $cross_compiling = "no"; then
-+dnl if test $cross_compiling = "no"; then
- 
- dnl Do a bunch of modprobes.  Can't hurt; might help.
--modprobe ppp_generic > /dev/null 2>&1
--modprobe ppp_async > /dev/null 2>&1
--modprobe n_hdlc > /dev/null 2>&1
--modprobe ppp_synctty > /dev/null 2>&1
--modprobe pppoe > /dev/null 2>&1
--fi
-+dnl modprobe ppp_generic > /dev/null 2>&1
-+dnl modprobe ppp_async > /dev/null 2>&1
-+dnl modprobe n_hdlc > /dev/null 2>&1
-+dnl modprobe ppp_synctty > /dev/null 2>&1
-+dnl modprobe pppoe > /dev/null 2>&1
-+dnl fi
- AC_TRY_RUN([#include <sys/socket.h>
- #include <net/ethernet.h>
- #include <linux/if.h>
-@@ -204,7 +204,7 @@
- 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}'`
-+PPPD_VERSION=2.4.4
- 
- 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)
-@@ -258,7 +258,7 @@
- 
- if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
- 	AC_MSG_RESULT(reversed)
--	AC_DEFINE(PACK_BITFIELDS_REVERSED)
-+	AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order])
- else
- 	AC_MSG_RESULT(normal)
- fi
-diff -Nru rp-pppoe-3.10.orig/src/plugin.c rp-pppoe-3.10/src/plugin.c
---- rp-pppoe-3.10.orig/src/plugin.c	2008-06-30 16:00:43.000000000 +0200
-+++ rp-pppoe-3.10/src/plugin.c	2008-06-30 22:27:18.000000000 +0200
-@@ -27,7 +27,6 @@
- static char const RCSID[] =
- "$Id$";
- 
--#define _GNU_SOURCE 1
- #include "pppoe.h"
- 
- #include "pppd/pppd.h"
-diff -Nru rp-pppoe-3.10.orig/src/relay.c rp-pppoe-3.10/src/relay.c
---- rp-pppoe-3.10.orig/src/relay.c	2008-06-30 16:00:43.000000000 +0200
-+++ rp-pppoe-3.10/src/relay.c	2008-06-30 22:27:18.000000000 +0200
-@@ -17,8 +17,6 @@
- static char const RCSID[] =
- "$Id$";
- 
--#define _GNU_SOURCE 1 /* For SA_RESTART */
--
- #include "relay.h"
- 
- #include <signal.h>

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch
deleted file mode 100644
index f45557a0d6f..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-diff -Nru rp-pppoe-3.10.orig/configs/pppoe.conf rp-pppoe-3.10/configs/pppoe.conf
---- rp-pppoe-3.10.orig/configs/pppoe.conf	2008-06-30 16:00:42.000000000 +0200
-+++ rp-pppoe-3.10/configs/pppoe.conf	2008-06-30 22:22:32.000000000 +0200
-@@ -21,6 +21,9 @@
- # When you configure a variable, DO NOT leave spaces around the "=" sign.
- 
- # Ethernet card connected to DSL modem
-+#
-+# NB: Gentoo overrides ETH when pppoe-start is called from the
-+# networking scripts.  This setting has no effect in that case.
- ETH=eth1
- 
- # PPPoE user name.  You may have to supply "@provider.com"  Sympatico
-@@ -86,8 +89,10 @@
- #   $PIDFILE       contains PID of pppoe-connect script
- #   $PIDFILE.pppoe contains PID of pppoe process
- #   $PIDFILE.pppd  contains PID of pppd process
--CF_BASE=`basename $CONFIG`
--PIDFILE="/var/run/$CF_BASE-pppoe.pid"
-+#
-+# NB: Gentoo overrides PIDFILE when pppoe-start is run from the
-+# networking scripts.  This setting has no effect in that case.
-+PIDFILE="/var/run/rp-pppoe.pid"
- 
- # Do you want to use synchronous PPP?  "yes" or "no".  "yes" is much
- # easier on CPU usage, but may not work for you.  It is safer to use
-diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-connect.in rp-pppoe-3.10/scripts/pppoe-connect.in
---- rp-pppoe-3.10.orig/scripts/pppoe-connect.in	2008-06-30 16:00:42.000000000 +0200
-+++ rp-pppoe-3.10/scripts/pppoe-connect.in	2008-06-30 22:22:32.000000000 +0200
-@@ -62,12 +62,17 @@
-     ;;
- esac
- 
--if test ! -f "$CONFIG" -o ! -r "$CONFIG" ; then
-+# In Gentoo, CONFIG is a named pipe when pppoe is started by the
-+# network scripts.  Testing -r is allowed; testing -f is not.
-+if test ! -r "$CONFIG" ; then
-     echo "$0: Cannot read configuration file '$CONFIG'" >& 2
-     exit 1
- fi
--export CONFIG
--. $CONFIG
-+
-+# Read the named pipe (/dev/fd/foo) into a variable so we can use it
-+# again later (since reading once from the pipe will exhaust it)
-+CONFREAD=$(<$CONFIG)
-+eval "$CONFREAD"
- 
- PPPOE_PIDFILE="$PIDFILE.pppoe"
- PPPD_PIDFILE="$PIDFILE.pppd"
-diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-start.in rp-pppoe-3.10/scripts/pppoe-start.in
---- rp-pppoe-3.10.orig/scripts/pppoe-start.in	2008-06-30 16:00:42.000000000 +0200
-+++ rp-pppoe-3.10/scripts/pppoe-start.in	2008-06-30 22:22:32.000000000 +0200
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- # @configure_input@
- #***********************************************************************
- #
-@@ -113,12 +113,17 @@
- 	;;
- esac
- 
--if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
-+# In Gentoo, CONFIG is a named pipe when pppoe is started by the
-+# network scripts.  Testing -r is allowed; testing -f is not.
-+if [ ! -r "$CONFIG" ] ; then
-     $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2
-     exit 1
- fi
--export CONFIG
--. $CONFIG
-+
-+# Read the named pipe (/dev/fd/foo) into a variable so we can use it
-+# again later (since reading once from the pipe will exhaust it)
-+CONFREAD=$(<$CONFIG)
-+eval "$CONFREAD"
- 
- # Check for command-line overriding of ETH and USER
- case "$#" in
-@@ -145,11 +150,11 @@
- 
- # Start the connection in the background unless we're debugging
- if [ "$DEBUG" != "" ] ; then
--    $CONNECT "$@"
-+    $CONNECT <(echo "$CONFREAD")
-     exit 0
- fi
- 
--$CONNECT "$@" > /dev/null 2>&1 &
-+$CONNECT <(echo "$CONFREAD") >/dev/null 2>&1 &
- CONNECT_PID=$!
- 
- if [ "$CONNECT_TIMEOUT" = "" -o "$CONNECT_TIMEOUT" = 0 ] ; then
-@@ -164,7 +169,7 @@
- # Monitor connection
- TIME=0
- while [ true ] ; do
--    @sbindir@/pppoe-status $CONFIG > /dev/null 2>&1
-+    @sbindir@/pppoe-status <(echo "$CONFREAD") >/dev/null 2>&1
- 
-     # Looks like the interface came up
-     if [ $? = 0 ] ; then
-diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-status rp-pppoe-3.10/scripts/pppoe-status
---- rp-pppoe-3.10.orig/scripts/pppoe-status	2008-06-30 16:00:42.000000000 +0200
-+++ rp-pppoe-3.10/scripts/pppoe-status	2008-06-30 22:22:32.000000000 +0200
-@@ -28,12 +28,17 @@
- 	;;
- esac
- 
--if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
-+# In Gentoo, CONFIG is a named pipe when pppoe is started by the
-+# network scripts.  Testing -r is allowed; testing -f is not.
-+if [ ! -r "$CONFIG" ] ; then
-     echo "$0: Cannot read configuration file '$CONFIG'" >& 2
-     exit 1
- fi
- 
--. $CONFIG
-+# Read the named pipe (/dev/fd/foo) into a variable so we can use it
-+# again later (since reading once from the pipe will exhaust it)
-+CONFREAD=$(<$CONFIG)
-+eval "$CONFREAD"
- 
- PPPOE_PIDFILE="$PIDFILE.pppoe"
- PPPD_PIDFILE="$PIDFILE.pppd"
-diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-stop.in rp-pppoe-3.10/scripts/pppoe-stop.in
---- rp-pppoe-3.10.orig/scripts/pppoe-stop.in	2008-06-30 16:00:42.000000000 +0200
-+++ rp-pppoe-3.10/scripts/pppoe-stop.in	2008-06-30 22:22:32.000000000 +0200
-@@ -31,12 +31,17 @@
-     CONFIG=/etc/ppp/pppoe.conf
- fi
- 
--if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
-+# In Gentoo, CONFIG is a named pipe when pppoe is started by the
-+# network scripts.  Testing -r is allowed; testing -f is not.
-+if [ ! -r "$CONFIG" ] ; then
-     echo "$ME: Cannot read configuration file '$CONFIG'" >& 2
-     exit 1
- fi
--export CONFIG
--. $CONFIG
-+
-+# Read the named pipe (/dev/fd/foo) into a variable so we can use it
-+# again later (since reading once from the pipe will exhaust it)
-+CONFREAD=$(<$CONFIG)
-+eval "$CONFREAD"
- 
- PPPOE_PIDFILE="$PIDFILE.pppoe"
- PPPD_PIDFILE="$PIDFILE.pppd"

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch
deleted file mode 100644
index 47e504bf783..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -Nru rp-pppoe-3.10.orig/src/pppoe.h rp-pppoe-3.10/src/pppoe.h
---- rp-pppoe-3.10.orig/src/pppoe.h	2008-06-30 16:00:43.000000000 +0200
-+++ rp-pppoe-3.10/src/pppoe.h	2008-06-30 23:25:54.000000000 +0200
-@@ -19,6 +19,13 @@
- 
- extern int IsSetID;
- 
-+/* Ugly header files on some Linux boxes... */
-+#if defined(HAVE_LINUX_IF_H)
-+#include <linux/if.h>
-+#elif defined(HAVE_NET_IF_H)
-+#include <net/if.h>
-+#endif
-+
- #if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H)
- #define _POSIX_SOURCE 1 /* For sigaction defines */
- #endif
-@@ -51,13 +58,6 @@
- #include <sys/socket.h>
- #endif
- 
--/* Ugly header files on some Linux boxes... */
--#if defined(HAVE_LINUX_IF_H)
--#include <linux/if.h>
--#elif defined(HAVE_NET_IF_H)
--#include <net/if.h>
--#endif
--
- #ifdef HAVE_NET_IF_TYPES_H
- #include <net/if_types.h>
- #endif

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch
deleted file mode 100644
index 0d447748a1b..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -ur rp-pppoe-3.10.orig/configs/pppoe.conf rp-pppoe-3.10/configs/pppoe.conf
---- rp-pppoe-3.10.orig/configs/pppoe.conf	2008-08-23 03:40:56.000000000 +0000
-+++ rp-pppoe-3.10/configs/pppoe.conf	2008-08-23 03:42:20.000000000 +0000
-@@ -120,7 +120,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
-diff -ur rp-pppoe-3.10.orig/scripts/pppoe-connect.in rp-pppoe-3.10/scripts/pppoe-connect.in
---- rp-pppoe-3.10.orig/scripts/pppoe-connect.in	2008-08-23 03:40:56.000000000 +0000
-+++ rp-pppoe-3.10/scripts/pppoe-connect.in	2008-08-23 03:45:43.000000000 +0000
-@@ -202,10 +202,13 @@
- 
- # If we're using kernel-mode PPPoE on Linux...
- if test "$LINUX_PLUGIN" != "" ; then
--    PLUGIN_OPTS="plugin $LINUX_PLUGIN nic-$ETH"
-+    PLUGIN_OPTS="plugin $LINUX_PLUGIN"
-     if test -n "$SERVICENAME" ; then
- 	PLUGIN_OPTS="$PLUGIN_OPTS rp_pppoe_service $SERVICENAME"
-     fi
-+
-+    # Interface name MUST BE LAST!!
-+    PLUGIN_OPTS="$PLUGIN_OPTS $ETH"
-     modprobe pppoe > /dev/null 2>&1
- fi
- 
-@@ -297,7 +300,7 @@
- 	$SETSID $OVERRIDE_PPPD_COMMAND &
- 	echo "$!" > $PPPD_PIDFILE
-     elif test "$LINUX_PLUGIN" != "" ; then
--	$SETSID $PPPD $PPP_STD_OPTIONS $DEMAND &
-+	$SETSID $PPPD $DEMAND $PPP_STD_OPTIONS &
- 	echo "$!" > $PPPD_PIDFILE
-     else
- 	$SETSID $PPPD pty "$PPPOE_CMD" \

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch
deleted file mode 100644
index 7ed4b98c721..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-glibc does not define SA_RESTART when _POSIX_SOURCE is defined, so we
-have to just assume the default signal.h include defines SA_RESTART
-
-https://sourceware.org/bugzilla/show_bug.cgi?id=12252
-
---- rp-pppoe-3.10/src/pppoe.h
-+++ rp-pppoe-3.10/src/pppoe.h
-@@ -19,10 +19,6 @@
- 
- extern int IsSetID;
- 
--#if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H)
--#define _POSIX_SOURCE 1 /* For sigaction defines */
--#endif
--
- #include <stdio.h>		/* For FILE */
- #include <sys/types.h>		/* For pid_t */
- 

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch
deleted file mode 100644
index 8ef99a4b7aa..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-setup.in rp-pppoe-3.10/scripts/pppoe-setup.in
---- rp-pppoe-3.10.orig/scripts/pppoe-setup.in	2008-06-30 16:00:42.000000000 +0200
-+++ rp-pppoe-3.10/scripts/pppoe-setup.in	2008-06-30 22:23:40.000000000 +0200
-@@ -86,11 +86,13 @@
-     $ECHO "USER NAME"
-     $ECHO ""
-     printf "%s" ">>> Enter your PPPoE user name (default $USER): "
--    read U
-+    read Uu
- 
--    if [ "$U" = "" ] ; then
--	U="$USER"
-+    if [ "$Uu" = "" ] ; then
-+	Uu="$USER"
-     fi
-+  
-+    U=`echo $Uu | sed -e "s/&/\\\\\&/g"`
- 
-     # Under Linux, "fix" the default interface if eth1 is not available
-     if test `uname -s` = "Linux" ; then
-@@ -221,7 +223,7 @@
-     $ECHO "** Summary of what you entered **"
-     $ECHO ""
-     $ECHO "Ethernet Interface: $E"
--    $ECHO "User name:          $U"
-+    $ECHO "User name:          $Uu"
-     if [ "$D" = "no" ] ; then
- 	$ECHO "Activate-on-demand: No"
-     else
-@@ -288,7 +290,12 @@
- fi
- 
- # Some #$(*& ISP's use a slash in the user name...
--sed -e "s&^USER=.*&USER='$U'&" \
-+for SEP in ':' ';' '/' '!' '|' '_' '-' '@' ; do 
-+	if [ "$U" = `echo $U | sed "sI${SEP}II"` ]; then 
-+		break;
-+	fi
-+done
-+sed -e "s${SEP}^USER=.*${SEP}USER='$U'${SEP}"\
-     -e "s&^ETH=.*&ETH='$E'&" \
-     -e "s&^PIDFILE=.*&PIDFILE=\"$VARRUN/\$CF_BASE-pppoe.pid\"&" \
-     -e "s/^FIREWALL=.*/FIREWALL=$FIREWALL/" \
-@@ -337,10 +344,10 @@
-     cp /dev/null /etc/ppp/chap-secrets-bak
- fi
- 
--egrep -v "^$U|^\"$U\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
--$ECHO "\"$U\"	*	\"$PWD1\"" >> /etc/ppp/pap-secrets
--egrep -v "^$U|^\"$U\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
--$ECHO "\"$U\"	*	\"$PWD1\"" >> /etc/ppp/chap-secrets
-+egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
-+$ECHO "\"$Uu\"	*	\"$PWD1\"" >> /etc/ppp/pap-secrets
-+egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
-+$ECHO "\"$Uu\"	*	\"$PWD1\"" >> /etc/ppp/chap-secrets
- 
- $ECHO ""
- $ECHO ""

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch
deleted file mode 100644
index 9f03a0cf8b1..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rp-pppoe-3.11/gui/Makefile.in
-+++ rp-pppoe-3.11/gui/Makefile.in
-@@ -37,7 +37,7 @@
- 	@echo "Type 'make install' as root to install the software."
- 
- pppoe-wrapper: wrapper.o
--	@CC@ -o pppoe-wrapper wrapper.o
-+	@CC@ $(CFLAGS) $(LDFLAGS) -o pppoe-wrapper wrapper.o
- 
- wrapper.o: wrapper.c
- 	@CC@ $(CFLAGS) -c -o wrapper.o wrapper.c

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch
deleted file mode 100644
index 78a6a3b6754..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/configure.in
-+++ b/src/configure.in
-@@ -26,6 +26,7 @@
- #include<net/ethernet.h>
- #include<linux/if.h>
- #include<linux/in.h>
-+#include <linux/in6.h>
- ])
- 
- dnl Checks for typedefs, structures, and compiler characteristics.

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch
deleted file mode 100644
index 2a56d40fabc..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff --git a/gui/tkpppoe.in b/gui/tkpppoe.in
-index 148c8c8..1d952d4 100755
---- a/gui/tkpppoe.in
-+++ b/gui/tkpppoe.in
-@@ -1573,7 +1573,7 @@ proc SetButtonStates {} {
- #***********************************************************************
- proc GetEthernetInterfaces {} {
-     set ifs {}
--    set fp [open "|/sbin/ifconfig" "r"]
-+    set fp [open "|/bin/ifconfig" "r"]
-     while {[gets $fp line] >= 0} {
- 	if {[regexp {^eth[0-9]+} $line eth]} {
- 	    lappend ifs $eth
-diff --git a/scripts/pppoe-connect.in b/scripts/pppoe-connect.in
-index 2124422..e7eab32 100755
---- a/scripts/pppoe-connect.in
-+++ b/scripts/pppoe-connect.in
-@@ -28,7 +28,7 @@ exec_prefix=@exec_prefix@
- localstatedir=/var
-
- # Paths to programs
--IFCONFIG=/sbin/ifconfig
-+IFCONFIG=/bin/ifconfig
- PPPD=@PPPD@
- SETSID=@SETSID@
- PPPOE=@sbindir@/pppoe
-diff --git a/scripts/pppoe-setup.in b/scripts/pppoe-setup.in
-index b378479..4122084 100755
---- a/scripts/pppoe-setup.in
-+++ b/scripts/pppoe-setup.in
-@@ -17,7 +17,7 @@ prefix=@prefix@
- exec_prefix=@exec_prefix@
-
- # Paths to programs
--IFCONFIG=/sbin/ifconfig
-+IFCONFIG=/bin/ifconfig
- PPPD=@PPPD@
- PPPOE=@sbindir@/pppoe
- ECHO=@ECHO@
-diff --git a/scripts/pppoe-start.in b/scripts/pppoe-start.in
-index 7e15804..b9dd7f0 100755
---- a/scripts/pppoe-start.in
-+++ b/scripts/pppoe-start.in
-@@ -29,7 +29,7 @@ exec_prefix=@exec_prefix@
- # Paths to programs
- CONNECT=@sbindir@/pppoe-connect
- ECHO=@ECHO@
--IFCONFIG=/sbin/ifconfig
-+IFCONFIG=/bin/ifconfig
-
- # Set to "C" locale so we can parse messages from commands
- LANG=C
-diff --git a/scripts/pppoe-status b/scripts/pppoe-status
-index 9fe89cd..96d6ebd 100755
---- a/scripts/pppoe-status
-+++ b/scripts/pppoe-status
-@@ -73,7 +73,7 @@ for i in /etc/ppp/ppp*.pid /var/run/ppp*.pid ; do
- 		exit 1
- 	    fi
- 	    echo "pppoe-status: Link is up and running on interface $IF"
--	    /sbin/ifconfig $IF
-+	    /bin/ifconfig $IF
- 	    exit 0
- 	fi
-     fi

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch
deleted file mode 100644
index 961eba39613..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-the linux headers have started adding shims to not define types or structs
-when C lib headers are active, but in order to work, the C lib headers have
-to be included before the linux headers.
-
-move the netinet/in.h include up above the linux/ includes.
-
-Mike Frysinger <vapier@gentoo.org>
-
---- a/src/pppoe.h
-+++ b/src/pppoe.h
-@@ -47,6 +47,8 @@
- #include <sys/socket.h>
- #endif
- 
-+#include <netinet/in.h>
-+
- /* Ugly header files on some Linux boxes... */
- #if defined(HAVE_LINUX_IF_H)
- #include <linux/if.h>
-@@ -84,8 +86,6 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
- #ifdef HAVE_NETINET_IF_ETHER_H
- #include <sys/types.h>
- 

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch
deleted file mode 100644
index d098de8cdbc..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch
+++ /dev/null
@@ -1,110 +0,0 @@
---- rp-pppoe-3.13/gui/Makefile.in
-+++ rp-pppoe-3.13/gui/Makefile.in
-@@ -46,7 +46,7 @@
- 	-mkdir -p $(DESTDIR)$(sbindir)
- 	-mkdir -p $(DESTDIR)$(bindir)
- 	-mkdir -p $(DESTDIR)/etc/ppp/rp-pppoe-gui
--	$(install) -m 4755 -s pppoe-wrapper $(DESTDIR)$(sbindir)
-+	$(install) -m 4755 pppoe-wrapper $(DESTDIR)$(sbindir)
- 	$(install) -m 755 tkpppoe $(DESTDIR)$(bindir)
- 	-mkdir -p $(DESTDIR)$(mandir)/man1
- 	$(install) -m 644 pppoe-wrapper.1 $(DESTDIR)$(mandir)/man1
---- rp-pppoe-3.13/src/configure.in
-+++ rp-pppoe-3.13/src/configure.in
-@@ -45,7 +45,7 @@
- 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, 1, [Define if you have struct sockaddr_ll])
- fi
- 
- dnl Check for N_HDLC line discipline
-@@ -58,7 +58,7 @@
- 	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, 1, [Define if you have the N_HDLC line discipline in linux/termios.h])
- fi
- 
- AC_ARG_ENABLE(plugin, [  --enable-plugin=pppd_src_path   build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
-@@ -106,7 +106,7 @@
- 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, 1, [Define if you have kernel-mode PPPoE in Linux file])
- 		PPPD_INCDIR=$ac_cv_pluginpath
- 	fi
- fi
-@@ -116,7 +116,7 @@
- fi
- 
- if test "$ac_cv_debugging" = "yes" ; then
--   AC_DEFINE(DEBUGGING_ENABLED)
-+   AC_DEFINE(DEBUGGING_ENABLED, 1, [Define to include debugging code])
- fi
- 
- AC_SUBST(LINUX_KERNELMODE_PLUGIN)
-@@ -156,15 +156,15 @@
- AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
- AC_CACHE_VAL(ac_cv_linux_kernel_pppoe,[
- if test "`uname -s`" = "Linux" ; then
--if test $cross_compiling = "no"; then
-+dnl if test $cross_compiling = "no"; then
- 
- dnl Do a bunch of modprobes.  Can't hurt; might help.
--modprobe ppp_generic > /dev/null 2>&1
--modprobe ppp_async > /dev/null 2>&1
--modprobe n_hdlc > /dev/null 2>&1
--modprobe ppp_synctty > /dev/null 2>&1
--modprobe pppoe > /dev/null 2>&1
--fi
-+dnl modprobe ppp_generic > /dev/null 2>&1
-+dnl modprobe ppp_async > /dev/null 2>&1
-+dnl modprobe n_hdlc > /dev/null 2>&1
-+dnl modprobe ppp_synctty > /dev/null 2>&1
-+dnl modprobe pppoe > /dev/null 2>&1
-+dnl fi
- AC_TRY_RUN([#include <sys/socket.h>
- #include <netinet/in.h>
- #include <linux/if_pppox.h>
-@@ -204,7 +204,7 @@
- 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}'`
-+PPPD_VERSION=$PPPD_VER
- 
- 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)
-@@ -260,7 +260,7 @@
- 
- if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
- 	AC_MSG_RESULT(reversed)
--	AC_DEFINE(PACK_BITFIELDS_REVERSED)
-+	AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order])
- else
- 	AC_MSG_RESULT(normal)
- fi
---- rp-pppoe-3.13/src/plugin.c
-+++ rp-pppoe-3.13/src/plugin.c
-@@ -24,7 +24,6 @@
- *
- ***********************************************************************/
- 
--#define _GNU_SOURCE 1
- #include "pppoe.h"
- 
- #include "pppd/pppd.h"
---- rp-pppoe-3.13/src/relay.c
-+++ rp-pppoe-3.13/src/relay.c
-@@ -14,7 +14,6 @@
- * $Id$
- *
- ***********************************************************************/
--#define _GNU_SOURCE 1 /* For SA_RESTART */
- #include "config.h"
- 
- #include <sys/socket.h>

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch
deleted file mode 100644
index 1ee989dce87..00000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-the linux headers have started adding shims to not define types or structs
-when C lib headers are active, but in order to work, the C lib headers have
-to be included before the linux headers.
-
-move the netinet/in.h include up above the linux/ includes.
-
-Mike Frysinger <vapier@gentoo.org>
-
---- rp-pppoe-3.13/src/pppoe.h
-+++ rp-pppoe-3.13/src/pppoe.h
-@@ -120,12 +120,12 @@
- #error Could not find a 32-bit integer type
- #endif
- 
-+#include <netinet/in.h>
-+
- #ifdef HAVE_LINUX_IF_ETHER_H
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
- #ifdef HAVE_NETINET_IF_ETHER_H
- #include <sys/types.h>
- 

diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild
deleted file mode 100644
index 46194906ccf..00000000000
--- a/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic autotools readme.gentoo-r1
-
-PPP_P="ppp-2.4.7"
-
-DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
-HOMEPAGE="https://www.roaringpenguin.com/products/pppoe"
-SRC_URI="http://www.roaringpenguin.com/files/download/${P}.tar.gz
-	https://www.samba.org/ftp/pub/ppp/${PPP_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE="tk"
-
-RDEPEND="
-	net-dialup/ppp:=
-	tk? ( dev-lang/tk:= )
-"
-DEPEND=">=sys-kernel/linux-headers-2.6.25
-	${RDEPEND}"
-
-DOC_CONTENTS="Use pppoe-setup to configure your dialup connection"
-
-pkg_setup() {
-	# This is needed in multiple phases
-	PPPD_VER=$(best_version net-dialup/ppp)
-	PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-	PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV}
-}
-
-PATCHES=(
-	# Patch to enable integration of pppoe-start and pppoe-stop with
-	# baselayout-1.11.x so that the pidfile can be found reliably per interface
-	"${FILESDIR}/${PN}-3.10-gentoo-netscripts.patch"
-
-	"${FILESDIR}/${PN}-3.10-username-charset.patch" # bug 82410
-	"${FILESDIR}/${PN}-3.10-plugin-options.patch"
-	"${FILESDIR}/${PN}-3.10-autotools.patch"
-	"${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch"
-	"${FILESDIR}/${PN}-3.11-gentoo.patch"
-	"${FILESDIR}/${PN}-3.11-kmode.patch" #364941
-	"${FILESDIR}/${PN}-3.12-linux-headers.patch"
-	"${FILESDIR}/${PN}-3.12-ifconfig-path.patch" #602344
-)
-
-src_prepare() {
-	if has_version '<sys-kernel/linux-headers-2.6.35' ; then
-		PATCHES+=(
-			"${FILESDIR}/${PN}-3.10-linux-headers.patch" #334197
-		)
-	fi
-
-	default
-
-	cd "${S}"/src || die
-	eautoreconf
-}
-
-src_configure() {
-	addpredict /dev/ppp
-
-	cd "${S}/src" || die
-	econf --enable-plugin=../../ppp-${PPPD_VER}
-}
-
-src_compile() {
-	cd "${S}/src" || die
-	emake
-
-	if use tk; then
-		emake -C "${S}/gui"
-	fi
-}
-
-src_install() {
-	cd "${S}/src" || die
-	emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install
-
-	#Don't use compiled rp-pppoe plugin - see pkg_preinst below
-	local pppoe_plugin="${D}/etc/ppp/plugins/rp-pppoe.so"
-	if [ -f "${pppoe_plugin}" ] ; then
-		rm "${pppoe_plugin}" || die
-	fi
-
-	if use tk; then
-		emake -C "${S}/gui" \
-			DESTDIR="${D}" \
-			datadir=/usr/share/doc/${PF}/ \
-			install
-		dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe
-	fi
-
-	readme.gentoo_create_doc
-}
-
-pkg_preinst() {
-	# Use the rp-pppoe plugin that comes with net-dialup/pppd
-	if [ -n "${PPPD_VER}" ] && [ -f "${ROOT}/usr/lib/pppd/${PPPD_VER}/rp-pppoe.so" ] ; then
-		dosym /usr/lib/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so
-	fi
-}

diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild
deleted file mode 100644
index 0f8969df89a..00000000000
--- a/net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic readme.gentoo-r1
-
-PPP_P="ppp-2.4.7"
-
-DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
-HOMEPAGE="https://www.roaringpenguin.com/products/pppoe"
-SRC_URI="https://dianne.skoll.ca/projects/rp-pppoe/download/${P}.tar.gz
-	https://www.samba.org/ftp/pub/ppp/${PPP_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="tk"
-
-RDEPEND="
-	net-dialup/ppp:=
-	tk? ( dev-lang/tk:= )
-"
-DEPEND=">=sys-kernel/linux-headers-2.6.25
-	${RDEPEND}"
-
-DOC_CONTENTS="Use pppoe-setup to configure your dialup connection"
-
-pkg_setup() {
-	# This is needed in multiple phases
-	PPPD_VER=$(best_version net-dialup/ppp)
-	PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-	PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV}
-}
-
-PATCHES=(
-	# Patch to enable integration of pppoe-start and pppoe-stop with
-	# baselayout-1.11.x so that the pidfile can be found reliably per interface
-	"${FILESDIR}/${PN}-3.10-gentoo-netscripts.patch"
-
-	"${FILESDIR}/${PN}-3.10-username-charset.patch" # bug 82410
-	"${FILESDIR}/${PN}-3.10-plugin-options.patch"
-	"${FILESDIR}/${PN}-3.13-autotools.patch"
-	"${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch"
-	"${FILESDIR}/${PN}-3.11-gentoo.patch"
-	"${FILESDIR}/${PN}-3.11-kmode.patch" #364941
-	"${FILESDIR}/${PN}-3.13-linux-headers.patch"
-	"${FILESDIR}/${PN}-3.12-ifconfig-path.patch" #602344
-)
-
-src_prepare() {
-	if has_version '<sys-kernel/linux-headers-2.6.35' ; then
-		PATCHES+=(
-			"${FILESDIR}/${PN}-3.10-linux-headers.patch" #334197
-		)
-	fi
-
-	default
-
-	cd "${S}"/src || die
-	eautoreconf
-}
-
-src_configure() {
-	addpredict /dev/ppp
-
-	cd "${S}/src" || die
-	# PPPD_VER variable is required for correct pppd detection
-	# This was added through the rp-pppoe-*-autotools.patch
-	econf PPPD_VER="${PPPD_VER}" --enable-plugin=../../ppp-${PPPD_VER}
-}
-
-src_compile() {
-	cd "${S}/src" || die
-	emake
-
-	if use tk; then
-		emake -C "${S}/gui"
-	fi
-}
-
-src_install() {
-	cd "${S}/src" || die
-	emake DESTDIR="${D}" install #docdir=/usr/share/doc/${PF} install
-
-	#Don't use compiled rp-pppoe plugin - see pkg_preinst below
-	local pppoe_plugin="${ED}/etc/ppp/plugins/rp-pppoe.so"
-	if [ -f "${pppoe_plugin}" ] ; then
-		rm "${pppoe_plugin}" || die
-	fi
-
-	if use tk; then
-		emake -C "${S}/gui" \
-			DESTDIR="${D}" \
-			datadir=/usr/share/doc/${PF}/ \
-			install
-		dosym doc/${PF}/tkpppoe /usr/share/tkpppoe
-	fi
-
-	newinitd "${FILESDIR}"/pppoe-server.initd pppoe-server
-	newconfd "${FILESDIR}"/pppoe-server.confd pppoe-server
-
-	readme.gentoo_create_doc
-}
-
-pkg_preinst() {
-	# Use the rp-pppoe plugin that comes with net-dialup/pppd
-	if [ -n "${PPPD_VER}" ] && [ -f "${EROOT}/usr/lib/pppd/${PPPD_VER}/rp-pppoe.so" ] ; then
-		dosym ../../../usr/lib/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so
-	fi
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dialup/rp-pppoe/files/, net-dialup/rp-pppoe/
@ 2022-01-19 11:35 Lars Wendler
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Wendler @ 2022-01-19 11:35 UTC (permalink / raw
  To: gentoo-commits

commit:     c58d8c6e42efe8282c8e569315d418b41a9e1312
Author:     Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Tue Dec  7 20:08:24 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jan 19 11:34:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c58d8c6e

net-dialup/rp-pppoe: 3.15-r2 - remove MAX_INTERFACES limit.

The 64 MAX_INTERFACES is a problem for us.  To make matters worse the
number of interfaces we need to listen on are climbing at an alarming
rate.  Need a single pppoe-server instance to share IP pool.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/23213
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../files/rp-pppoe-3.15-no_max_interfaces.patch    | 91 +++++++++++++++++++++
 net-dialup/rp-pppoe/rp-pppoe-3.15-r2.ebuild        | 93 ++++++++++++++++++++++
 2 files changed, 184 insertions(+)

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.15-no_max_interfaces.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.15-no_max_interfaces.patch
new file mode 100644
index 000000000000..ecf70f09ddc6
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.15-no_max_interfaces.patch
@@ -0,0 +1,91 @@
+pppoe-server: MAX_INTERFACES 64 is a problem for ULS.
+
+We currently require 77 interfaces, this code just lifts the limit entirely and
+will keep adding interfaces for as much RAM as you have to store an array as
+required.
+
+Signed-off-by: Jaco Kroon <jaco@uls.co.za>
+
+diff -rau rp-pppoe-3.15/src.o/pppoe-server.c rp-pppoe-3.15/src/pppoe-server.c
+--- rp-pppoe-3.15.o/src/pppoe-server.c	2021-05-07 15:18:00.000000000 +0200
++++ rp-pppoe-3.15/src/pppoe-server.c	2021-12-07 21:53:46.755693003 +0200
+@@ -115,8 +115,9 @@
+ ClientSession *BusySessions = NULL;
+ 
+ /* Interfaces we're listening on */
+-Interface interfaces[MAX_INTERFACES];
++Interface *interfaces = NULL;
+ int NumInterfaces = 0;
++int MaxInterfaces = 0;
+ 
+ /* The number of session slots */
+ size_t NumSessionSlots;
+@@ -1235,11 +1236,16 @@
+ 	exit(1);
+     }
+ 
+-    memset(interfaces, 0, sizeof(interfaces));
+-
+     /* Initialize syslog */
+     openlog("pppoe-server", LOG_PID, LOG_DAEMON);
+ 
++    MaxInterfaces = INIT_INTERFACES;
++    interfaces = malloc(sizeof(*interfaces) * INIT_INTERFACES);
++    if (!interfaces) {
++	fprintf(stderr, "Out of memory allocating initial interfaces.\n");
++	exit(1);
++    }
++
+     /* Default number of session slots */
+     NumSessionSlots = DEFAULT_MAX_SESSIONS;
+     MaxSessionsPerMac = 0; /* No limit */
+@@ -1406,10 +1412,14 @@
+ 	    break;
+ 
+ 	case 'I':
+-	    if (NumInterfaces >= MAX_INTERFACES) {
+-		fprintf(stderr, "Too many -I options (max %d)\n",
+-			MAX_INTERFACES);
+-		exit(EXIT_FAILURE);
++	    if (NumInterfaces >= MaxInterfaces) {
++		MaxInterfaces *= 2;
++		interfaces = realloc(interfaces, sizeof(*interfaces) * MaxInterfaces);
++		if (!interfaces) {
++		    fprintf(stderr, "Memory allocation failure trying to increase MaxInterfaces to %d\n",
++			    MaxInterfaces);
++		    exit(EXIT_FAILURE);
++		}
+ 	    }
+ 	    found = 0;
+ 	    for (i=0; i<NumInterfaces; i++) {
+@@ -1419,6 +1429,7 @@
+ 		}
+ 	    }
+ 	    if (!found) {
++		memset(&interfaces[NumInterfaces], 0, sizeof(*interfaces));
+ 		strncpy(interfaces[NumInterfaces].name, optarg, IFNAMSIZ);
+ 		NumInterfaces++;
+ 	    }
+diff -rau rp-pppoe-3.15/src.o/pppoe-server.h rp-pppoe-3.15/src/pppoe-server.h
+--- rp-pppoe-3.15/src.o/pppoe-server.h	2021-05-07 15:18:00.000000000 +0200
++++ rp-pppoe-3.15/src/pppoe-server.h	2021-12-07 21:44:09.945578094 +0200
+@@ -97,8 +97,8 @@
+ /* Hack for daemonizing */
+ #define CLOSEFD 64
+ 
+-/* Max. number of interfaces to listen on */
+-#define MAX_INTERFACES 64
++/* Initial Max. number of interfaces to listen on */
++#define INIT_INTERFACES 8
+ 
+ /* Max. 64 sessions by default */
+ #define DEFAULT_MAX_SESSIONS 64
+@@ -107,7 +107,7 @@
+ extern ClientSession *Sessions;
+ 
+ /* Interfaces we're listening on */
+-extern Interface interfaces[MAX_INTERFACES];
++extern Interface *interfaces;
+ extern int NumInterfaces;
+ 
+ /* The number of session slots */

diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.15-r2.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.15-r2.ebuild
new file mode 100644
index 000000000000..e7433bcf2749
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.15-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools readme.gentoo-r1 toolchain-funcs
+
+PATCHSET="${PN}-3.14-patches-01"
+PATCHES=(
+	"${FILESDIR}/rp-pppoe-3.15-no_max_interfaces.patch"
+)
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="https://dianne.skoll.ca/projects/rp-pppoe/"
+SRC_URI="https://dianne.skoll.ca/projects/rp-pppoe/download/${P}.tar.gz
+	https://dev.gentoo.org/~polynomial-c/dist/${PATCHSET}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="tk"
+
+RDEPEND="
+	net-dialup/ppp:=
+	sys-apps/iproute2
+	tk? ( dev-lang/tk:= )
+"
+DEPEND=">=sys-kernel/linux-headers-2.6.25
+	${RDEPEND}"
+
+DOC_CONTENTS="Use pppoe-setup to configure your dialup connection"
+
+pkg_setup() {
+	# This is needed in multiple phases
+	PPPD_VER="$(best_version net-dialup/ppp)"
+	PPPD_VER="${PPPD_VER#*/*-}" #reduce it to ${PV}-${PR}
+	PPPD_VER="${PPPD_VER%%-*}" #reduce it to ${PV}
+
+	PPPD_PLUGIN_DIR="/usr/$(get_libdir)/pppd/${PPPD_VER}"
+}
+
+src_prepare() {
+	if ! use elibc_musl ; then
+		rm "${WORKDIR}/patches/${PN}-3.14-musl.patch" || die
+	fi
+
+	rm "${WORKDIR}/patches/${PN}-3.14-ifconfig-path.patch" || die
+
+	eapply "${WORKDIR}/patches"
+	eapply "${PATCHES[@]}"
+	eapply_user
+
+	cd "${S}"/src || die
+	eautoreconf
+}
+
+src_configure() {
+	addpredict /dev/ppp
+
+	cd src || die
+
+	econf --enable-plugin=/usr/include/pppd
+}
+
+src_compile() {
+	cd src || die
+	emake AR="$(tc-getAR)" PLUGIN_PATH=rp-pppoe.so PLUGIN_DIR="${PPPD_PLUGIN_DIR}"
+
+	if use tk ; then
+		emake -C "${S}/gui"
+	fi
+}
+
+src_install() {
+	cd src || die
+	emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" PLUGIN_DIR="${PPPD_PLUGIN_DIR}" install
+
+	# We don't need this README file here.
+	rm "${ED}${PPPD_PLUGIN_DIR}/README" || die "Error removing ${PPPD_PLUGIN_DIR}/README from installation"
+
+	if use tk ; then
+		emake -C "${S}/gui" \
+			DESTDIR="${D}" \
+			datadir=/usr/share/doc/${PF}/ \
+			install
+		dosym doc/${PF}/tkpppoe /usr/share/tkpppoe
+	fi
+
+	newinitd "${FILESDIR}"/pppoe-server.initd pppoe-server
+	newconfd "${FILESDIR}"/pppoe-server.confd pppoe-server
+
+	readme.gentoo_create_doc
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-19 11:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-28 12:16 [gentoo-commits] repo/gentoo:master commit in: net-dialup/rp-pppoe/files/, net-dialup/rp-pppoe/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2021-05-06 10:53 David Seifert
2022-01-19 11:35 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox