Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

41
package/openvpn/Config.in Normal file
View File

@@ -0,0 +1,41 @@
config BR2_PACKAGE_OPENVPN
bool "openvpn"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libcap-ng
select BR2_PACKAGE_LIBCAP_NG
select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
help
OpenVPN is a full-featured SSL VPN solution which can
accommodate a wide range of configurations, including road
warrior access, home/office/campus telecommuting, WiFi
security, secure branch office linking, and enterprise-scale
remote access solutions with load balancing, failover, and
fine-grained access-controls.
http://openvpn.net/
if BR2_PACKAGE_OPENVPN
config BR2_PACKAGE_OPENVPN_LZ4
bool "LZ4 compression"
default y
select BR2_PACKAGE_LZ4
help
Enable LZ4 compression.
config BR2_PACKAGE_OPENVPN_LZO
bool "LZO compression"
default y
select BR2_PACKAGE_LZO
help
Enable LZO compression.
config BR2_PACKAGE_OPENVPN_SMALL
bool "Optimize for small size"
help
Make OpenVPN as small as possible.
You loose eurephia, debugging info, help messages and more.
It saves around 100 KiB in binary file size.
endif

View File

@@ -0,0 +1,99 @@
#!/bin/sh
#
# Original version by Robert Leslie
# <rob@mars.org>, edited by iwj and cs
# Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
# Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>
test $DEBIAN_SCRIPT_DEBUG && set -v -x
CONFIG_DIR=/etc/openvpn
test -d $CONFIG_DIR || exit 0
start_vpn () {
printf " $NAME "
start-stop-daemon -S -p /var/run/openvpn.$NAME.pid -x /usr/sbin/openvpn -- \
--daemon --writepid /var/run/openvpn.$NAME.pid \
--config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop_vpn () {
printf " $NAME "
start-stop-daemon -K -p /var/run/openvpn.$NAME.pid -x /usr/sbin/openvpn
}
case "$1" in
start)
printf "Starting openvpn:"
if test -z $2 ; then
for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
NAME=${CONFIG%%.conf}
start_vpn
done
else
if test -e $CONFIG_DIR/$2.conf ; then
NAME=$2
start_vpn
else
printf " No such VPN: $2"
fi
fi
echo "."
;;
stop)
printf "Stopping openvpn:"
if test -z $2 ; then
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
done
else
if test -e /var/run/openvpn.$2.pid ; then
PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null`
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
else
printf " No such VPN: $2"
fi
fi
echo "."
;;
# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
reload|force-reload)
printf "Reloading openvpn:"
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
# If openvpn if running under a different user than root we'll need to restart
if egrep '^( |\t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
stop_vpn
sleep 1
start_vpn
printf "(restarted)"
else
kill -HUP `cat $PIDFILE` || true
printf " $NAME"
fi
done
echo "."
;;
restart)
$0 stop $2
sleep 1
$0 start $2
;;
*)
echo "Usage: $0 {start|stop|reload|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
# vim:set ai et sts=2 sw=2 tw=0:

View File

@@ -0,0 +1,3 @@
# Locally calculated after checking signature
sha256 10e24a9385f23cc38cc5cf448f3ca0769f939bc4cbecc4f4647d7e006e52db74 openvpn-2.7.6.tar.gz
sha256 edaef632cbb643e4e7a221717a6c441a4c1a7c918e6e4d56debc3d8739b233f6 COPYRIGHT.GPL

View File

@@ -0,0 +1,88 @@
################################################################################
#
# openvpn
#
################################################################################
OPENVPN_VERSION = 2.7.6
OPENVPN_SITE = https://swupdate.openvpn.net/community/releases
OPENVPN_DEPENDENCIES = host-pkgconf libcap-ng
OPENVPN_LICENSE = GPL-2.0
OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
OPENVPN_CPE_ID_VENDOR = openvpn
OPENVPN_SELINUX_MODULES = openvpn
OPENVPN_CONF_OPTS = \
--disable-unit-tests \
$(if $(BR2_STATIC_LIBS),--disable-plugins)
OPENVPN_CONF_ENV = NETSTAT=/bin/netstat
# workaround for static_assert on uclibc-ng < 1.0.42
OPENVPN_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
ifeq ($(BR2_PACKAGE_LIBNL)$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16),yy)
OPENVPN_CONF_OPTS += --enable-dco
OPENVPN_DEPENDENCIES += libnl
else
OPENVPN_CONF_OPTS += --disable-dco
endif
ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y)
OPENVPN_CONF_OPTS += \
--enable-small \
--disable-plugins
endif
ifeq ($(BR2_PACKAGE_OPENVPN_LZ4),y)
OPENVPN_DEPENDENCIES += lz4
else
OPENVPN_CONF_OPTS += --disable-lz4
endif
ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
OPENVPN_DEPENDENCIES += lzo
else
OPENVPN_CONF_OPTS += --disable-lzo
endif
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
OPENVPN_DEPENDENCIES += libselinux
OPENVPN_CONF_OPTS += --enable-selinux
else
OPENVPN_CONF_OPTS += --disable-selinux
endif
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
OPENVPN_DEPENDENCIES += linux-pam
OPENVPN_CONF_OPTS += --enable-plugin-auth-pam
else
OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
OPENVPN_DEPENDENCIES += openssl
OPENVPN_CONF_OPTS += --with-crypto-library=openssl
else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
OPENVPN_DEPENDENCIES += mbedtls
OPENVPN_CONF_OPTS += --with-crypto-library=mbedtls
endif
ifeq ($(BR2_PACKAGE_PKCS11_HELPER),y)
OPENVPN_DEPENDENCIES += pkcs11-helper
OPENVPN_CONF_OPTS += --enable-pkcs11
else
OPENVPN_CONF_OPTS += --disable-pkcs11
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
OPENVPN_DEPENDENCIES += systemd
OPENVPN_CONF_OPTS += --enable-systemd
else
OPENVPN_CONF_OPTS += --disable-systemd
endif
define OPENVPN_INSTALL_INIT_SYSV
$(INSTALL) -m 755 -D package/openvpn/S60openvpn \
$(TARGET_DIR)/etc/init.d/S60openvpn
endef
$(eval $(autotools-package))