diff options
-rw-r--r-- | net/rp-pppoe/Makefile | 20 | ||||
-rw-r--r-- | net/rp-pppoe/files/md5 | 4 | ||||
-rw-r--r-- | net/rp-pppoe/files/patch-sum | 8 | ||||
-rwxr-xr-x | net/rp-pppoe/files/pppoe.sh | 29 | ||||
-rw-r--r-- | net/rp-pppoe/patches/patch-aa | 123 | ||||
-rw-r--r-- | net/rp-pppoe/patches/patch-ab | 6 | ||||
-rw-r--r-- | net/rp-pppoe/patches/patch-ac | 15 | ||||
-rw-r--r-- | net/rp-pppoe/patches/patch-ad | 52 | ||||
-rw-r--r-- | net/rp-pppoe/pkg/PLIST | 5 |
9 files changed, 230 insertions, 32 deletions
diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile index e828f913ac9..3311febdc9b 100644 --- a/net/rp-pppoe/Makefile +++ b/net/rp-pppoe/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.14 2001/02/27 17:42:15 hubertf Exp $ +# $NetBSD: Makefile,v 1.15 2001/03/18 18:55:28 tron Exp $ -DISTNAME= rp-pppoe-2.6 +DISTNAME= rp-pppoe-2.8 CATEGORIES= net MASTER_SITES= ${HOMEPAGE} @@ -13,10 +13,7 @@ CONFLICTS+= mouse_pppoe<20000912nb1 GNU_CONFIGURE= YES CONFIGURE_ENV+= PPPD=${PPPD} -post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/rp-pppoe - ${INSTALL_DATA} ${WRKSRC}/pppoe.conf ${WRKSRC}/pppoe-server-options \ - ${PREFIX}/share/examples/rp-pppoe +WRKSRC= ${WRKDIR}/${DISTNAME}/src .include "../../mk/bsd.prefs.mk" @@ -28,4 +25,15 @@ PPPD= ${LOCALBASE}/sbin/pppd PPPD= /usr/sbin/pppd .endif +post-build: + ${SED} -e 's#$${PREFIX}#${PREFIX}#g' <${FILESDIR}/pppoe.sh \ + >${WRKDIR}/pppoe.sh + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/rp-pppoe + cd ${WRKSRC}/../configs && \ + ${INSTALL_DATA} pppoe.conf pppoe-server-options \ + ${PREFIX}/share/examples/rp-pppoe + ${INSTALL_SCRIPT} ${WRKDIR}/pppoe.sh ${PREFIX}/etc/rc.d/pppoe + .include "../../mk/bsd.pkg.mk" diff --git a/net/rp-pppoe/files/md5 b/net/rp-pppoe/files/md5 index f11a1718a24..c5403ce4447 100644 --- a/net/rp-pppoe/files/md5 +++ b/net/rp-pppoe/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.5 2001/01/30 20:33:25 tron Exp $ +$NetBSD: md5,v 1.6 2001/03/18 18:55:29 tron Exp $ -MD5 (rp-pppoe-2.6.tar.gz) = b0979be9408850acf2d94d6d448efaea +SHA1 (rp-pppoe-2.8.tar.gz) = a95059cc6e41b11f831f1dbf7f420d63d93ed708 diff --git a/net/rp-pppoe/files/patch-sum b/net/rp-pppoe/files/patch-sum index 0165257c201..dc5d9087686 100644 --- a/net/rp-pppoe/files/patch-sum +++ b/net/rp-pppoe/files/patch-sum @@ -1,4 +1,6 @@ -$NetBSD: patch-sum,v 1.6 2001/02/19 21:26:14 tron Exp $ +$NetBSD: patch-sum,v 1.7 2001/03/18 18:55:29 tron Exp $ -MD5 (patch-aa) = f2720b8feef48d25799a18fe0de93a95 -MD5 (patch-ab) = d74fad2f3d65de08f6a479e17abef337 +SHA1 (patch-aa) = 3753fbe6e5a1d62a6adca109391134ead5c037c0 +SHA1 (patch-ab) = 4a16b96d6b2069fab9efb42c856b71af14f672f1 +SHA1 (patch-ac) = 2c76eded4e98fb3564a70dd136f4c66fe41a165f +SHA1 (patch-ad) = b88680e7dd8a15878d40787ab4e3536e687e8081 diff --git a/net/rp-pppoe/files/pppoe.sh b/net/rp-pppoe/files/pppoe.sh new file mode 100755 index 00000000000..c56c534aa8a --- /dev/null +++ b/net/rp-pppoe/files/pppoe.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $NetBSD: pppoe.sh,v 1.1 2001/03/18 18:55:29 tron Exp $ +# +# PROVIDE: pppoe +# REQUIRE: ipnat + +test -f /etc/ppp/pppoe.conf || exit 1 + +case $1 in +start) + . /etc/ppp/pppoe.conf + ifconfig $ETH up + ${PREFIX}/sbin/adsl-start + ;; +stop) + ${PREFIX}/sbin/adsl-stop + . /etc/ppp/pppoe.conf + ifconfig $ETH down + ;; +restart) + sh $0 stop + sleep 5 + sh $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/net/rp-pppoe/patches/patch-aa b/net/rp-pppoe/patches/patch-aa index 33d66d424df..49280111c9f 100644 --- a/net/rp-pppoe/patches/patch-aa +++ b/net/rp-pppoe/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.4 2001/01/30 20:33:25 tron Exp $ +$NetBSD: patch-aa,v 1.5 2001/03/18 18:55:29 tron Exp $ ---- Makefile.in.orig Mon Jan 8 15:58:35 2001 -+++ Makefile.in Tue Jan 30 21:26:42 2001 +--- Makefile.in.orig Mon Feb 5 17:34:49 2001 ++++ Makefile.in Sun Mar 18 19:40:17 2001 @@ -20,7 +20,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -11,30 +11,123 @@ $NetBSD: patch-aa,v 1.4 2001/01/30 20:33:25 tron Exp $ install=@INSTALL@ install_dir=@INSTALL@ -d sbindir=@sbindir@ -@@ -101,16 +101,16 @@ - $(install) -m 644 pppoe-sniff.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +@@ -49,7 +49,7 @@ + + CFLAGS= @CFLAGS@ $(DEFINES) $(PATHS) + +-all: pppoe pppoe-server pppoe-sniff $(LINUX_KERNELMODE_PLUGIN) $(PPPOE_RELAY) ++all: pppoe pppoe-server $(LINUX_KERNELMODE_PLUGIN) $(PPPOE_RELAY) + @echo "" + @echo "Type 'make install' as root to install the software." + +@@ -117,12 +117,12 @@ + plugin/common.o: common.c + @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/common.o -fPIC common.c + +-install: pppoe pppoe-server pppoe-sniff ++install: pppoe pppoe-server + -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 -s pppoe $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 -s pppoe-server $(RPM_INSTALL_ROOT)$(sbindir) + if test -x pppoe-relay ; then $(install) -m 755 -s pppoe-relay $(RPM_INSTALL_ROOT)$(sbindir); fi +- $(install) -m 755 -s pppoe-sniff $(RPM_INSTALL_ROOT)$(sbindir) ++# $(install) -m 755 -s pppoe-sniff $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(sbindir) +@@ -130,53 +130,53 @@ + $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(sbindir) + -mkdir -p $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(docdir) ++# $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(docdir) + -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/pppoe.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/pppoe-relay.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 ++# $(install) -m 644 ../man/pppoe-relay.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/pppoe-server.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/pppoe-sniff.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 ++# $(install) -m 644 ../man/pppoe-sniff.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man5 - $(install) -m 644 pppoe.conf.5 $(RPM_INSTALL_ROOT)$(mandir)/man5 + $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(mandir)/man5 - -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp +- -mkdir -p $(RPM_INSTALL_ROOT)$(PLUGIN_DIR) +- -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)/README +- if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(PLUGIN_DIR); fi - @for i in pppoe.conf firewall-standalone firewall-masq ; do \ - if [ ! -f $(RPM_INSTALL_ROOT)/etc/ppp/$$i ] ; then \ -- $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ +- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ - else \ - echo "NOT overwriting existing $(RPM_INSTALL_ROOT)/etc/ppp/$$i" ;\ -- $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ +- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ - fi ;\ - done -- $(install) -m 644 pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) +- $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) +- @if [ -f /etc/redhat-release ] ; then \ +- echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ +- fi +- @if [ -f /etc/turbolinux-release ] ; then \ +- echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 adsl-init-turbolinux $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ +- fi +- @if [ -f /etc/SuSE-release ] ; then \ +- echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ +- fi +- @echo "" +- @echo "Type 'adsl-setup' to configure the software." +# -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp ++# -mkdir -p $(RPM_INSTALL_ROOT)$(PLUGIN_DIR) ++# -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)/README ++# if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(PLUGIN_DIR); fi +# @for i in pppoe.conf firewall-standalone firewall-masq ; do \ +# if [ ! -f $(RPM_INSTALL_ROOT)/etc/ppp/$$i ] ; then \ -+# $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ ++# $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ +# else \ +# echo "NOT overwriting existing $(RPM_INSTALL_ROOT)/etc/ppp/$$i" ;\ -+# $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ ++# $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ +# fi ;\ +# done -+# $(install) -m 644 pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) - @if [ -f /etc/redhat-release ] ; then \ - echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ - mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ++# @if [ -f /etc/redhat-release ] ; then \ ++# echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ ++# mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++# fi ++# @if [ -f /etc/turbolinux-release ] ; then \ ++# echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ ++# mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 755 adsl-init-turbolinux $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++# fi ++# @if [ -f /etc/SuSE-release ] ; then \ ++# echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ ++# mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++# fi ++# @echo "" ++# @echo "Type 'adsl-setup' to configure the software." + + distro: + cd ..; \ +@@ -190,7 +190,7 @@ + cp configs/$$i rp-pppoe-$(VERSION)/configs || exit 1; \ + done ; \ + mkdir rp-pppoe-$(VERSION)/doc || exit 1; \ +- for i in CHANGES KERNEL-MODE-PPPOE HOW-TO-CONNECT LICENSE PROBLEMS ; do \ ++ for i in CHANGES HOW-TO-CONNECT LICENSE PROBLEMS ; do \ + cp doc/$$i rp-pppoe-$(VERSION)/doc || exit 1; \ + done; \ + mkdir rp-pppoe-$(VERSION)/man || exit 1; \ diff --git a/net/rp-pppoe/patches/patch-ab b/net/rp-pppoe/patches/patch-ab index ae264215634..65f5d22b6a8 100644 --- a/net/rp-pppoe/patches/patch-ab +++ b/net/rp-pppoe/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.3 2001/02/19 21:26:14 tron Exp $ +$NetBSD: patch-ab,v 1.4 2001/03/18 18:55:29 tron Exp $ ---- adsl-setup.in.orig Mon Jan 8 15:58:35 2001 -+++ adsl-setup.in Mon Feb 19 22:23:47 2001 +--- ../scripts/adsl-setup.in.orig Mon Jan 8 15:58:35 2001 ++++ ../scripts/adsl-setup.in Mon Feb 19 22:23:47 2001 @@ -304,6 +304,7 @@ if [ "$DNS2" != "" ] ; then $ECHO "nameserver $DNS2" >> /etc/resolv.conf diff --git a/net/rp-pppoe/patches/patch-ac b/net/rp-pppoe/patches/patch-ac new file mode 100644 index 00000000000..53cb2ad3f06 --- /dev/null +++ b/net/rp-pppoe/patches/patch-ac @@ -0,0 +1,15 @@ +$NetBSD: patch-ac,v 1.3 2001/03/18 18:55:29 tron Exp $ + +--- pppoe.h.orig Mon Feb 5 17:34:49 2001 ++++ pppoe.h Sun Mar 18 19:11:33 2001 +@@ -72,7 +72,9 @@ + #ifdef USE_BPF + extern int bpfSize; + struct PPPoEPacketStruct; +-void sessionDiscoveryPacket(struct PPPoEPacketStruct *packet); ++struct PPPoEConnectionStruct; ++void sessionDiscoveryPacket(struct PPPoEConnectionStruct *conn, ++ struct PPPoEPacketStruct *packet); + #define BPF_BUFFER_IS_EMPTY (bpfSize <= 0) + #define BPF_BUFFER_HAS_DATA (bpfSize > 0) + #define ethhdr ether_header diff --git a/net/rp-pppoe/patches/patch-ad b/net/rp-pppoe/patches/patch-ad new file mode 100644 index 00000000000..b7cb567bb79 --- /dev/null +++ b/net/rp-pppoe/patches/patch-ad @@ -0,0 +1,52 @@ +$NetBSD: patch-ad,v 1.1 2001/03/18 18:55:29 tron Exp $ + +--- pppoe.c.orig Mon Feb 5 17:34:49 2001 ++++ pppoe.c Sun Mar 18 19:14:55 2001 +@@ -109,7 +109,7 @@ + * packet before passing it here. + ***********************************************************************/ + void +-sessionDiscoveryPacket(PPPoEPacket *packet) ++sessionDiscoveryPacket(PPPoEConnection *conn, PPPoEPacket *packet) + { + /* Sanity check */ + if (packet->code != CODE_PADT) { +@@ -117,7 +117,7 @@ + } + + /* It's a PADT, all right. Is it for us? */ +- if (packet->session != Session) { ++ if (packet->session != conn->session) { + /* Nope, ignore it */ + return; + } +@@ -222,9 +222,9 @@ + /* check for buffered session data */ + while (BPF_BUFFER_HAS_DATA) { + if (conn->synchronous) { +- syncReadFromEth(conn->sessionSocket, optClampMSS); ++ syncReadFromEth(conn, conn->sessionSocket, optClampMSS); + } else { +- asyncReadFromEth(conn->sessionSocket, optClampMSS); ++ asyncReadFromEth(conn, conn->sessionSocket, optClampMSS); + } + } + #endif +@@ -642,7 +642,7 @@ + /* Make sure this is a session packet before processing further */ + type = etherType(&packet); + if (type == Eth_PPPOE_Discovery) { +- sessionDiscoveryPacket(&packet); ++ sessionDiscoveryPacket(conn, &packet); + } else if (type != Eth_PPPOE_Session) { + return; + } +@@ -767,7 +767,7 @@ + /* Make sure this is a session packet before processing further */ + type = etherType(&packet); + if (type == Eth_PPPOE_Discovery) { +- sessionDiscoveryPacket(&packet); ++ sessionDiscoveryPacket(conn, &packet); + } else if (type != Eth_PPPOE_Session) { + return; + } diff --git a/net/rp-pppoe/pkg/PLIST b/net/rp-pppoe/pkg/PLIST index 2b09066fe27..1bec66d12d0 100644 --- a/net/rp-pppoe/pkg/PLIST +++ b/net/rp-pppoe/pkg/PLIST @@ -1,4 +1,5 @@ -@comment $NetBSD: PLIST,v 1.5 2001/02/20 07:43:23 tron Exp $ +@comment $NetBSD: PLIST,v 1.6 2001/03/18 18:55:29 tron Exp $ +etc/rc.d/pppoe man/man5/pppoe.conf.5 man/man8/adsl-connect.8 man/man8/adsl-setup.8 @@ -7,7 +8,6 @@ man/man8/adsl-status.8 man/man8/adsl-stop.8 man/man8/pppoe.8 man/man8/pppoe-server.8 -man/man8/pppoe-sniff.8 sbin/adsl-connect sbin/adsl-setup sbin/adsl-start @@ -15,7 +15,6 @@ sbin/adsl-status sbin/adsl-stop sbin/pppoe sbin/pppoe-server -sbin/pppoe-sniff share/doc/rp-pppoe/CHANGES share/doc/rp-pppoe/HOW-TO-CONNECT share/doc/rp-pppoe/LICENSE |