summaryrefslogtreecommitdiff
path: root/net-vpn
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/Manifest.gzbin7083 -> 7244 bytes
-rw-r--r--net-vpn/openvpn/Manifest6
-rw-r--r--net-vpn/openvpn/metadata.xml1
-rw-r--r--net-vpn/openvpn/openvpn-2.6.4.ebuild195
-rw-r--r--net-vpn/openvpn/openvpn-9999.ebuild27
-rw-r--r--net-vpn/ovpn-dco/Manifest4
-rw-r--r--net-vpn/ovpn-dco/metadata.xml17
-rw-r--r--net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild52
-rw-r--r--net-vpn/ovpn-dco/ovpn-dco-9999.ebuild52
9 files changed, 337 insertions, 17 deletions
diff --git a/net-vpn/Manifest.gz b/net-vpn/Manifest.gz
index f6d0eac05330..6430633a4c68 100644
--- a/net-vpn/Manifest.gz
+++ b/net-vpn/Manifest.gz
Binary files differ
diff --git a/net-vpn/openvpn/Manifest b/net-vpn/openvpn/Manifest
index d6da0d11761e..e9883a4f2e0e 100644
--- a/net-vpn/openvpn/Manifest
+++ b/net-vpn/openvpn/Manifest
@@ -7,8 +7,10 @@ AUX up.sh 2865 BLAKE2B f359c0078148a8ec59b68227844f39d784df2271e9640b54f50a9c0b6
DIST openvpn-2.5.2.tar.xz 1134644 BLAKE2B 59aa0c540894de4cfb37ad4c3139eb69a35d317e3de490f71b185a979989c1253221091a30bfb2ee5243fcfae190605e9787051de079eee79e57bd63392c42d5 SHA512 ae2cac00ae4b9e06e7e70b268ed47d36bbb45409650175e507d5bfa12b0a4f24bccc64f2494d1563f9269c8076d0f753a492f01ea33ce376ba00b7cdcb5c7bd0
DIST openvpn-2.5.6.tar.xz 1150352 BLAKE2B 509821eca9d40c5579700e05e560b906ddee5abb0c51a9a210e2e998cdd9606f734d43d3bec8c473cc4f0aaa1e265e7f05202aa606247ebde8844c0243165fac SHA512 f0f0600df013431af804ace70ea86ac064917acdeaad3759b5d5eaa4a8dc3738d6da6df4c16bbb23443e3493487541cb8b10b89f9f0b40a17caa6e6fc46e0adb
DIST openvpn-2.5.7.tar.xz 1150476 BLAKE2B e8d24a8be8ff97072ef3b76dbec15cd6e7097ebe99f680d759f213cb5643d7b4a29664d2a96e6efe1d6ee858a6d6b3f23c6d12cf74f202fbe8cc48642f18dba6 SHA512 9a3234b479f5bab12b8c3af7691f175f8cd32f2929dd27efc16e96e14dbb8e07421e623869ad5ffc2d7e65f2266817d1583723033f3646b9913b10ec6d014b44
+DIST openvpn-2.6.4.tar.gz 1861178 BLAKE2B 584fc3950732d6a1db417811f6e330a154537207f6c9543ab03b1c1a886a98a0aee7d1649055a9f7944555ae8865602be15fd8e23b67258917f1adebde050099 SHA512 903ac41691c26e8e4ad65c9b6fb5e75db2caf2e4079d3c4cb61a44e51be9991508f53a1dd8b4b863b4ac86088ad1a705d22131df1e25612560c9f4276d8190ec
EBUILD openvpn-2.5.2-r3.ebuild 5067 BLAKE2B 7ca61e5a61c752370ed98582b50c5fb7f6b74b00e6e74b1236fda5d07dba7ff986a70ebedb0af74ae1544c97140edeb4b838ca59f855daad0ff3a71e943dc338 SHA512 a0748e06e3daad0c9a4fa83301e62ecc4f711644bb060f3e1184e7a70a34776483e87a4543c4f00383a659e1661f286d41fbf0a5eb11362b050149aef4ecb9a2
EBUILD openvpn-2.5.6-r1.ebuild 5010 BLAKE2B 12650affa79d9cab2c51ebab3e6f9a74bc89e14ec363f51af18af0efd4d63a60da7919c76c679e8e837b9c525fa85c19e41b4cbb1444d3ce197594d78f7843cb SHA512 101cb66f087b34680898c55c6f9a8bfc060fea0e534d930ab6c85f33dab0b5c03322ed5d20dd86c1fc38f613b8c68155bdef70c7f79b0475d198ee5f71a64965
EBUILD openvpn-2.5.7-r1.ebuild 4951 BLAKE2B 2f4b65fd00e43cedb745be8b0132720df9977dcaa306834e9de81d2cf3bb6f5e3fa6c2b5ed597a9499b9ab2b1fd56e581518e00faf6b1ab03dd7222ba3aa11a5 SHA512 08036e5db1a464d315bc884e9593204c1e680afc3fe101b935601b1ed2fc6991deb17eb27bc020a5c0b154555541c8f45b9d7a7f195655fa183194e76a4f7b43
-EBUILD openvpn-9999.ebuild 5073 BLAKE2B e3152f0670654e472e8f24e042af680738b0bea3b192e9fa20615232f078b706f0dd63bcd82a5deceaefec9a1a9c052491475a5d68ef658085b1fc0eb403d6e3 SHA512 f13a973eff1b2fa4d7adc778eee789ba707fd1cd8bca85fc4679cb0d1353798bc2ed26934b80dcd2b49544f0b603ef9f302c229a4e09e7f20f5eaec665202362
-MISC metadata.xml 1141 BLAKE2B 3f5ec5f4f5a7388655422f78b64e14c3990270d30a1e468ded2e3c9bd7ef8cceaeea9c7949f8b9a1261d9e5507bd1a09cba72bcf98f5ff6fa94d9f816fc8d4b4 SHA512 8facd4123780419f22c4fcd505cfcdcbab8a3f7b5822f29cde57681ed577606cf737c3258e358ec6c171a828c07eef06023f9dc996f5a815cc261f44249341d6
+EBUILD openvpn-2.6.4.ebuild 4918 BLAKE2B c56504cb23b7353323297253221456fa49728b62eaae6c0f0ad48884202a90701a13a74a31ed1f9877094a36f18c5ccfe8677390f643b6de035ceb834c99ed7e SHA512 18da7d8d5599ed046ecb9511397421e30160f9aaf9057ce7537beee43929a2f5772b5f5a0d0c0699c368f586092cda06b5202d806365feda0554b53e2e7552e2
+EBUILD openvpn-9999.ebuild 5023 BLAKE2B 1bc4b1b06f4b077560265722add77ced9965d1a5339ae24c68e9d803e0e39a22dcaaf1a78e5dce4118296d6902c1d6ef5811e735215794e5cfb944054698cded SHA512 9fc346966a2525685af88963c425c1faaf703fa0e9442dd4360629cf65901df813a6d583ef049894d9ea55835c3f6a482f24f0d16afae300f9081674fc45a4d0
+MISC metadata.xml 1216 BLAKE2B c776b53a6590657d9c38f4d27da052d558b3fa706a944d07ff29de7fa6745e1e474a6110056dbe8c19fd03373644347054f8b7b4f2dd9d7171f3bc25ca21fe4f SHA512 1a62049e24f92d5519b1eaefa1649df23a515165e41b87e399170d1e2e140174fee5e8887f7e8589e68301093d1c2b6f76f6868db302ad7de2da911f0df3bb6d
diff --git a/net-vpn/openvpn/metadata.xml b/net-vpn/openvpn/metadata.xml
index 8e2bb32b6432..f3e8394e706a 100644
--- a/net-vpn/openvpn/metadata.xml
+++ b/net-vpn/openvpn/metadata.xml
@@ -13,6 +13,7 @@
configurable VPN daemon which can be used to securely link two or more
networks using an encrypted tunnel.</longdescription>
<use>
+ <flag name="dco">Enable support for kernel data channel offload</flag>
<flag name="down-root">Enable the down-root plugin</flag>
<flag name="iproute2">Enabled iproute2 support instead of net-tools</flag>
<flag name="mbedtls">Use mbed TLS as the backend crypto library</flag>
diff --git a/net-vpn/openvpn/openvpn-2.6.4.ebuild b/net-vpn/openvpn/openvpn-2.6.4.ebuild
new file mode 100644
index 000000000000..7e5e2daf32c1
--- /dev/null
+++ b/net-vpn/openvpn/openvpn-2.6.4.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd linux-info tmpfiles
+
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
+HOMEPAGE="https://openvpn.net/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="dco down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl"
+IUSE+=" pam pkcs11 +plugins selinux systemd test"
+
+RESTRICT="!test? ( test )"
+REQUIRED_USE="
+ ^^ ( openssl mbedtls )
+ pkcs11? ( !mbedtls )
+ !plugins? ( !pam !down-root )
+ inotify? ( plugins )
+ dco? ( !iproute2 )
+"
+
+CDEPEND="
+ kernel_linux? (
+ iproute2? ( sys-apps/iproute2[-minimal] )
+ )
+ lz4? ( app-arch/lz4 )
+ lzo? ( >=dev-libs/lzo-1.07 )
+ mbedtls? ( net-libs/mbedtls:= )
+ openssl? ( >=dev-libs/openssl-1.0.2:0= )
+ pam? ( sys-libs/pam )
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
+ systemd? ( sys-apps/systemd )
+ dco? ( >=net-vpn/ovpn-dco-0.2 >=dev-libs/libnl-3.2.29:= )
+ sys-libs/libcap-ng:=
+"
+
+BDEPEND="virtual/pkgconfig"
+
+DEPEND="${CDEPEND}
+ test? ( dev-util/cmocka )
+"
+RDEPEND="${CDEPEND}
+ acct-group/openvpn
+ acct-user/openvpn
+ selinux? ( sec-policy/selinux-openvpn )
+"
+
+if [[ ${PV} = "9999" ]]; then
+ BDEPEND+=" dev-python/docutils"
+fi
+
+pkg_setup() {
+ local CONFIG_CHECK="~TUN"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ local -a myeconfargs
+
+ if ! use mbedtls; then
+ myeconfargs+=(
+ $(use_enable pkcs11)
+ )
+ fi
+
+ myeconfargs+=(
+ $(use_enable inotify async-push)
+ --with-crypto-library=$(usex mbedtls mbedtls openssl)
+ $(use_enable lz4)
+ $(use_enable lzo)
+ $(use_enable plugins)
+ $(use_enable iproute2)
+ $(use_enable pam plugin-auth-pam)
+ $(use_enable down-root plugin-down-root)
+ $(use_enable systemd)
+ $(use_enable dco)
+ )
+
+ SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \
+ TMPFILES_DIR="/usr/lib/tmpfiles.d" \
+ IPROUTE=$(usex iproute2 '/bin/ip' '') \
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ local -x RUN_SUDO=false
+
+ elog "Running top-level tests"
+ emake check
+
+ pushd tests/unit_tests &>/dev/null || die
+ elog "Running unit tests"
+ emake check
+ popd &>/dev/null || die
+}
+
+src_install() {
+ default
+
+ find "${ED}/usr" -name '*.la' -delete || die
+
+ # install documentation
+ dodoc AUTHORS ChangeLog PORTS README
+
+ # Install some helper scripts
+ keepdir /etc/openvpn
+ exeinto /etc/openvpn
+ doexe "${FILESDIR}/up.sh"
+ doexe "${FILESDIR}/down.sh"
+
+ # Install the init script and config file
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
+
+ # install examples, controlled by the respective useflag
+ if use examples ; then
+ # (is the below comment relevant anymore?)
+ ## dodoc does not supportly support directory traversal, #15193
+ docinto examples
+ dodoc -r sample contrib
+ fi
+
+ # https://bugs.gentoo.org/755680#c3
+ doman doc/openvpn.8
+}
+
+pkg_postinst() {
+ tmpfiles_process openvpn.conf
+
+ if use x64-macos ; then
+ elog "You might want to install tuntaposx for TAP interface support:"
+ elog "http://tuntaposx.sourceforge.net"
+ fi
+
+ if systemd_is_booted || has_version sys-apps/systemd ; then
+ elog "In order to use OpenVPN with systemd please use the correct systemd service file."
+ elog ""
+ elog "server:"
+ elog ""
+ elog "- Place your server configuration file in /etc/openvpn/server"
+ elog "- Use the openvpn-server@.service like so"
+ elog "systemctl start openvpn-server@{Server-config}"
+ elog ""
+ elog "client:"
+ elog ""
+ elog "- Place your client configuration file in /etc/openvpn/client"
+ elog "- Use the openvpn-client@.service like so:"
+ elog "systemctl start openvpn-client@{Client-config}"
+ else
+ elog "The openvpn init script expects to find the configuration file"
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
+ elog ""
+ elog "To create more VPNs, simply create a new .conf file for it and"
+ elog "then create a symlink to the openvpn init script from a link called"
+ elog "openvpn.newconfname - like so"
+ elog " cd /etc/openvpn"
+ elog " ${EDITOR##*/} foo.conf"
+ elog " cd /etc/init.d"
+ elog " ln -s openvpn openvpn.foo"
+ elog ""
+ elog "You can then treat openvpn.foo as any other service, so you can"
+ elog "stop one vpn and start another if you need to."
+ fi
+
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
+ ewarn ""
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be"
+ ewarn "a client by our init script and as such we force up,down scripts."
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
+ ewarn "can move your scripts to."
+ fi
+
+ if use plugins ; then
+ einfo ""
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins"
+ fi
+}
diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild
index b8189f16f79b..6dc536051832 100644
--- a/net-vpn/openvpn/openvpn-9999.ebuild
+++ b/net-vpn/openvpn/openvpn-9999.ebuild
@@ -1,27 +1,25 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit autotools flag-o-matic systemd linux-info tmpfiles
+inherit autotools systemd linux-info tmpfiles
DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
HOMEPAGE="https://openvpn.net/"
if [[ ${PV} == "9999" ]]; then
EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
- EGIT_SUBMODULES=(-cmocka)
-
inherit git-r3
else
- SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+ SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl"
+IUSE="dco down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl"
IUSE+=" pam pkcs11 +plugins selinux systemd test"
RESTRICT="!test? ( test )"
@@ -30,6 +28,7 @@ REQUIRED_USE="
pkcs11? ( !mbedtls )
!plugins? ( !pam !down-root )
inotify? ( plugins )
+ dco? ( !iproute2 )
"
CDEPEND="
@@ -39,10 +38,12 @@ CDEPEND="
lz4? ( app-arch/lz4 )
lzo? ( >=dev-libs/lzo-1.07 )
mbedtls? ( net-libs/mbedtls:= )
- openssl? ( >=dev-libs/openssl-0.9.8:0= )
+ openssl? ( >=dev-libs/openssl-1.0.2:0= )
pam? ( sys-libs/pam )
pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
systemd? ( sys-apps/systemd )
+ dco? ( >=net-vpn/ovpn-dco-0.2 >=dev-libs/libnl-3.2.29:= )
+ sys-libs/libcap-ng:=
"
BDEPEND="virtual/pkgconfig"
@@ -60,11 +61,6 @@ if [[ ${PV} = "9999" ]]; then
BDEPEND+=" dev-python/docutils"
fi
-PATCHES=(
- "${FILESDIR}"/openvpn-2.5.0-auth-pam-missing-header.patch
- "${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch
-)
-
pkg_setup() {
local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
@@ -95,6 +91,7 @@ src_configure() {
$(use_enable pam plugin-auth-pam)
$(use_enable down-root plugin-down-root)
$(use_enable systemd)
+ $(use_enable dco)
)
SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \
@@ -121,7 +118,7 @@ src_install() {
find "${ED}/usr" -name '*.la' -delete || die
# install documentation
- dodoc AUTHORS ChangeLog PORTS README README.IPv6
+ dodoc AUTHORS ChangeLog PORTS README
# Install some helper scripts
keepdir /etc/openvpn
diff --git a/net-vpn/ovpn-dco/Manifest b/net-vpn/ovpn-dco/Manifest
new file mode 100644
index 000000000000..5621feec947f
--- /dev/null
+++ b/net-vpn/ovpn-dco/Manifest
@@ -0,0 +1,4 @@
+DIST ovpn-dco-0.2.20230426.tar.gz 70341 BLAKE2B 95d468212a161f13659185d7e96b11afac63a8dd40aaf42a41463927a7f75b1d1ab2388bab5749c0127a07a8bf5d4a5a97626c0d782595f3d0561be4063d931c SHA512 929333fd0668008be77b57b3a0955c260770d91402e02d93a460569b8b17763ebe23eb6159bfefe04fa16fad2672d6a6c76e2f3c2e6b864593bef59ef3cfa29f
+EBUILD ovpn-dco-0.2.20230426.ebuild 1004 BLAKE2B 608ce154e9fa9dc18bb835411f1601faeeb4f056e93601785b13742348f4a1a7142a8d9175b2ae558da4e60d334e663d0531f1c49031b157a11a734c25c118c2 SHA512 94b400ff3d6d8f8c78149fcbf08eb5f869be7cd0f8e3741e1d9d22b38788bdd4f6c3721cc9c6f76da49ffa9a04dd20fd264871f60101143d9e2b5ba41ea883cc
+EBUILD ovpn-dco-9999.ebuild 1102 BLAKE2B c7c87f585cf9d5f64835bfb6782c7df9a776c58f3bec3db6dec2292fc6c8c58d884ef69979d1df1335c314ef6ab1cc138a85f47ff8067dfefd5669e072e778c8 SHA512 8298b7839992eff11168054645073bdba49f6eac3a1cc7297d81a29e9252df9f3e470044181f74377804ae4f62c0adf6586fcc345ce253447cb50a3f0ec04860
+MISC metadata.xml 686 BLAKE2B c667b8740abf00a436a4043878ded6a9420298f21c38af2aef9d6336075df4c56ec3f99fdd71c6d53f2c66947f838af154f3f84258782c623f81b389b6289458 SHA512 d500104d1853b953cc3433e7185db707da162a5322f8e0433ead46211f95aea0a809f30a08d340c942b4844d5f1310873ea6d018112712eb2f3e6a2c59228dae
diff --git a/net-vpn/ovpn-dco/metadata.xml b/net-vpn/ovpn-dco/metadata.xml
new file mode 100644
index 000000000000..747c7bc21234
--- /dev/null
+++ b/net-vpn/ovpn-dco/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription>This kernel module allows OpenVPN to offload any data plane management to the
+linux kernel, thus allowing it to exploit any Linux low level API, while avoiding
+expensive and slow payload transfer between kernel space and user space.</longdescription>
+ <use>
+ <flag name="debug">Enable debug output in dmesg</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">OpenVPN/ovpn-dco</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild b/net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild
new file mode 100644
index 000000000000..2bbfd8a0560a
--- /dev/null
+++ b/net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod
+
+DESCRIPTION="OpenVPN Data Channel Offload in the linux kernel"
+HOMEPAGE="https://github.com/OpenVPN/ovpn-dco"
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://github.com/OpenVPN/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug"
+
+MODULE_NAMES="ovpn-dco-v2(updates:.:drivers/net/ovpn-dco)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ CONFIG_CHECK="
+ INET
+ NET
+ NET_UDP_TUNNEL
+ DST_CACHE
+ CRYPTO
+ CRYPTO_AES
+ CRYPTO_GCM
+ CRYPTO_CHACHA20POLY1305"
+
+ linux-mod_pkg_setup
+}
+
+src_compile() {
+ BUILD_PARAMS+=" KERNEL_SRC='${KERNEL_DIR}'"
+ [[ ${PV} != 9999 ]] && BUILD_PARAMS+=" REVISION='${PV}'"
+ use debug && BUILD_PARAMS+=" DEBUG=1"
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/${PN}
+ doins -r include
+}
diff --git a/net-vpn/ovpn-dco/ovpn-dco-9999.ebuild b/net-vpn/ovpn-dco/ovpn-dco-9999.ebuild
new file mode 100644
index 000000000000..e2affd832c1c
--- /dev/null
+++ b/net-vpn/ovpn-dco/ovpn-dco-9999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod
+
+DESCRIPTION="OpenVPN Data Channel Offload in the linux kernel"
+HOMEPAGE="https://github.com/OpenVPN/ovpn-dco"
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://github.com/OpenVPN/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug"
+
+MODULE_NAMES="ovpn-dco-v2(updates:.:drivers/net/ovpn-dco)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ CONFIG_CHECK="
+ INET
+ NET
+ NET_UDP_TUNNEL
+ DST_CACHE
+ CRYPTO
+ CRYPTO_AES
+ CRYPTO_GCM
+ CRYPTO_CHACHA20POLY1305"
+
+ linux-mod_pkg_setup
+}
+
+src_compile() {
+ BUILD_PARAMS+=" KERNEL_SRC='${KERNEL_DIR}'"
+ [[ ${PV} != 9999 ]] && BUILD_PARAMS+=" REVISION='${PV}'"
+ use debug && BUILD_PARAMS+=" DEBUG=1"
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/${PN}
+ doins -r include
+}