summaryrefslogtreecommitdiff
path: root/net-vpn/pptpd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-vpn/pptpd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-vpn/pptpd')
-rw-r--r--net-vpn/pptpd/Manifest8
-rw-r--r--net-vpn/pptpd/files/pptpd-1.4.0-gentoo.patch59
-rw-r--r--net-vpn/pptpd/files/pptpd-1.4.0-pidfile.patch33
-rw-r--r--net-vpn/pptpd/files/pptpd-1.4.0-sandbox-fix.patch21
-rw-r--r--net-vpn/pptpd/files/pptpd-confd5
-rw-r--r--net-vpn/pptpd/files/pptpd-init-r219
-rw-r--r--net-vpn/pptpd/metadata.xml15
-rw-r--r--net-vpn/pptpd/pptpd-1.4.0-r2.ebuild79
8 files changed, 239 insertions, 0 deletions
diff --git a/net-vpn/pptpd/Manifest b/net-vpn/pptpd/Manifest
new file mode 100644
index 000000000000..e921c81c97a7
--- /dev/null
+++ b/net-vpn/pptpd/Manifest
@@ -0,0 +1,8 @@
+AUX pptpd-1.4.0-gentoo.patch 2360 SHA256 b84c7a17ff6ccb7560dd1fcfbe439dcde740724b52ef520f880fd4395f04b9d7 SHA512 ba89b3b9eacd19e7cf6173289e8cb5db2443b55b3ad86f053c58636ed4f65227c626678f052f2d0a3c4c22fe4e0487493d097cd9a5434101017b95605966fc5b WHIRLPOOL 058306023e0d1cd27126b638027fef00eddf99f5a0bdf177437f17bd45edb6556ed20dbcddb66f1ce4ccc5702cfbbda44269cfe4df59f987c7bc1d47c52bd022
+AUX pptpd-1.4.0-pidfile.patch 1348 SHA256 0e3b8da40751acead031c3a469695eb8741ff46a98357fb1494d248234a7199d SHA512 0d0e4df9cc1827345001ebfb88ec87bdce818792aa2243e92127643ffbf64a2c7d62cb5cd26930085d7533ae32135cbcc36da755adce3297bcad4abf764b3b6e WHIRLPOOL 557942f0c1bd8b6495fd53f078e1382617cd760ed3e78c347a76fa9381be1fd5cb8987bb8dc36a6850b59990daea6b6328a9d6ae3a79a9c9b220045faa2532c4
+AUX pptpd-1.4.0-sandbox-fix.patch 528 SHA256 6881a1f31fb56dbac032f715354eaad533d48d202d37045fe73328669023bead SHA512 7f80c66185207f4d14fd6163e41fed3acc7ffdeea91d3f62e000ab1fcbe6abd8f3bb6a1ea927a9fa29ef1b38b2c0ffe364625e155474c4145126de674cd7f2bb WHIRLPOOL 225703afe2f6c9e97f9e88c5ee405a980a9e06f7944d43b98edcf9296d2b31e6a84cc84583e1ea21600f472a31aaeb1f5652d441127b6e3fefb3b7e6573096dc
+AUX pptpd-confd 131 SHA256 4d69da546e36439dc1a7cb5abb949ad48046155752c047babb5472decdfa1958 SHA512 59f118715cf6c36442687a58f46a54519fb5125383e85c4fa352a4c97f8a4e19f46c9715330550755eb9691e8174b70cdfab48fbd14c2707364e8083d6baa488 WHIRLPOOL a386723e4e0f660563aca44807bf7b2553caf99904a115587072925a49fd2d5cb8c2742cc832afefa16cec4bc85c3c03afc37b149b81c6426474f1f7032bf60e
+AUX pptpd-init-r2 325 SHA256 5645695e84f2b4daa35a04db10861ef143818a586833654ce017397a1b4dc9ed SHA512 5eb0839310b6897aeb5ef067f3bbccc3f302f9d5375fea9c2cf405a6e823560a776a96fa0189b4c9adf1744651a35a41d4fcafc3f9e1ebf5ddeb5d88bece9678 WHIRLPOOL 2fb0b720e07b7b2b80aa973798bbf659e9b2c75457c8d5af6d1704ca6406dbdfdaea532a6bb7271cece6287cb40e638e93a1c06243b7ee8cdb2845c3f09b42bc
+DIST pptpd-1.4.0.tar.gz 252167 SHA256 8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0 SHA512 cfb4caef3025c0721e7fabf8b7bf595739f2d3048555b30616cdadc37e70ba9e1c50561c25091dd617b5448da2816aeaf83aea0fc2ef6b0dd5e3fe35d9591484 WHIRLPOOL 8296818e05cb01339b83a68d149413fd5bd76b435cfa56c3e16a8136b531743468953279d44339fd0f8125fb25172a3ee9a10ec14bb9f801eb54133b665dab3b
+EBUILD pptpd-1.4.0-r2.ebuild 1920 SHA256 fa68666064a48556beacf81be24d7880ebc66037e06e63e2d183502ceec2b1f4 SHA512 803829744f54b0d4f16866414c2196d02e064d15f2060e1ba61f9fccf86bb777b0fa9b5fd662975960cf8a95b9c94913db7acf35bfa3168350db0a13541358ba WHIRLPOOL 09a7927c30b8a1bbae57799d7ff330d7d66ecdeb626ba4ca7a3b6bdb7985f0bf6740f5cd4d87d68bd961be993537313880b613b7f4694655ed271feb0d5e7c41
+MISC metadata.xml 469 SHA256 2386aff6c06ec87707a5e2224f04488376ccdfac863062d5bdad89a5536452c9 SHA512 c4a5aa89a09126dd523bb230a29c8aec9816f734903da555ac8193a82e359d09a9237d1a82f0355a63daea56f7239919b61706c9d7e333bdba5f6e69cc007a04 WHIRLPOOL 57f97c50529b7f790d1292b32f4b86afb1b8a35d4cf100ca7f78628229102740d6b42eed90f9fdb7ce1d276fb8d8a2fc09012c61c3a50116a91ed291b9f97d33
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-gentoo.patch b/net-vpn/pptpd/files/pptpd-1.4.0-gentoo.patch
new file mode 100644
index 000000000000..9e7db7ea3454
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-gentoo.patch
@@ -0,0 +1,59 @@
+diff -Naur pptpd-1.3.4.orig/Makefile.am pptpd-1.3.4/Makefile.am
+--- pptpd-1.3.4.orig/Makefile.am 2007-04-16 04:53:53.000000000 +0400
++++ pptpd-1.3.4/Makefile.am 2007-05-01 21:29:15.000000000 +0400
+@@ -11,7 +11,7 @@
+ ## warning with -Wmissing-prototypes).
+ ## -Wmissing-prototypes removed (eg, Linux 2.2.6 headers
+ ## aren't up to it).
+-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++CFLAGS += -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
+
+diff -Naur pptpd-1.3.4.orig/plugins/Makefile pptpd-1.3.4/plugins/Makefile
+--- pptpd-1.3.4.orig/plugins/Makefile 2006-08-03 06:02:01.000000000 +0400
++++ pptpd-1.3.4/plugins/Makefile 2007-05-01 21:29:15.000000000 +0400
+@@ -1,6 +1,5 @@
+-CC = gcc
++CC ?= gcc
+-COPTS = -O2 -g
+-CFLAGS = $(COPTS) -I.. -I../../include -fPIC
++CFLAGS += -I.. -I../../include -fPIC
+-LDFLAGS = -shared
++LDFLAGS += -shared
+ LDADD = -lutil
+ INSTALL = install -o root
+diff -Naur pptpd-1.3.4.orig/pptpgre.c pptpd-1.3.4/pptpgre.c
+--- pptpd-1.3.4.orig/pptpgre.c 2007-04-16 04:21:02.000000000 +0400
++++ pptpd-1.3.4/pptpgre.c 2007-05-01 21:29:50.000000000 +0400
+@@ -326,9 +326,11 @@
+ "GRE: timeout waiting for %d packets",
+ head->seq - gre.seq_recv - 1);
+ }
++#ifdef LOG_DEBUG_GRE_ACCEPTING_PACKET
+ if (pptpctrl_debug)
+ syslog(LOG_DEBUG, "GRE: accepting #%d from queue",
+ head->seq);
++#endif
+ gre.seq_recv = head->seq;
+ status = callback(cl, head->packet, head->packlen);
+ pqueue_del(head);
+diff -Naur pptpd-1.3.4.orig/pqueue.c pptpd-1.3.4/pqueue.c
+--- pptpd-1.3.4.orig/pqueue.c 2005-08-03 12:53:22.000000000 +0400
++++ pptpd-1.3.4/pqueue.c 2007-05-01 21:29:15.000000000 +0400
+@@ -7,13 +7,11 @@
+ #include "pqueue.h"
+
+ #ifdef DEBUG_PQUEUE
+-#define DEBUG_ON 1
++# define DEBUG_CMD(_a) { _a }
+ #else
+-#define DEBUG_ON 0
++# define DEBUG_CMD(_a)
+ #endif
+
+-#define DEBUG_CMD(_a) if (DEBUG_ON) { _a }
+-
+ #define MIN_CAPACITY 128 /* min allocated buffer for a packet */
+
+ static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new);
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-pidfile.patch b/net-vpn/pptpd/files/pptpd-1.4.0-pidfile.patch
new file mode 100644
index 000000000000..59bc4a43ecd9
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-pidfile.patch
@@ -0,0 +1,33 @@
+--- a/pptpd.c 2016-08-16 15:35:51.660000000 +0300
++++ b/pptpd.c 2016-08-16 15:36:01.010000000 +0300
+@@ -115,7 +115,7 @@
+ printf(" (default is /etc/ppp/options).\n");
+ #endif
+ printf(" [-p] [--pidfile file] Specifies the file to write the process ID to\n");
+- printf(" (default is /var/run/pptpd.pid).\n");
++ printf(" (default is /run/pptpd.pid).\n");
+ #if !defined(BSDUSER_PPP)
+ printf(" [-s] [--speed baud] Specifies the baud speed for the PPP daemon\n");
+ printf(" (default is 115200).\n");
+--- a/pptpd.8 2016-08-16 15:34:53.480000000 +0300
++++ b/pptpd.8 2016-08-16 15:35:11.650000000 +0300
+@@ -72,7 +72,7 @@
+ .TP
+ \fB-p\fR|\fB--pidfile \fIpid-file
+ specifies an alternate location to store the process ID file (default
+-.IR /var/run/pptpd.pid ).
++.IR /run/pptpd.pid ).
+
+ .TP
+ \fB-s\fR|\fB--speed \fIbaud
+--- a/defaults.h 2016-08-16 15:35:01.050000000 +0300
++++ b/defaults.h 2016-08-16 15:35:20.190000000 +0300
+@@ -43,7 +43,7 @@
+ #else
+ #define PPTPD_CONFIG_FILE_DEFAULT "/etc/pptpd.conf"
+ #endif
+-#define PIDFILE_DEFAULT "/var/run/pptpd.pid"
++#define PIDFILE_DEFAULT "/run/pptpd.pid"
+
+ #define STIMEOUT_DEFAULT 10 /* seconds */
+
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-sandbox-fix.patch b/net-vpn/pptpd/files/pptpd-1.4.0-sandbox-fix.patch
new file mode 100644
index 000000000000..2162509d7d48
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-sandbox-fix.patch
@@ -0,0 +1,21 @@
+--- a/plugins/Makefile 2013-05-15 14:36:33.994231829 +0400
++++ b/plugins/Makefile 2013-05-15 14:37:06.686234429 +0400
+@@ -17,14 +17,14 @@
+ %.so: %.c
+ $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
+
+-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd
++LIBDIR ?= $(prefix)/lib/pptpd
+
+ install: $(PLUGINS)
+- $(INSTALL) -d $(LIBDIR)
+- $(INSTALL) $? $(LIBDIR)
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)
++ $(INSTALL) $? $(DESTDIR)$(LIBDIR)
+
+ uninstall:
+- rm -f $(LIBDIR)$(PLUGINS)
++ rm -f $(DESTDIR)$(LIBDIR)$(PLUGINS)
+
+ clean:
+ rm -f *.o *.so *.a
diff --git a/net-vpn/pptpd/files/pptpd-confd b/net-vpn/pptpd/files/pptpd-confd
new file mode 100644
index 000000000000..1169e57f1c7c
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/pptpd
+
+# Any extra options you want to pass to pptpd
+# on start-up should be put here.
+PPTPD_OPTS=""
diff --git a/net-vpn/pptpd/files/pptpd-init-r2 b/net-vpn/pptpd/files/pptpd-init-r2
new file mode 100644
index 000000000000..6bbf9d68143e
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-init-r2
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting pptpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/pptpd -- ${PPTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pptpd"
+ start-stop-daemon --stop --quiet --pidfile /run/pptpd.pid
+ result=$?
+ killall -SIGTERM pptpctrl &>/dev/null
+ eend $result
+}
diff --git a/net-vpn/pptpd/metadata.xml b/net-vpn/pptpd/metadata.xml
new file mode 100644
index 000000000000..32a22c503fb9
--- /dev/null
+++ b/net-vpn/pptpd/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <use>
+ <flag name="gre-extreme-debug">Log all GRE accepted packages when in debug
+ mode (required if you want upstream support)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">poptop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-vpn/pptpd/pptpd-1.4.0-r2.ebuild b/net-vpn/pptpd/pptpd-1.4.0-r2.ebuild
new file mode 100644
index 000000000000..95a0ffb046d6
--- /dev/null
+++ b/net-vpn/pptpd/pptpd-1.4.0-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Linux Point-to-Point Tunnelling Protocol Server"
+HOMEPAGE="http://poptop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/poptop/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="gre-extreme-debug tcpd"
+
+DEPEND="net-dialup/ppp:=
+ tcpd? ( sys-apps/tcp-wrappers )"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+PATCHES=(
+ "${FILESDIR}/${P}-gentoo.patch"
+ "${FILESDIR}/${P}-sandbox-fix.patch"
+ "${FILESDIR}/${P}-pidfile.patch"
+)
+
+src_prepare() {
+ # Match pptpd-logwtmp.so's version with pppd's version (#89895)
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ sed -i -e "s:\\(#define[ \\t]*VERSION[ \\t]*\\)\".*\":\\1\"${PPPD_VER}\":" plugins/patchlevel.h || die
+
+ # configure.in is actually configure.ac
+ mv configure.in configure.ac || die
+
+ # Automake 1.13 compatibility, bug #469476
+ sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.ac || die 'sed on configure.ac failed'
+
+ # remove 'missing' script to prevent warnings
+ rm missing || die 'remove missing script failed'
+
+ # respect compiler, bug #461722
+ tc-export CC
+
+ # Call to default src_prepare to apply patches
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ use gre-extreme-debug && append-cppflags "-DLOG_DEBUG_GRE_ACCEPTING_PACKET"
+ econf \
+ --enable-bcrelay \
+ $(use tcpd && echo "--with-libwrap")
+}
+
+src_compile() {
+ emake COPTS="${CFLAGS}"
+}
+
+src_install () {
+ default
+
+ insinto /etc
+ doins samples/pptpd.conf
+
+ insinto /etc/ppp
+ doins samples/options.pptpd
+
+ newinitd "${FILESDIR}/pptpd-init-r2" pptpd
+ newconfd "${FILESDIR}/pptpd-confd" pptpd
+
+ dodoc README.*
+ dodoc -r samples
+}