initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
config BR2_PACKAGE_OPENVPN
|
||||
bool "openvpn"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
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
|
||||
accomodate 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
|
||||
@@ -0,0 +1,99 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# 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:
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated after checking signature
|
||||
sha256 56c0dcd27ab938c4ad07469c86eb8b7408ef64c3e68f98497db8c03f11792436 openvpn-2.5.4.tar.xz
|
||||
sha256 1fcb78d7e478bb8a9408010bdc91b36e213b1facfad093df3f7ce7e28af19043 COPYRIGHT.GPL
|
||||
@@ -0,0 +1,79 @@
|
||||
################################################################################
|
||||
#
|
||||
# openvpn
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPENVPN_VERSION = 2.5.4
|
||||
OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
|
||||
OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
|
||||
OPENVPN_DEPENDENCIES = host-pkgconf
|
||||
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
|
||||
|
||||
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))
|
||||
Reference in New Issue
Block a user