From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1YGQj2-0001ru-GQ for ptxdist@pengutronix.de; Wed, 28 Jan 2015 12:24:01 +0100 Received: by mail-we0-f171.google.com with SMTP id k11so17792777wes.2 for ; Wed, 28 Jan 2015 03:23:55 -0800 (PST) From: Alexander Aring Date: Wed, 28 Jan 2015 12:23:34 +0100 Message-Id: <1422444214-29670-4-git-send-email-alex.aring@gmail.com> In-Reply-To: <1422444214-29670-1-git-send-email-alex.aring@gmail.com> References: <1422444214-29670-1-git-send-email-alex.aring@gmail.com> Subject: [ptxdist] [PATCHv3 3/3] openvpn: rework and version bump Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Alexander Aring This patch reworks the openvpn rules. Some points which are new now: - systemd support if OPENVPN_SYSTEMD - install openvpn sample configs as reference for /etc/openvpn/ - install openvpn sample scripts (ethernet bridging) - add required environemnt for networking utilities while configure - add several missed autoconf configure options Additional this patch do a version bump to 2.3.6 Signed-off-by: Alexander Aring --- rules/openvpn.in | 29 ++++++++++++++++++++++++++- rules/openvpn.make | 59 +++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 75 insertions(+), 13 deletions(-) diff --git a/rules/openvpn.in b/rules/openvpn.in index 3649968..3ad493a 100644 --- a/rules/openvpn.in +++ b/rules/openvpn.in @@ -4,7 +4,16 @@ menuconfig OPENVPN tristate prompt "openvpn " select OPENSSL - select LIBLZO if OPENVPN_LZO + select LIBLZO if OPENVPN_LZO + select SYSTEMD if OPENVPN_SYSTEMD + select IPTABLES if OPENVPN_INSTALL_SAMPLE_CONFIGS && RUNTIME + select IPTABLES_INSTALL_TOOLS if OPENVPN_INSTALL_SAMPLE_CONFIGS && RUNTIME + select BRIDGE_UTILS if OPENVPN_INSTALL_SAMPLE_SCRIPTS && RUNTIME + select IPROUTE2 if !BUSYBOX_IP && RUNTIME + select IPROUTE2_IP if !BUSYBOX_IP && RUNTIME + select BUSYBOX_IFCONFIG if RUNTIME + select BUSYBOX_NETSTAT if RUNTIME + select BUSYBOX_ROUTE if RUNTIME help virtual private network daemon @@ -34,4 +43,22 @@ config OPENVPN_LZO will select the LZO library as well. If unsure, say N. +config OPENVPN_SYSTEMD + bool + prompt "Enable systemd support" + help + This enables systemd support for openvpn. + +config OPENVPN_INSTALL_SAMPLE_CONFIGS + bool + prompt "Install sample configs" + help + Install sample configs into /usr/share/openvpn/sample-config-files. + +config OPENVPN_INSTALL_SAMPLE_SCRIPTS + bool + prompt "Install sample scripts" + help + Install sample scripts into /usr/share/openvpn/sample-scripts. + endif diff --git a/rules/openvpn.make b/rules/openvpn.make index d288d43..7cfa427 100644 --- a/rules/openvpn.make +++ b/rules/openvpn.make @@ -16,11 +16,11 @@ PACKAGES-$(PTXCONF_OPENVPN) += openvpn # # Paths and names # -OPENVPN_VERSION := 2.1.1 -OPENVPN_MD5 := b273ed2b5ec8616fb9834cde8634bce7 +OPENVPN_VERSION := 2.3.6 +OPENVPN_MD5 := 6ca03fe0fd093e0d01601abee808835c OPENVPN := openvpn-$(OPENVPN_VERSION) OPENVPN_SUFFIX := tar.gz -OPENVPN_URL := http://openvpn.net/release/$(OPENVPN).$(OPENVPN_SUFFIX) +OPENVPN_URL := http://swupdate.openvpn.org/community/releases/$(OPENVPN).$(OPENVPN_SUFFIX) OPENVPN_SOURCE := $(SRCDIR)/$(OPENVPN).$(OPENVPN_SUFFIX) OPENVPN_DIR := $(BUILDDIR)/$(OPENVPN) @@ -29,18 +29,36 @@ OPENVPN_DIR := $(BUILDDIR)/$(OPENVPN) # ---------------------------------------------------------------------------- OPENVPN_PATH := PATH=$(CROSS_PATH) -OPENVPN_ENV := $(CROSS_ENV) +OPENVPN_ENV := \ + $(CROSS_ENV) \ + IFCONFIG=/sbin/ifconfig \ + ROUTE=/sbin/route \ + IPROUTE=/sbin/ip \ + NETSTAT=/bin/netstat # # autoconf # -OPENVPN_AUTOCONF := $(CROSS_AUTOCONF_USR) +OPENVPN_AUTOCONF := \ + $(CROSS_AUTOCONF_USR) \ + --$(call ptx/endis, PTXCONF_OPENVPN_LZO)-lzo \ + --disable-plugins \ + --disable-debug \ + --enable-small \ + --disable-iproute2 \ + --disable-selinux \ + --$(call ptx/endis, PTXCONF_OPENVPN_SYSTEMD)-systemd \ + --with-crypto-library=openssl -ifdef PTXCONF_OPENVPN_LZO -OPENVPN_AUTOCONF += --enable-lzo -else -OPENVPN_AUTOCONF += --disable-lzo -endif +OPENVPN_INSTALL_SAMPLE_CONFIG_FILES := \ + client.conf loopback-client loopback-server README server.conf \ + static-home.conf static-office.conf tls-home.conf tls-office.conf \ + xinetd-client-config xinetd-server-config + +OPENVPN_INSTALL_SAMPLE_CONFIG_SCRIPTS := \ + firewall.sh home.up office.up openvpn-shutdown.sh openvpn-startup.sh + +OPENVPN_INSTALL_SAMPLE_SCRIPTS := bridge-start bridge-stop # ---------------------------------------------------------------------------- # Target-Install @@ -55,9 +73,26 @@ $(STATEDIR)/openvpn.targetinstall: @$(call install_fixup, openvpn,AUTHOR,"Carsten Schlote ") @$(call install_fixup, openvpn,DESCRIPTION,missing) - @$(call install_copy, openvpn, 0, 0, 0755, -, /usr/sbin/openvpn) +ifdef PTXCONF_OPENVPN_INSTALL_SAMPLE_CONFIGS + @$(foreach file,$(OPENVPN_INSTALL_SAMPLE_CONFIG_FILES), \ + $(call install_copy, openvpn, 0, 0, 0644, \ + $(OPENVPN_DIR)/sample/sample-config-files/$(file), \ + /usr/share/openvpn/sample-config-files/$(file));) - @$(call install_copy, openvpn, 0, 0, 0755, /etc/openvpn) + @$(foreach script,$(OPENVPN_INSTALL_SAMPLE_CONFIG_SCRIPTS), \ + $(call install_copy, openvpn, 0, 0, 0755, \ + $(OPENVPN_DIR)/sample/sample-config-files/$(script), \ + /usr/share/openvpn/sample-config-files/$(script));) +endif + +ifdef PTXCONF_OPENVPN_INSTALL_SAMPLE_SCRIPTS + @$(foreach script,$(OPENVPN_INSTALL_SAMPLE_SCRIPTS), \ + $(call install_copy, openvpn, 0, 0, 0755, \ + $(OPENVPN_DIR)/sample/sample-scripts/$(script), \ + /usr/share/openvpn/sample-scripts/$(script));) +endif + + @$(call install_copy, openvpn, 0, 0, 0755, -, /usr/sbin/openvpn) @$(call install_finish, openvpn) -- 2.2.2 -- ptxdist mailing list ptxdist@pengutronix.de