initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

72
rp-pppoe/PKGBUILD Normal file
View File

@@ -0,0 +1,72 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=rp-pppoe
pkgver=3.12
_debver=3.12
_debrel=1.2
pkgrel=2
pkgdesc="Point-to-Point Protocol over Ethernet client"
arch=('i686' 'x86_64')
url='https://dianne.skoll.ca/projects/rp-pppoe/'
license=('GPL')
depends=('ppp=2.4.7' 'sh' 'net-tools')
makedepends=('quilt')
backup=(etc/ppp/pppoe.conf
etc/ppp/firewall-standalone
etc/ppp/firewall-masq
etc/ppp/pppoe-server-options)
options=('!makeflags')
install=rp-pppoe.install
source=(https://dianne.skoll.ca/projects/rp-pppoe/download/OLD/rp-pppoe-$pkgver.tar.gz{,.sig}
https://deb.debian.org/debian/pool/main/r/rp-pppoe/rp-pppoe_$_debver-$_debrel.debian.tar.xz
kmode.patch
rp-pppoe-3.12-linux-headers.patch
libre.patch
rp-pppoe.initd)
sha512sums=('1b9e4c806fcbad1bc21f7b74a780ae98682b10a69d91fb08df6dbd1fff86f6271995ebded43f926f8249a17cdddb541edccbbb3ee28e1a2dc89173ad61cd3de1'
'SKIP'
'262b1ecb6faae457ae2e9a84ada7e91bc2abb07fce9bb367ee27e0419d89a43a0c31164a4614c4e006f6f60ebc3a3ffb3e97e655168b80c305373b6530da0bb2'
'97c4befc7374df564bc54fab2b68e692b03f22fc190b615e862448c2d11dbfda003569499f6921044c9d47c4c6bba97a9da573e099dc5b8593241da14e6f6e6b'
'b4d25bfd060e8ab63978ac243516c92d889a2a00b1cb786c0c3bc9ca892c43e0e76c24964aa3165a5a4bb3eb56af8df20be4f99accb8bfb812a4678e8bf9980c'
'eaaea24d2bd3f9b2a16f20e58c5751523f4c512a3f2e83277e80a2c6e6c61b1d650792b87b0d42dac1437553331fbe429f39c6e0a7fa68591f6ccc81f146996c'
'3395a7b5f7623711a8e6c9ea06eb36e0cbd3449abf755b835ef5e3428a1d508ff703e1e42837b6c61b937a6df9ca358637ac3ffd3b0c66616f165b48cef4df58')
validpgpkeys=('FC2E9B645468698FD7B21655C1842E2A126F42E0') # Dianne Skoll
prepare() {
cd "$srcdir/$pkgname-$pkgver"
if [[ $pkgver = $_debver ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
## remove nonfree software recommendation (ServPoET)
rm -v SERVPOET
patch -Np1 -i "$srcdir/libre.patch"
cd "$srcdir/$pkgname-$pkgver/src"
patch -Np2 -i ../../kmode.patch
patch -Np2 -i ../../rp-pppoe-3.12-linux-headers.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver/src"
./configure --prefix=/usr --enable-plugin
make PLUGIN_DIR="/usr/lib/rp-pppoe" all rp-pppoe.so
}
package() {
cd "$srcdir/$pkgname-$pkgver/src"
make PLUGIN_DIR="/usr/lib/rp-pppoe" DESTDIR="$pkgdir" install
#install -Dm755 "$srcdir/adsl" "$pkgdir/etc/rc.d/adsl"
install -Dm755 "$srcdir/rp-pppoe.initd" "$pkgdir/etc/init.d/rp-pppoe"
sed -e 's|/var/run|/run|g' \
-i "$pkgdir/etc/init.d/rp-pppoe"
}

19
rp-pppoe/kmode.patch Normal file
View File

@@ -0,0 +1,19 @@
diff -up rp-pppoe-3.11/src/configure.orig rp-pppoe-3.11/src/configure
--- rp-pppoe-3.11/src/configure.orig 2012-08-17 12:31:25.000000000 -0600
+++ rp-pppoe-3.11/src/configure 2013-02-11 14:23:05.000000000 -0700
@@ -3709,6 +3709,7 @@ do :
#include<net/ethernet.h>
#include<linux/if.h>
#include<linux/in.h>
+#include<linux/in6.h>
"
if test "x$ac_cv_header_linux_if_pppox_h" = x""yes; then :
@@ -4559,6 +4559,7 @@ else
#include <net/ethernet.h>
#include <linux/if.h>
#include <netinet/in.h>
+#include <linux/in6.h>
#include <linux/if_pppox.h>
int main()
{

88
rp-pppoe/libre.patch Normal file
View File

@@ -0,0 +1,88 @@
diff -Nur rp-pppoe-3.11.orig/rp-pppoe.spec rp-pppoe-3.11/rp-pppoe.spec
--- rp-pppoe-3.11.orig/rp-pppoe.spec 2012-08-17 15:31:25.000000000 -0300
+++ rp-pppoe-3.11/rp-pppoe.spec 2012-10-05 01:42:29.964508454 -0300
@@ -55,7 +55,7 @@
%files
%defattr(-,root,root)
-%doc doc/CHANGES doc/HOW-TO-CONNECT doc/LICENSE doc/KERNEL-MODE-PPPOE README SERVPOET
+%doc doc/CHANGES doc/HOW-TO-CONNECT doc/LICENSE doc/KERNEL-MODE-PPPOE README
%config(noreplace) /etc/ppp/pppoe.conf
%config(noreplace) /etc/ppp/pppoe-server-options
%config(noreplace) /etc/ppp/firewall-masq
diff -Nur rp-pppoe-3.12.orig/src/Makefile.in rp-pppoe-3.12/src/Makefile.in
--- rp-pppoe-3.12.orig/src/Makefile.in 2015-11-11 12:10:02.000000000 -0300
+++ rp-pppoe-3.12/src/Makefile.in 2016-01-14 15:09:01.441919395 -0300
@@ -44,9 +44,6 @@
PPPOE_PATH=$(sbindir)/pppoe
PPPD_PATH=@PPPD@
-# Include ServPoET version if we're building for ServPoET
-@LIC_MAKEFILE_INCLUDE@
-
# Kernel-mode plugin gets installed here.
PLUGIN_DIR=/etc/ppp/plugins
PLUGIN_PATH=$(PLUGIN_DIR)/rp-pppoe.so
@@ -171,7 +168,6 @@
$(install) -m 644 ../doc/HOW-TO-CONNECT $(DESTDIR)$(docdir)
$(install) -m 644 ../doc/LICENSE $(DESTDIR)$(docdir)
$(install) -m 644 ../README $(DESTDIR)$(docdir)
- $(install) -m 644 ../SERVPOET $(DESTDIR)$(docdir)
$(install) -m 644 ../configs/pap-secrets $(DESTDIR)$(docdir)
-mkdir -p $(DESTDIR)$(mandir)/man8
for i in $(TARGETS) ; do \
@@ -229,25 +225,15 @@
@echo ""
@echo "Type 'pppoe-setup' to configure the software."
-servpoet-tgz: distro-servpoet
- cd .. && tar cvf servpoet-$(VERSION)$(BETA).tar servpoet-$(VERSION)$(BETA)
- gzip -f -v -9 ../servpoet-$(VERSION)$(BETA).tar
- rm -rf ../servpoet-$(VERSION)$(BETA)
-
tgz: distro
cd .. && tar cvf rp-pppoe-$(VERSION)$(BETA).tar rp-pppoe-$(VERSION)$(BETA)
gzip -f -v -9 ../rp-pppoe-$(VERSION)$(BETA).tar
rm -rf ../rp-pppoe-$(VERSION)$(BETA)
-distro-servpoet: distro
- cp ../servpoet.spec ../rp-pppoe-$(VERSION)$(BETA)
- $(MAKE) -C licensed-only distro VERSION=$(VERSION) BETA=$(BETA)
- mv ../rp-pppoe-$(VERSION)$(BETA) ../servpoet-$(VERSION)$(BETA)
-
distro:
rm -rf ../rp-pppoe-$(VERSION)$(BETA)
mkdir ../rp-pppoe-$(VERSION)$(BETA)
- for i in README SERVPOET go go-gui rp-pppoe.spec ; do \
+ for i in README go go-gui rp-pppoe.spec ; do \
cp ../$$i ../rp-pppoe-$(VERSION)$(BETA) || exit 1; \
done
mkdir ../rp-pppoe-$(VERSION)$(BETA)/gui
@@ -305,10 +291,6 @@
/usr/src/redhat/RPMS/i386/rp-pppoe-$(VERSION)-1.i386.rpm \
/usr/src/redhat/RPMS/i386/rp-pppoe-gui-$(VERSION)-1.i386.rpm
-servpoet-rpms: servpoet-tgz
- cp ../servpoet-$(VERSION).tar.gz /usr/src/redhat/SOURCES
- cd .. && rpm -ba servpoet.spec
-
clean:
rm -f *.o pppoe-relay pppoe pppoe-sniff pppoe-server core rp-pppoe.so plugin/*.o plugin/libplugin.a *~
test -f licensed-only/Makefile && $(MAKE) -C licensed-only clean || true
@@ -323,15 +305,13 @@
update-version:
sed -e 's/^Version: .*$$/Version: $(VERSION)/' ../rp-pppoe.spec > ../rp-pppoe.spec.new && mv ../rp-pppoe.spec.new ../rp-pppoe.spec
sed -e 's+^Source: .*$$+Source: http://www.roaringpenguin.com/pppoe/rp-pppoe-$(VERSION).tar.gz+' ../rp-pppoe.spec > ../rp-pppoe.spec.new && mv ../rp-pppoe.spec.new ../rp-pppoe.spec
- test -f ../servpoet.spec && sed -e 's/^Version: .*$$/Version: $(VERSION)/' ../servpoet.spec > ../servpoet.spec.new && mv ../servpoet.spec.new ../servpoet.spec || true
- test -f ../servpoet.spec && sed -e 's+^Source: .*$$+Source: http://www.roaringpenguin.com/pppoe/servpoet-$(VERSION).tar.gz+' ../servpoet.spec > ../servpoet.spec.new && mv ../servpoet.spec.new ../servpoet.spec || true
# Convenience target for Dianne! Don't try to use this one.
km:
./configure --enable-plugin=/home/dfs/Archive/PPP/ppp-2.4.0.pppoe4-patched-dfs
licensed-only:
- $(MAKE) -C licensed-only all VERSION=$(VERSION) SERVPOET_VERSION=$(SERVPOET_VERSION)
+ $(MAKE) -C licensed-only all VERSION=$(VERSION)
l2tp: libevent/libevent.a
$(MAKE) -C l2tp all

View File

@@ -0,0 +1,28 @@
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>
--- a/src/pppoe.h
+++ b/src/pppoe.h
@@ -47,6 +47,8 @@
#include <sys/socket.h>
#endif
+#include <netinet/in.h>
+
/* Ugly header files on some Linux boxes... */
#if defined(HAVE_LINUX_IF_H)
#include <linux/if.h>
@@ -84,8 +86,6 @@ typedef unsigned long UINT32_t;
#include <linux/if_ether.h>
#endif
-#include <netinet/in.h>
-
#ifdef HAVE_NETINET_IF_ETHER_H
#include <sys/types.h>

28
rp-pppoe/rp-pppoe.initd Normal file
View File

@@ -0,0 +1,28 @@
#!/sbin/openrc-run
# Copyright 2017-2022 Hyperbola Project
# Distributed under the terms of the GNU General Public License, v2 or later
description="RP-PPPoE service"
depend() {
need localmount
provide net
}
start() {
ebegin "Starting rp-pppoe"
/usr/sbin/pppoe-start
eend $?
}
status() {
ebegin "Getting rp-pppoe status"
/usr/sbin/pppoe-status
eend $?
}
stop() {
ebegin "Stopping rp-pppoe"
/usr/sbin/pppoe-stop
eend $?
}

12
rp-pppoe/rp-pppoe.install Normal file
View File

@@ -0,0 +1,12 @@
#arg 1: the new package version
post_install() {
echo ">>> The kernel-mode plugin has a new place."
echo ">>> It's now located under /usr/lib/rp-pppoe/rp-pppoe.so"
echo ">>> Change LINUX_PLUGIN to the new path in your /etc/ppp/pppoe.conf"
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install $1
}