diff --git a/net-vpn/openvpn/openvpn-2.6.4.recipe b/net-vpn/openvpn/openvpn-2.6.12.recipe similarity index 87% rename from net-vpn/openvpn/openvpn-2.6.4.recipe rename to net-vpn/openvpn/openvpn-2.6.12.recipe index 250a0faae..af821945a 100644 --- a/net-vpn/openvpn/openvpn-2.6.4.recipe +++ b/net-vpn/openvpn/openvpn-2.6.12.recipe @@ -4,20 +4,21 @@ encryption, authentication, and certification features of the OpenSSL library to IP networks over a single UDP or TCPport. It can use the Marcus Franz Xaver Johannes Oberhumers LZO library for compression." HOMEPAGE="https://openvpn.net" -COPYRIGHT="2002-2023 OpenVPN Inc" +COPYRIGHT="2002-2024 OpenVPN Inc" LICENSE="OpenVPN GNU GPL v2" -REVISION="3" +REVISION="1" SOURCE_URI="https://github.com/OpenVPN/openvpn/archive/refs/tags/v$portVersion.tar.gz" -CHECKSUM_SHA256="bfab07b900262a990fc4519596b29c380ed5a89216593f04719279715ebd04d3" +CHECKSUM_SHA256="cbca5e13b2b1c4de5ef0361d37c44b5e97e8654948f80d95ca249b474108d4c0" SOURCE_FILENAME="openvpn-$portVersion.tar.gz" -PATCHES=" - openvpn-$portVersion.patchset - " +PATCHES="openvpn-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" +pythonVersion=3.10 +pythonPackage=python${pythonVersion//.} + commandBinDir=$binDir commandSuffix=$secondaryArchSuffix if [ "$targetArchitecture" = x86_gcc2 ]; then @@ -34,7 +35,6 @@ REQUIRES=" lib:libcrypto$secondaryArchSuffix lib:liblzo2$secondaryArchSuffix lib:liblz4$secondaryArchSuffix -# lib:libpkcs11$secondaryArchSuffix lib:libssl$secondaryArchSuffix " @@ -58,7 +58,8 @@ BUILD_PREREQUIRES=" cmd:libtoolize$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix - docutils_python39 + cmd:rst2html + cmd:rst2man " BUILD() diff --git a/net-vpn/openvpn/openvpn-2.6.8.recipe b/net-vpn/openvpn/openvpn-2.6.8.recipe deleted file mode 100644 index d0b3773bc..000000000 --- a/net-vpn/openvpn/openvpn-2.6.8.recipe +++ /dev/null @@ -1,84 +0,0 @@ -SUMMARY="A Secure tunneling daemon" -DESCRIPTION="OpenVPN is a robust and highly flexible tunneling application that uses all of the \ -encryption, authentication, and certification features of the OpenSSL library to securely tunnel \ -IP networks over a single UDP or TCPport. -It can use the Marcus Franz Xaver Johannes Oberhumers LZO library for compression." -HOMEPAGE="https://openvpn.net" -COPYRIGHT="2002-2023 OpenVPN Inc" -LICENSE="OpenVPN - GNU GPL v2" -REVISION="3" -SOURCE_URI="https://github.com/OpenVPN/openvpn/archive/refs/tags/v$portVersion.tar.gz" -CHECKSUM_SHA256="36fe5399b59a00932b8c3919c76203176b79125f9023046d3db35a701be891f8" -SOURCE_FILENAME="openvpn-$portVersion.tar.gz" -PATCHES=" - openvpn-$portVersion.patchset - " - -ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="x86" - -commandBinDir=$binDir -commandSuffix=$secondaryArchSuffix -if [ "$targetArchitecture" = x86_gcc2 ]; then - commandSuffix= - commandBinDir=$prefix/bin -fi - -PROVIDES=" - openvpn$secondaryArchSuffix = $portVersion - cmd:openvpn = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libcrypto$secondaryArchSuffix - lib:liblzo2$secondaryArchSuffix - lib:liblz4$secondaryArchSuffix -# lib:libpkcs11$secondaryArchSuffix - lib:libssl$secondaryArchSuffix - " - -defineDebugInfoPackage openvpn$secondaryArchSuffix \ - $commandBinDir/openvpn \ - $libDir/openvpn/plugins/openvpn-plugin-auth-pam.so \ - $libDir/openvpn/plugins/openvpn-plugin-down-root.so - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:liblzo2$secondaryArchSuffix - devel:liblz4$secondaryArchSuffix - devel:libpam$secondaryArchSuffix - devel:libpkcs11_helper$secondaryArchSuffix - devel:libssl$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoreconf - cmd:gcc$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix - cmd:make - cmd:pkg_config$secondaryArchSuffix - docutils_python39 - " - -BUILD() -{ - autoreconf -fi - LDFLAGS="-lnetwork" runConfigure --omit-dirs sbinDir ./configure \ - --sbindir=$commandBinDir \ - --disable-static - make $jobArgs -} - -INSTALL() -{ - make install - - # remove libtool files - find $libDir -name '*.la' -delete -} - -TEST() -{ - make check -} diff --git a/net-vpn/openvpn/patches/openvpn-2.6.8.patchset b/net-vpn/openvpn/patches/openvpn-2.6.12.patchset similarity index 84% rename from net-vpn/openvpn/patches/openvpn-2.6.8.patchset rename to net-vpn/openvpn/patches/openvpn-2.6.12.patchset index c8862205f..1ff1b8abd 100644 --- a/net-vpn/openvpn/patches/openvpn-2.6.8.patchset +++ b/net-vpn/openvpn/patches/openvpn-2.6.12.patchset @@ -1,21 +1,16 @@ -From 7a9918bd66d0d8cef4f8ab751436835772231c3d Mon Sep 17 00:00:00 2001 +From fe329449c1a0e857a3b058c57ba5b5cda5811a09 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Fri, 17 Nov 2023 14:39:01 -0600 -Subject: [PATCH] Haiku: Introduce basic platform support +Subject: Haiku: Introduce basic platform support * Missing gateway detection in route.c * Missing ipv6 routing calls ---- - configure.ac | 4 ++++ - src/openvpn/route.c | 15 +++++++++++++++ - src/openvpn/tun.c | 18 +++++++++++++++++- - 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 84eaad60..4ca8f4f0 100644 +index df16c43..4962179 100644 --- a/configure.ac +++ b/configure.ac -@@ -373,6 +373,10 @@ case "$host" in +@@ -374,6 +374,10 @@ case "$host" in have_tap_header="yes" ac_cv_header_net_if_h="no" # exists, but breaks things ;; @@ -27,7 +22,7 @@ index 84eaad60..4ca8f4f0 100644 AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["X"], [Target prefix]) have_tap_header="yes" diff --git a/src/openvpn/route.c b/src/openvpn/route.c -index ff64938a..85b542c5 100644 +index a5832ff..5553f90 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -1842,6 +1842,21 @@ add_route(struct route_ipv4 *r, @@ -53,10 +48,10 @@ index ff64938a..85b542c5 100644 msg(M_FATAL, "Sorry, but I don't know how to do 'route' commands on this operating system. Try putting your routes in a --route-up script"); #endif /* if defined(TARGET_LINUX) */ diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c -index 82ab6c05..0abd0e46 100644 +index 70c898e..a2b4e49 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c -@@ -1643,6 +1643,16 @@ do_ifconfig_ipv4(struct tuntap *tt, const char *ifname, int tun_mtu, +@@ -1635,6 +1635,16 @@ do_ifconfig_ipv4(struct tuntap *tt, const char *ifname, int tun_mtu, { windows_set_mtu(tt->adapter_index, AF_INET, tun_mtu); } @@ -73,7 +68,7 @@ index 82ab6c05..0abd0e46 100644 #else /* if defined(TARGET_LINUX) */ msg(M_FATAL, "Sorry, but I don't know how to do 'ifconfig' commands on this operating system. You should ifconfig your TUN/TAP device manually or use an --up script."); #endif /* if defined(TARGET_LINUX) */ -@@ -1899,7 +1909,6 @@ tun_dco_enabled(struct tuntap *tt) +@@ -1891,7 +1901,6 @@ tun_dco_enabled(struct tuntap *tt) } #endif @@ -81,7 +76,7 @@ index 82ab6c05..0abd0e46 100644 #if !(defined(_WIN32) || defined(TARGET_LINUX)) static void open_tun_generic(const char *dev, const char *dev_type, const char *dev_node, -@@ -1934,10 +1943,17 @@ open_tun_generic(const char *dev, const char *dev_type, const char *dev_node, +@@ -1926,10 +1935,17 @@ open_tun_generic(const char *dev, const char *dev_type, const char *dev_node, { for (int i = 0; i < 256; ++i) { @@ -100,5 +95,5 @@ index 82ab6c05..0abd0e46 100644 { dynamic_opened = true; -- -2.42.1 +2.45.2 diff --git a/net-vpn/openvpn/patches/openvpn-2.6.4.patchset b/net-vpn/openvpn/patches/openvpn-2.6.4.patchset deleted file mode 100644 index 94a81324f..000000000 --- a/net-vpn/openvpn/patches/openvpn-2.6.4.patchset +++ /dev/null @@ -1,71 +0,0 @@ -From c94b287ff24a5b50941ab9e5c00a64f64f809380 Mon Sep 17 00:00:00 2001 -From: Swangeon -Date: Sun, 27 Aug 2023 15:00:18 -0500 -Subject: [PATCH] Changed configure.ac to recognize Haiku and tun.c to use - ifconfig - - -diff --git a/configure.ac b/configure.ac -index 67f680b..26b3e4b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -373,6 +373,10 @@ case "$host" in - have_tap_header="yes" - ac_cv_header_net_if_h="no" # exists, but breaks things - ;; -+ *-*-haiku*) -+ AC_DEFINE([TARGET_HAIKU], [1], [Are we running Haiku?]) -+ AC_DEFINE_UNQUOTED([TARGET_PREFIX]. ["H"], [Target prefix]) -+ ;; - *) - AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["X"], [Target prefix]) - have_tap_header="yes" -diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c -index 2320e8b..2fb0de9 100644 ---- a/src/openvpn/tun.c -+++ b/src/openvpn/tun.c -@@ -1578,6 +1578,16 @@ do_ifconfig_ipv4(struct tuntap *tt, const char *ifname, int tun_mtu, - { - windows_set_mtu(tt->adapter_index, AF_INET, tun_mtu); - } -+#elif defined (TARGET_HAIKU) -+ { -+ /* example: ifconfig tap0 inet 1.1.1.1 255.255.255.0 mtu 1450 up */ -+ // Need to add ifconfig_remote_netmask since right now it is just NULL -+ argv_printf(&argv, "%s %s inet %s 255.255.255.0 mtu %d up", IFCONFIG_PATH, -+ ifname, ifconfig_local, tun_mtu); -+ -+ argv_msg(M_INFO, &argv); -+ openvpn_execve_check(&argv, es, S_FATAL, "HAIKU ifconfig failed"); -+ } - #else /* if defined(TARGET_LINUX) */ - msg(M_FATAL, "Sorry, but I don't know how to do 'ifconfig' commands on this operating system. You should ifconfig your TUN/TAP device manually or use an --up script."); - #endif /* if defined(TARGET_LINUX) */ --- -2.42.0.windows.1 - - -From 909e9a0dd31460ab7750d2473ca94c46ae364e28 Mon Sep 17 00:00:00 2001 -From: Swangeon -Date: Mon, 4 Sep 2023 00:40:30 -0500 -Subject: [PATCH] Change where the TUN/TAP driver gets accessed - - - src/openvpn/tun.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c -index 2fb0de9..cdc0131 100644 ---- a/src/openvpn/tun.c -+++ b/src/openvpn/tun.c -@@ -1880,7 +1880,7 @@ open_tun_generic(const char *dev, const char *dev_type, const char *dev_node, - for (int i = 0; i < 256; ++i) - { - openvpn_snprintf(tunname, sizeof(tunname), -- "/dev/%s%d", dev, i); -+ "/dev/tap/%d", i); - openvpn_snprintf(dynamic_name, sizeof(dynamic_name), - "%s%d", dev, i); - if ((tt->fd = open(tunname, O_RDWR)) > 0) --- -2.42.0.windows.2