summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-11-28 13:13:58 +0100
committerLars Wendler <polynomial-c@gentoo.org>2018-11-28 13:15:55 +0100
commit6941c29b3715e56592141a6d59dbe355a529f8e5 (patch)
tree743a3426f4c622bab03c4cfc054c85a1f474620a /net-dialup/rp-pppoe
parentmedia-libs/libmp4v2-2.0.0-r1: alpha stable (diff)
downloadgentoo-6941c29b3715e56592141a6d59dbe355a529f8e5.tar.gz
gentoo-6941c29b3715e56592141a6d59dbe355a529f8e5.tar.bz2
gentoo-6941c29b3715e56592141a6d59dbe355a529f8e5.zip
net-dialup/rp-pppoe: Bump to version 3.13
Added pppoe-server init script. Thanks to Oleg Gawriloff <barzog@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@gentoo.org>
Diffstat (limited to 'net-dialup/rp-pppoe')
-rw-r--r--net-dialup/rp-pppoe/Manifest1
-rw-r--r--net-dialup/rp-pppoe/files/pppoe-server.confd10
-rw-r--r--net-dialup/rp-pppoe/files/pppoe-server.initd9
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch110
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch25
-rw-r--r--net-dialup/rp-pppoe/rp-pppoe-3.13.ebuild111
6 files changed, 266 insertions, 0 deletions
diff --git a/net-dialup/rp-pppoe/Manifest b/net-dialup/rp-pppoe/Manifest
index ffdf948661e4..1644caa49473 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 000000000000..bb5b2e9088d7
--- /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 000000000000..39caee9d761b
--- /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 000000000000..d098de8cdbc3
--- /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 000000000000..1ee989dce872
--- /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 000000000000..5a62bbd85690
--- /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
+}