summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2017-03-27 18:12:34 +0300
committerSergey Popov <pinkbyte@gentoo.org>2017-03-27 18:17:14 +0300
commit83d3fb92ea9656e8f856c68f643ce2ca984f72cf (patch)
treee321bc68f3c3eb30aba868dd1c04e1151db6977d /net-vpn/pptpd/files
parentdev-python/lit: enable Python 3 support (diff)
downloadgentoo-83d3fb92ea9656e8f856c68f643ce2ca984f72cf.tar.gz
gentoo-83d3fb92ea9656e8f856c68f643ce2ca984f72cf.tar.bz2
gentoo-83d3fb92ea9656e8f856c68f643ce2ca984f72cf.zip
net-dialup/pptpd: move to net-vpn/pptpd
Package-Manager: portage-2.3.3 RepoMan-Options: --force
Diffstat (limited to 'net-vpn/pptpd/files')
-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
5 files changed, 137 insertions, 0 deletions
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
+}