summaryrefslogtreecommitdiff
path: root/net-dialup/rp-pppoe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /net-dialup/rp-pppoe
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'net-dialup/rp-pppoe')
-rw-r--r--net-dialup/rp-pppoe/Manifest5
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.15-no_max_interfaces.patch91
-rw-r--r--net-dialup/rp-pppoe/rp-pppoe-3.15-r2.ebuild (renamed from net-dialup/rp-pppoe/rp-pppoe-3.14.ebuild)47
3 files changed, 115 insertions, 28 deletions
diff --git a/net-dialup/rp-pppoe/Manifest b/net-dialup/rp-pppoe/Manifest
index 40f9e19f5818..eb1429c14714 100644
--- a/net-dialup/rp-pppoe/Manifest
+++ b/net-dialup/rp-pppoe/Manifest
@@ -1,11 +1,10 @@
AUX pppoe-server.confd 428 BLAKE2B 83e91157082122ff084ed5b36031fa37950d154f22bed9630ca09f5e9ba00b65cbeb6769693f039b649b30b9c5f49051d6177e108bae2d23c58af7412363d5f6 SHA512 2216e972469d1b544d1dc5729a5c8e2520006f8fd1d07e4d2152a1fd6dd00f52cb97a984398058006f7830fbeae8ee1e8088d5d9ea7648acf50510cc19372b16
AUX pppoe-server.initd 456 BLAKE2B 1dd9e1dbfe7e18c4f20d9e7a6eb99f942742516273053375e31e802df5297ad61645439ad76ec28a16b6da672862831de627273dd056021b76e1a37beac1fdbf SHA512 44df1122ae36f56c044c47e94c5dd70d00c060c23d0590f233f6cb6024241c1d1c83832d167c12a45ef4464e94f7d5f5e2ddf04c413ea929e1d398feafa0ec0a
-DIST ppp-2.4.8.tar.gz 697530 BLAKE2B 235114288699db45501bc7d9ce8f36c0b5684ab0dab09da93d7f2b4f7c3eca030ae26e34dfff25efa971374fbd7fde62f121ea6aa69872658f44c5ac8c7850a2 SHA512 a99b3b6c7bd80cd133bda4e29d33c793a76f3b67e1f8db774547e88932ce29564fad390a4f51d3fe30a75e006499b95000b042ae0f64cd360548426f8091a478
+AUX rp-pppoe-3.15-no_max_interfaces.patch 2821 BLAKE2B 3ad091bb9fbab181a223c92c143ff860e0541856cc2e4296700eff08db81f42562f365da9bb836d8180f8ce8c08042e5fa4fc2466a0864678e46f14df619e324 SHA512 16567d42c4691fa0bee04bcca5dc200385c8749c97e147c4134f4290064ab00fad4e1ad8847aaa0be975d7bc2dea024307adcc91f47d54ae20bb42ae0e8dc18c
DIST ppp-2.4.9.tar.gz 719904 BLAKE2B 7ba3eb8c98fec5599635dbd302399617e1075f3a1df090f1a94ce2bb8a5c7631e6eea82246adc33711aba5fe95e7ba7c982e2cbf1fb0d71e45f877d9b092ffb7 SHA512 c309f8f69f534c05547cd2f66dade0e0f198ea4c2928a7e899e660280786b3e965437a67b8c5bb81c59d0fa1818b4eb7b701d2dce015a420d380422d2bca4e1a
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
DIST rp-pppoe-3.15.tar.gz 224966 BLAKE2B 85eda606677b71e35ed3b9389db0d01ac1f16c7b40cc31b3adf31946b18454b77867a5e8822386e9fb08455399733242c4c074c2fee6f1c4d62fe23b44e82707 SHA512 a156c084e57361ab6a464c3205ffb85cf86d02f71f17f92c9567f1ab0ed300f10030832fd232084699dc842ac4891efc8c54c8165587bfc7b4c92724318a60d9
-EBUILD rp-pppoe-3.14.ebuild 2299 BLAKE2B 29316862ad0f00dfd719a4af51af39fea06611b6997cf7b13e32b8c6e4a94e82cff73b51b52fcc18effae5a2500990ba87fea3ef8e7686e9465f30e1e186eccc SHA512 3d1a90c6e21f09ac4a4db7de679d12660ab204ee61480dda90a9ee9151c76c2d20f560248335b048724dacd2d3be272682309f2827fdfc885c8dbb13625ccd2e
EBUILD rp-pppoe-3.15-r1.ebuild 2097 BLAKE2B 2f1401057ba53f1b7f290417bb7580291e8e7943e3d854c4a33ea1d6b03cf2d5bbe697066b1379959d97e5a4d2f7462cc6129bd250be6889554ceadf74830703 SHA512 489a1de583cc0b531ae6b01557f9b8af16f96e38e4677ceb0c18ddf991727f773435a54c3e1917d225af90d0ab4ec40f7fa5ed2d976e405ece8e1f0d958e6270
+EBUILD rp-pppoe-3.15-r2.ebuild 2188 BLAKE2B 2ab021bfcedfc8b324fef2de4951a02aed9f0b382ac4d8d0fbb3d0842b247521234c720934a852c05864da100afcd7c54466833df38244dd4ac1e87f32d760a5 SHA512 6e18cb3d71cd040062391892df5fda5e1010987fd7c858cedcc6861cd4fd92b130b7a582ef8375e7a72c5ff20aa46fc72ff8827b0403af81cb6894d90bb7f15d
EBUILD rp-pppoe-3.15.ebuild 2395 BLAKE2B d485ae601932325e29c94b11d36934a6aa8dcf75e2e64e242ebb6fe766c193004b9ca904909a9990ac16cc29d5dcef89f10d842f0eda7f58e9ab1d350fa92cc6 SHA512 5a81a478d2f2042ef24e7aa6a2abe75452ac6828d0c4e29b17a09acfd2e349c9583bfa3f5a3a90f7fc35670eb5472bf57e9c657c40e4601d1e0e04528c4ddc3c
MISC metadata.xml 370 BLAKE2B 04fa2afd30bf660d7c2ac948a09fc1fc9d40f44f0eda79432b4f0be7741dd9f4e0f104db474f94d5515f62a37363df06fb169ca246822d1d01a8980b7f393c7d SHA512 09289baac97746fb9c641bfe3be9ab9dae7f5f2f445a1e2364e89ccb4d2c81c75b70d331ccc6b23b25396e36f27ef06aa92652665ad4aedc3290d6617a4e2b17
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.14.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.15-r2.ebuild
index 21179f572f4f..e7433bcf2749 100644
--- a/net-dialup/rp-pppoe/rp-pppoe-3.14.ebuild
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.15-r2.ebuild
@@ -5,22 +5,24 @@ EAPI=7
inherit autotools readme.gentoo-r1 toolchain-funcs
-PPP_P="ppp-2.4.8"
-PATCHES="${P}-patches-01"
+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://github.com/paulusmack/ppp/archive/${PPP_P}.tar.gz
- https://dev.gentoo.org/~polynomial-c/dist/${PATCHES}.tar.xz"
+ 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"
+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
@@ -30,9 +32,11 @@ 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_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() {
@@ -40,7 +44,10 @@ src_prepare() {
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
@@ -51,28 +58,25 @@ src_configure() {
addpredict /dev/ppp
cd src || die
- # Not a mistake! This comes from the GitHub tarball doing funky naming
- econf --enable-plugin=../../ppp-ppp-${PPPD_VER}
+
+ econf --enable-plugin=/usr/include/pppd
}
src_compile() {
cd src || die
- emake AR="$(tc-getAR)"
+ emake AR="$(tc-getAR)" PLUGIN_PATH=rp-pppoe.so PLUGIN_DIR="${PPPD_PLUGIN_DIR}"
- if use tk; then
+ if use tk ; then
emake -C "${S}/gui"
fi
}
src_install() {
cd src || die
- emake DESTDIR="${D}" install
+ emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" PLUGIN_DIR="${PPPD_PLUGIN_DIR}" 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
+ # 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" \
@@ -87,10 +91,3 @@ src_install() {
readme.gentoo_create_doc
}
-
-pkg_preinst() {
- # Use the rp-pppoe plugin that comes with net-dialup/pppd
- if [[ -n "${PPPD_VER}" ]] && [[ -f "${EROOT}/usr/$(get_libdir)/pppd/${PPPD_VER}/rp-pppoe.so" ]] ; then
- dosym ../../../usr/$(get_libdir)/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so
- fi
-}