* Update to 1.3.0; from new maintainer Giovanni Bechis. GRE is now

automatically enabled at run time.
* Honor CC/CFLAGS.
This commit is contained in:
naddy 2008-01-08 16:50:27 +00:00
parent 2a5d76a803
commit 6e8b9c2cb1
9 changed files with 102 additions and 28 deletions

View File

@ -1,14 +1,14 @@
# $OpenBSD: Makefile,v 1.6 2007/09/15 22:36:58 merdely Exp $
# $OpenBSD: Makefile,v 1.7 2008/01/08 16:50:27 naddy Exp $
COMMENT= PPTP Server
PKGNAME= poptop-1.1.4.b4p1
DISTNAME= pptpd-1.1.4-b4
PKGNAME= poptop-1.3.0
DISTNAME= pptpd-1.3.0
CATEGORIES= net
HOMEPAGE= http://www.poptop.org/
MAINTAINER= Craig Barraclough <craigba@creative.com.au>
MAINTAINER= Giovanni Bechis <g.bechis@snb.it>
# GPL
PERMIT_PACKAGE_CDROM= Yes
@ -21,8 +21,10 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=poptop/}
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --with-bsdppp --with-pppd-ip-alloc
USE_GMAKE= yes
WRKDIST= ${WRKDIR}/poptop-1.1.4
post-patch:
@perl -pi -e 's,/usr,${PREFIX},g' ${WRKSRC}/pptpctrl.c
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/poptop

View File

@ -1,5 +1,5 @@
MD5 (pptpd-1.1.4-b4.tar.gz) = WGAyJJmPIlQujX7LNXvABg==
RMD160 (pptpd-1.1.4-b4.tar.gz) = SCSizbe9W6fUiRugISZwDZlnMco=
SHA1 (pptpd-1.1.4-b4.tar.gz) = DYHZzZvkmN1EKhgsM96vvmlAOM0=
SHA256 (pptpd-1.1.4-b4.tar.gz) = qWIFeg4Z0TP5nOrHqayYPblw2TblYufOiOTNN8tsrvo=
SIZE (pptpd-1.1.4-b4.tar.gz) = 157684
MD5 (pptpd-1.3.0.tar.gz) = ddSU6IH3An9OYLEUFj9rZw==
RMD160 (pptpd-1.3.0.tar.gz) = AbuXa1ZYnX/SZGU8OUq+PIg+BVs=
SHA1 (pptpd-1.3.0.tar.gz) = mqEjRq+mB2UfFuHdffA1bXF7Y68=
SHA256 (pptpd-1.3.0.tar.gz) = T2/k6wjKemnINlirE7I6d6oVPsGiZjWW3cu/NXaLDO4=
SIZE (pptpd-1.3.0.tar.gz) = 204099

View File

@ -1,10 +1,8 @@
PoPToP - Unix PPTP Server
----------------------------
1. GRE Support
PoPToP requires GRE support to be enabled. As of 3.6, this is now done
via a sysctl - net.inet.gre.allow. Modify /etc/sysctl.conf, adding a
line such as:
net.inet.gre.allow=1 # GRE Support for PoPToP
PoPToP requires GRE support to be enabled. It will be enabled at run time
by the pptpd daemon.
2. Configuration of PPTP
A sample configuration file is copied into your configuration directory
(normally /etc) as pptpd.conf. Personalise this config file to suit. At

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-Makefile_in,v 1.1 2008/01/08 16:50:27 naddy Exp $
--- Makefile.in.orig Wed Aug 3 09:47:42 2005
+++ Makefile.in Tue Jan 8 17:40:03 2008
@@ -37,7 +37,7 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
EXTRA_PROGRAMS =
-sbin_PROGRAMS = pptpd$(EXEEXT) pptpctrl$(EXEEXT) bcrelay$(EXEEXT)
+sbin_PROGRAMS = pptpd$(EXEEXT) pptpctrl$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
@@ -77,8 +77,8 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(bcrelay_SOURCES) $(pptpctrl_SOURCES) $(pptpd_SOURCES)
-DIST_SOURCES = $(bcrelay_SOURCES) $(pptpctrl_SOURCES) $(pptpd_SOURCES)
+SOURCES = $(pptpctrl_SOURCES) $(pptpd_SOURCES)
+DIST_SOURCES = $(pptpctrl_SOURCES) $(pptpd_SOURCES)
man5dir = $(mandir)/man5
man8dir = $(mandir)/man8
NROFF = nroff
@@ -106,7 +106,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
+CFLAGS = @CFLAGS@ -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-plugins_Makefile,v 1.1 2008/01/08 16:50:27 naddy Exp $
--- plugins/Makefile.orig Tue Jan 8 17:42:27 2008
+++ plugins/Makefile Tue Jan 8 17:44:11 2008
@@ -1,9 +1,7 @@
-CC = gcc
-COPTS = -O2 -g
-CFLAGS = $(COPTS) -I.. -I../../include -fPIC
+CFLAGS += -I.. -I../../include -fPIC
LDFLAGS = -shared
-INSTALL = install -o root
-prefix = /usr/local
+INSTALL = $(BSD_INSTALL_DATA)
+prefix = $(TRUEPREFIX)
PLUGINS = pptpd-logwtmp.so

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-pptpctrl_c,v 1.1.1.1 2003/04/17 08:59:26 wilfried Exp $
--- pptpctrl.c.orig Fri Apr 11 10:51:32 2003
+++ pptpctrl.c Fri Apr 11 10:51:53 2003
@@ -26,7 +26,6 @@
#include <time.h>
#include <sys/time.h>
#include <dirent.h>
-#include <net/if.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-pptpd_c,v 1.1 2008/01/08 16:50:27 naddy Exp $
--- pptpd.c.orig Thu Feb 17 03:04:59 2005
+++ pptpd.c Mon Dec 31 09:55:06 2007
@@ -36,6 +36,11 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifdef __OpenBSD__
+#include <netinet/ip_gre.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
#include <sys/wait.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -415,6 +420,19 @@ int main(int argc, char **argv)
#endif
/* after we have our final pid... */
log_pid(pid_file);
+
+#ifdef __OpenBSD__
+ {
+ int mib[] = { CTL_NET, PF_INET, IPPROTO_GRE, GRECTL_ALLOW };
+ int gre_allow = 1;
+
+ if (sysctl(mib, 4, NULL, 0, &gre_allow, sizeof(gre_allow)) == -1) {
+ syslog(LOG_ERR, "PPTPD: failed to allow GRE, errno=%d\n",
+ errno);
+ return 1;
+ }
+ }
+#endif
/* manage connections until SIGTERM */
pptp_manager(argc, argv);

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.1 2008/01/08 16:50:27 naddy Exp $
lib/pptpd/
lib/pptpd/pptpd-logwtmp.so

View File

@ -1,4 +1,5 @@
@comment $OpenBSD: PLIST,v 1.6 2004/11/11 18:15:53 naddy Exp $
@comment $OpenBSD: PLIST,v 1.7 2008/01/08 16:50:27 naddy Exp $
%%SHARED%%
@man man/man5/pptpd.conf.5
@man man/man8/pptpctrl.8
@man man/man8/pptpd.8
@ -9,5 +10,3 @@ share/doc/poptop/README.OpenBSD
share/examples/poptop/
share/examples/poptop/pptpd.conf-sample
@sample ${SYSCONFDIR}/pptpd.conf
@comment GRE support required for PPTP data
@sysctl net.inet.gre.allow=1