diff options
Diffstat (limited to 'meta-networking/recipes-support/openvpn/openvpn_2.6.9.bb')
-rw-r--r-- | meta-networking/recipes-support/openvpn/openvpn_2.6.9.bb | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/openvpn/openvpn_2.6.9.bb b/meta-networking/recipes-support/openvpn/openvpn_2.6.9.bb new file mode 100644 index 000000000..3af6b30a7 --- /dev/null +++ b/meta-networking/recipes-support/openvpn/openvpn_2.6.9.bb | |||
@@ -0,0 +1,76 @@ | |||
1 | SUMMARY = "A full-featured SSL VPN solution via tun device." | ||
2 | HOMEPAGE = "https://openvpn.net/" | ||
3 | SECTION = "net" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=4b34e946059f80dcfd811e8dd471b5ed" | ||
6 | DEPENDS = "lzo lz4 openssl iproute2 libcap-ng ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
7 | |||
8 | inherit autotools systemd update-rc.d pkgconfig | ||
9 | |||
10 | SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \ | ||
11 | file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \ | ||
12 | file://openvpn \ | ||
13 | " | ||
14 | |||
15 | UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads" | ||
16 | |||
17 | SRC_URI[sha256sum] = "e08d147e15b4508dfcd1d6618a1f21f1495f9817a8dadc1eddf0532fa116d7e3" | ||
18 | |||
19 | CVE_STATUS[CVE-2020-27569] = "not-applicable-config: Applies only Aviatrix OpenVPN client, not openvpn" | ||
20 | |||
21 | INITSCRIPT_PACKAGES = "${PN}" | ||
22 | INITSCRIPT_NAME:${PN} = "openvpn" | ||
23 | INITSCRIPT_PARAMS:${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ." | ||
24 | |||
25 | CFLAGS += "-fno-inline" | ||
26 | |||
27 | # I want openvpn to be able to read password from file (hrw) | ||
28 | EXTRA_OECONF += "--enable-iproute2" | ||
29 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}" | ||
30 | |||
31 | # Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host. | ||
32 | EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip" | ||
33 | |||
34 | EXTRA_OECONF += "SYSTEMD_UNIT_DIR=${systemd_system_unitdir} \ | ||
35 | TMPFILES_DIR=${nonarch_libdir}/tmpfiles.d \ | ||
36 | " | ||
37 | |||
38 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | ||
39 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ | ||
40 | " | ||
41 | |||
42 | PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" | ||
43 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
44 | |||
45 | do_install:append() { | ||
46 | install -d ${D}/${sysconfdir}/init.d | ||
47 | install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d | ||
48 | |||
49 | install -d ${D}/${sysconfdir}/openvpn | ||
50 | install -d ${D}/${sysconfdir}/openvpn/server | ||
51 | install -d ${D}/${sysconfdir}/openvpn/client | ||
52 | |||
53 | install -d ${D}/${sysconfdir}/openvpn/sample | ||
54 | install -m 644 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf | ||
55 | install -m 644 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf | ||
56 | install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-config-files | ||
57 | install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys | ||
58 | install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-scripts | ||
59 | install -m 644 ${S}/sample/sample-config-files/* ${D}${sysconfdir}/openvpn/sample/sample-config-files | ||
60 | install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys | ||
61 | install -m 644 ${S}/sample/sample-scripts/* ${D}${sysconfdir}/openvpn/sample/sample-scripts | ||
62 | |||
63 | install -d -m 710 ${D}/${localstatedir}/lib/openvpn | ||
64 | } | ||
65 | |||
66 | PACKAGES =+ " ${PN}-sample " | ||
67 | |||
68 | RRECOMMENDS:${PN} = "kernel-module-tun" | ||
69 | |||
70 | FILES:${PN}-dbg += "${libdir}/openvpn/plugins/.debug" | ||
71 | FILES:${PN} += "${systemd_system_unitdir}/openvpn-server@.service \ | ||
72 | ${systemd_system_unitdir}/openvpn-client@.service \ | ||
73 | ${nonarch_libdir}/tmpfiles.d \ | ||
74 | " | ||
75 | FILES:${PN}-sample = "${sysconfdir}/openvpn/sample/ \ | ||
76 | " | ||