summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/openvpn
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-support/openvpn')
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch9
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn/run-ptest5
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn_2.6.14.bb (renamed from meta-networking/recipes-support/openvpn/openvpn_2.6.10.bb)50
3 files changed, 55 insertions, 9 deletions
diff --git a/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch b/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch
index 03b454d625..e1253db1ec 100644
--- a/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch
+++ b/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch
@@ -1,4 +1,4 @@
1From ea179d83b0aa62719d90748cd1fb260f40055f15 Mon Sep 17 00:00:00 2001 1From 9cc13bdcb71cd16d2873637c491e07c01de9a3ea Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com> 2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Mon, 13 Jun 2022 22:44:28 +0800 3Date: Mon, 13 Jun 2022 22:44:28 +0800
4Subject: [PATCH] configure.ac: eliminate build path from openvpn --version 4Subject: [PATCH] configure.ac: eliminate build path from openvpn --version
@@ -31,10 +31,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
31 1 file changed, 1 insertion(+), 1 deletion(-) 31 1 file changed, 1 insertion(+), 1 deletion(-)
32 32
33diff --git a/configure.ac b/configure.ac 33diff --git a/configure.ac b/configure.ac
34index 2f5f6bc..eddcbc5 100644 34index df16c43..623ca65 100644
35--- a/configure.ac 35--- a/configure.ac
36+++ b/configure.ac 36+++ b/configure.ac
37@@ -1377,7 +1377,7 @@ if test "${enable_async_push}" = "yes"; then 37@@ -1463,7 +1463,7 @@ if test "${enable_async_push}" = "yes"; then
38 esac 38 esac
39 fi 39 fi
40 40
@@ -43,6 +43,3 @@ index 2f5f6bc..eddcbc5 100644
43 AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings]) 43 AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings])
44 44
45 TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID" 45 TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID"
46--
472.25.1
48
diff --git a/meta-networking/recipes-support/openvpn/openvpn/run-ptest b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
new file mode 100644
index 0000000000..5b187d9086
--- /dev/null
+++ b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
@@ -0,0 +1,5 @@
1#!/bin/sh
2for x in `find ./ -name Makefile`;
3do
4 make -C `dirname ${x}` -k runtest-TESTS
5done
diff --git a/meta-networking/recipes-support/openvpn/openvpn_2.6.10.bb b/meta-networking/recipes-support/openvpn/openvpn_2.6.14.bb
index ba53d40f47..67ea09fad5 100644
--- a/meta-networking/recipes-support/openvpn/openvpn_2.6.10.bb
+++ b/meta-networking/recipes-support/openvpn/openvpn_2.6.14.bb
@@ -3,18 +3,19 @@ HOMEPAGE = "https://openvpn.net/"
3SECTION = "net" 3SECTION = "net"
4LICENSE = "GPL-2.0-only" 4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://COPYING;md5=89196bacc47ed37a5b242a535661a049" 5LIC_FILES_CHKSUM = "file://COPYING;md5=89196bacc47ed37a5b242a535661a049"
6DEPENDS = "lzo lz4 openssl iproute2 libcap-ng ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" 6DEPENDS = "lzo lz4 openssl iproute2 libcap-ng ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} ${@bb.utils.contains('PTEST_ENABLED', '1', 'cmocka', '', d)} "
7 7
8inherit autotools systemd update-rc.d pkgconfig 8inherit autotools systemd update-rc.d pkgconfig ptest
9 9
10SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \ 10SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
11 file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \ 11 file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \
12 file://openvpn \ 12 file://openvpn \
13 file://run-ptest \
13 " 14 "
14 15
15UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads" 16UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
16 17
17SRC_URI[sha256sum] = "1993bbb7b9edb430626eaa24573f881fd3df642f427fcb824b1aed1fca1bcc9b" 18SRC_URI[sha256sum] = "9eb6a6618352f9e7b771a9d38ae1631b5edfeed6d40233e243e602ddf2195e7a"
18 19
19CVE_STATUS[CVE-2020-27569] = "not-applicable-config: Applies only Aviatrix OpenVPN client, not openvpn" 20CVE_STATUS[CVE-2020-27569] = "not-applicable-config: Applies only Aviatrix OpenVPN client, not openvpn"
20 21
@@ -42,6 +43,8 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
42PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" 43PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
43PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" 44PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
44 45
46RDEPENDS:${PN}-ptest:append = " make bash"
47
45do_install:append() { 48do_install:append() {
46 install -d ${D}/${sysconfdir}/init.d 49 install -d ${D}/${sysconfdir}/init.d
47 install -m 755 ${UNPACKDIR}/openvpn ${D}/${sysconfdir}/init.d 50 install -m 755 ${UNPACKDIR}/openvpn ${D}/${sysconfdir}/init.d
@@ -63,6 +66,47 @@ do_install:append() {
63 install -d -m 710 ${D}/${localstatedir}/lib/openvpn 66 install -d -m 710 ${D}/${localstatedir}/lib/openvpn
64} 67}
65 68
69do_compile_ptest () {
70 for x in `find ${B}/tests/unit_tests -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
71 dir=`dirname ${x}`
72 case $dir in
73 *example*)
74 echo "Skipping directory: $dir"
75 ;;
76 *)
77 oe_runmake -C ${dir} buildtest-TESTS
78 ;;
79 esac
80 done
81}
82
83do_install_ptest() {
84 for x in $(find ${B}/tests/unit_tests -name Makefile -exec grep -l buildtest-TESTS {} \;); do
85 dir=$(dirname ${x})
86
87 if [[ "$dir" == *example* ]]; then
88 continue
89 fi
90
91 target_dir="${D}/${PTEST_PATH}/unit_tests/$(basename ${dir})"
92 mkdir -p ${target_dir}
93 cp -f ${dir}/Makefile ${target_dir}/
94 sed -i "s/^Makefile:/MM:/g" ${target_dir}/Makefile
95 sed -i 's/^#TESTS = $(am__EXEEXT_4)/TESTS = $(am__EXEEXT_4)/' ${target_dir}/Makefile
96
97 for testfile in $(find ${dir} -name "*testdriver"); do
98 cp -rf ${testfile} ${target_dir}/
99 done
100 done
101 sed -i 's|find ./|find ${PTEST_PATH}|g' ${D}${PTEST_PATH}/run-ptest
102 sed -i 's|${top_builddir}/src/openvpn|${sbindir}|g' ${S}/tests/t_lpback.sh
103 cp -f ${S}/tests/t_lpback.sh ${D}/${PTEST_PATH}
104 cp -f ${B}/tests/Makefile ${D}/${PTEST_PATH}
105 sed -i "s/^Makefile:/MM:/g" ${D}/${PTEST_PATH}/Makefile
106 sed -i "s/^test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh/test_scripts = t_lpback.sh/g" ${D}/${PTEST_PATH}/Makefile
107
108}
109
66PACKAGES =+ " ${PN}-sample " 110PACKAGES =+ " ${PN}-sample "
67 111
68RRECOMMENDS:${PN} = "kernel-module-tun" 112RRECOMMENDS:${PN} = "kernel-module-tun"