summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]meta-networking/recipes-support/openvpn/openvpn/openvpn0
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf1
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn/openvpn@.service12
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn_2.5.7.bb49
4 files changed, 22 insertions, 40 deletions
diff --git a/meta-networking/recipes-support/openvpn/openvpn/openvpn b/meta-networking/recipes-support/openvpn/openvpn/openvpn
index e5af4b2301..e5af4b2301 100755..100644
--- a/meta-networking/recipes-support/openvpn/openvpn/openvpn
+++ b/meta-networking/recipes-support/openvpn/openvpn/openvpn
diff --git a/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf b/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
deleted file mode 100644
index 1205806d52..0000000000
--- a/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
+++ /dev/null
@@ -1 +0,0 @@
1d @LOCALSTATEDIR@/run/openvpn 0755 root root -
diff --git a/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service b/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service
deleted file mode 100644
index 01dd2e8c25..0000000000
--- a/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service
+++ /dev/null
@@ -1,12 +0,0 @@
1[Unit]
2Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I
3After=syslog.target network.target
4
5[Service]
6PrivateTmp=true
7Type=forking
8PIDFile=/var/run/openvpn/%i.pid
9ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --cipher AES-256-GCM --data-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC:AES-128-CBC:BF-CBC --config %i.conf
10
11[Install]
12WantedBy=multi-user.target
diff --git a/meta-networking/recipes-support/openvpn/openvpn_2.5.7.bb b/meta-networking/recipes-support/openvpn/openvpn_2.5.7.bb
index f9998aaa82..7404e6e587 100644
--- a/meta-networking/recipes-support/openvpn/openvpn_2.5.7.bb
+++ b/meta-networking/recipes-support/openvpn/openvpn_2.5.7.bb
@@ -5,13 +5,12 @@ LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b76abd82c14ee01cc34c4ff5e3627b89" 5LIC_FILES_CHKSUM = "file://COPYING;md5=b76abd82c14ee01cc34c4ff5e3627b89"
6DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" 6DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
7 7
8inherit autotools systemd update-rc.d 8inherit autotools systemd update-rc.d pkgconfig
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://openvpn@.service \ 13 "
14 file://openvpn-volatile.conf"
15 14
16UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads" 15UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
17 16
@@ -20,9 +19,6 @@ SRC_URI[sha256sum] = "08340a389905c84196b6cd750add1bc0fa2d46a1afebfd589c24120946
20# CVE-2020-7224 and CVE-2020-27569 are for Aviatrix OpenVPN client, not for openvpn. 19# CVE-2020-7224 and CVE-2020-27569 are for Aviatrix OpenVPN client, not for openvpn.
21CVE_CHECK_IGNORE += "CVE-2020-7224 CVE-2020-27569" 20CVE_CHECK_IGNORE += "CVE-2020-7224 CVE-2020-27569"
22 21
23SYSTEMD_SERVICE:${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
24SYSTEMD_AUTO_ENABLE = "disable"
25
26INITSCRIPT_PACKAGES = "${PN}" 22INITSCRIPT_PACKAGES = "${PN}"
27INITSCRIPT_NAME:${PN} = "openvpn" 23INITSCRIPT_NAME:${PN} = "openvpn"
28INITSCRIPT_PARAMS:${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ." 24INITSCRIPT_PARAMS:${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ."
@@ -36,31 +32,30 @@ EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-p
36# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host. 32# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
37EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip" 33EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
38 34
35EXTRA_OECONF += "SYSTEMD_UNIT_DIR=${systemd_system_unitdir} \
36 TMPFILES_DIR=${nonarch_libdir}/tmpfiles.d \
37 "
38
39PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
40 "
41
42PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
43
39do_install:append() { 44do_install:append() {
40 install -d ${D}/${sysconfdir}/init.d 45 install -d ${D}/${sysconfdir}/init.d
41 install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d 46 install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
42 47
43 install -d ${D}/${sysconfdir}/openvpn 48 install -d ${D}/${sysconfdir}/openvpn
49 install -d ${D}/${sysconfdir}/openvpn/server
50 install -d ${D}/${sysconfdir}/openvpn/client
51
44 install -d ${D}/${sysconfdir}/openvpn/sample 52 install -d ${D}/${sysconfdir}/openvpn/sample
45 install -m 755 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf 53 install -m 644 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
46 install -m 755 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf 54 install -m 644 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
47 install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys 55 install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
48 install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys 56 install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
49 57
50 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 58 install -d -m 710 ${D}/${localstatedir}/lib/openvpn
51 install -d ${D}/${systemd_unitdir}/system
52 install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
53 install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
54 install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
55
56 install -d ${D}/${localstatedir}
57 install -d ${D}/${localstatedir}/lib
58 install -d -m 710 ${D}/${localstatedir}/lib/openvpn
59
60 install -d ${D}${sysconfdir}/tmpfiles.d
61 install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
62 sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
63 fi
64} 59}
65 60
66PACKAGES =+ " ${PN}-sample " 61PACKAGES =+ " ${PN}-sample "
@@ -68,9 +63,9 @@ PACKAGES =+ " ${PN}-sample "
68RRECOMMENDS:${PN} = "kernel-module-tun" 63RRECOMMENDS:${PN} = "kernel-module-tun"
69 64
70FILES:${PN}-dbg += "${libdir}/openvpn/plugins/.debug" 65FILES:${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
71FILES:${PN} += "${systemd_unitdir}/system/openvpn@.service \ 66FILES:${PN} += "${systemd_system_unitdir}/openvpn-server@.service \
72 ${sysconfdir}/tmpfiles.d \ 67 ${systemd_system_unitdir}/openvpn-client@.service \
68 ${nonarch_libdir}/tmpfiles.d \
73 " 69 "
74FILES:${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \ 70FILES:${PN}-sample = "${sysconfdir}/openvpn/sample/ \
75 ${systemd_unitdir}/system/openvpn@loopback-client.service \ 71 "
76 ${sysconfdir}/openvpn/sample/"