public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-vpn/vtun/files/, net-vpn/vtun/
@ 2022-12-09  6:54 Joonas Niilola
  0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2022-12-09  6:54 UTC (permalink / raw
  To: gentoo-commits

commit:     90c904faf227c902da129eb569563cc6d669550a
Author:     Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
AuthorDate: Mon Nov 28 19:26:31 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Dec  9 06:54:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90c904fa

net-vpn/vtun: add 3.0.4

 It is a little bit tricky to build properly, which is probably at
 least partly because approx 5 years have gone by with no new
 upstream releases.

Signed-off-by: Jan-Espen Oversand <sigsegv <AT> radiotube.org>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-vpn/vtun/Manifest                              |   1 +
 .../vtun-3.0.4-autoconf-fork-not-working.patch     |  11 +
 net-vpn/vtun/files/vtun-3.0.4-includes.patch       |  50 ++++
 net-vpn/vtun/files/vtun-3.0.4-libssl-ctx.patch     | 253 +++++++++++++++++++++
 .../vtun/files/vtun-3.0.4-naughty-inlines.patch    |  21 ++
 net-vpn/vtun/metadata.xml                          |   9 +-
 net-vpn/vtun/vtun-3.0.4.ebuild                     |  56 +++++
 7 files changed, 400 insertions(+), 1 deletion(-)

diff --git a/net-vpn/vtun/Manifest b/net-vpn/vtun/Manifest
index f1d679b89a2e..69aacb9b0565 100644
--- a/net-vpn/vtun/Manifest
+++ b/net-vpn/vtun/Manifest
@@ -1 +1,2 @@
 DIST vtun-3.0.3.tar.gz 130051 BLAKE2B 9bbc11724fb75acd024fda8b4e84af425c5377b3d8a938f7e789ecb1c2cdb95f109a1edc59f3fcbd2c5898bd17be76054060e8e36a1fb4355b40b61cc64adaad SHA512 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54
+DIST vtun-3.0.4.tar.gz 132691 BLAKE2B 040c3c66074a1ebdd8a2f32c988b7f4d9423d248ad1259456cd8cdbe0b9adbbaca4cd1e1a4e8c4e6a936a221a9443c099d5d8a219f830925f220bc09e5e7feae SHA512 b1bb7294bd745c2ca888704e2b0f8e05447b5e01bec0f921648afe363d61a19508dea9e26663993cd69c506aa92621e76f36045bddf7c3723d13a72741ca6781

diff --git a/net-vpn/vtun/files/vtun-3.0.4-autoconf-fork-not-working.patch b/net-vpn/vtun/files/vtun-3.0.4-autoconf-fork-not-working.patch
new file mode 100644
index 000000000000..258e4d736ccd
--- /dev/null
+++ b/net-vpn/vtun/files/vtun-3.0.4-autoconf-fork-not-working.patch
@@ -0,0 +1,11 @@
+--- a/config.h.in	2022-11-28 07:10:54.564387362 +0100
++++ b/config.h.in	2022-11-28 07:12:15.435007668 +0100
+@@ -156,3 +156,8 @@
+ 
+ /* Define as `fork' if `vfork' does not work. */
+ #undef vfork
++
++#if !defined(HAVE_WORKING_FORK) && !defined(HAVE_WORKING_VFORK)
++#define HAVE_WORKING_FORK 1
++#endif
++

diff --git a/net-vpn/vtun/files/vtun-3.0.4-includes.patch b/net-vpn/vtun/files/vtun-3.0.4-includes.patch
new file mode 100644
index 000000000000..d17e4acbc5c4
--- /dev/null
+++ b/net-vpn/vtun/files/vtun-3.0.4-includes.patch
@@ -0,0 +1,50 @@
+--- a/lfd_encrypt.c
++++ b/lfd_encrypt.c
+@@ -44,6 +44,7 @@
+ #include <strings.h>
+ #include <string.h>
+ #include <time.h>
++#include <arpa/inet.h> /* htonl() */
+ 
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.c
++++ b/lib.c
+@@ -34,6 +34,7 @@
+ #include <sys/wait.h>
+ #include <syslog.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+ 
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.h
++++ b/lib.h
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <unistd.h> /* read(), write() */
+ 
+ #ifdef HAVE_LIBUTIL_H
+ #include <libutil.h>
+--- a/lock.c
++++ b/lock.c
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+ 
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lfd_shaper.c
++++ b/lfd_shaper.c
+@@ -27,6 +27,7 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <syslog.h>
++#include <time.h> /* nanosleep() */
+ 
+ #include "vtun.h"
+ #include "linkfd.h"

diff --git a/net-vpn/vtun/files/vtun-3.0.4-libssl-ctx.patch b/net-vpn/vtun/files/vtun-3.0.4-libssl-ctx.patch
new file mode 100644
index 000000000000..6df2ca344e1f
--- /dev/null
+++ b/net-vpn/vtun/files/vtun-3.0.4-libssl-ctx.patch
@@ -0,0 +1,253 @@
+--- a/lfd_encrypt.c	2016-10-01 23:27:51.000000000 +0200
++++ b/lfd_encrypt.c	2022-11-27 19:30:55.119047677 +0100
+@@ -95,11 +95,11 @@
+ static char * pkey;
+ static char * iv_buf;
+ 
+-static EVP_CIPHER_CTX ctx_enc;	/* encrypt */
+-static EVP_CIPHER_CTX ctx_dec;	/* decrypt */
++static EVP_CIPHER_CTX *ctx_enc = NULL;	/* encrypt */
++static EVP_CIPHER_CTX *ctx_dec = NULL;	/* decrypt */
+ 
+-static EVP_CIPHER_CTX ctx_enc_ecb;	/* sideband ecb encrypt */
+-static EVP_CIPHER_CTX ctx_dec_ecb;	/* sideband ecb decrypt */
++static EVP_CIPHER_CTX *ctx_enc_ecb = NULL;	/* sideband ecb encrypt */
++static EVP_CIPHER_CTX *ctx_dec_ecb = NULL;	/* sideband ecb decrypt */
+ 
+ static int send_msg(int len, char *in, char **out);
+ static int recv_msg(int len, char *in, char **out);
+@@ -146,6 +146,22 @@
+    free(key);
+ }
+ 
++static void setup_ctx_ptrs()
++{
++   if (ctx_enc_ecb == NULL) {
++       ctx_enc_ecb = EVP_CIPHER_CTX_new();
++   }
++   if (ctx_dec_ecb == NULL) {
++       ctx_dec_ecb = EVP_CIPHER_CTX_new();
++   }
++   if (ctx_enc == NULL) {
++       ctx_enc = EVP_CIPHER_CTX_new();
++   }
++   if (ctx_dec == NULL) {
++       ctx_dec = EVP_CIPHER_CTX_new();
++   }
++}
++
+ static int alloc_encrypt(struct vtun_host *host)
+ {
+    int sb_init = 0;
+@@ -168,6 +184,8 @@
+       return -1;
+    }
+ 
++   setup_ctx_ptrs();
++
+    RAND_bytes((char *)&sequence_num, 4);
+    gibberish = 0;
+    gib_time_start = 0;
+@@ -182,15 +200,15 @@
+          keysize = 32;
+          sb_init = 1;
+          cipher_type = EVP_aes_256_ecb();
+-         pctx_enc = &ctx_enc_ecb;
+-         pctx_dec = &ctx_dec_ecb;
++         pctx_enc = ctx_enc_ecb;
++         pctx_dec = ctx_dec_ecb;
+       break;
+       
+       case VTUN_ENC_AES256ECB:
+          blocksize = 16;
+          keysize = 32;
+-         pctx_enc = &ctx_enc;
+-         pctx_dec = &ctx_dec;
++         pctx_enc = ctx_enc;
++         pctx_dec = ctx_dec;
+          cipher_type = EVP_aes_256_ecb();
+          strcpy(cipher_name,"AES-256-ECB");
+       break;      
+@@ -201,14 +219,14 @@
+          keysize = 16;
+          sb_init=1;
+          cipher_type = EVP_aes_128_ecb();
+-         pctx_enc = &ctx_enc_ecb;
+-         pctx_dec = &ctx_dec_ecb;
++         pctx_enc = ctx_enc_ecb;
++         pctx_dec = ctx_dec_ecb;
+       break;
+       case VTUN_ENC_AES128ECB:
+          blocksize = 16;
+          keysize = 16;
+-         pctx_enc = &ctx_enc;
+-         pctx_dec = &ctx_dec;
++         pctx_enc = ctx_enc;
++         pctx_dec = ctx_dec;
+          cipher_type = EVP_aes_128_ecb();
+          strcpy(cipher_name,"AES-128-ECB");
+       break;
+@@ -221,16 +239,16 @@
+          var_key = 1;
+          sb_init = 1;
+          cipher_type = EVP_bf_ecb();
+-         pctx_enc = &ctx_enc_ecb;
+-         pctx_dec = &ctx_dec_ecb;
++         pctx_enc = ctx_enc_ecb;
++         pctx_dec = ctx_dec_ecb;
+       break;
+ 
+       case VTUN_ENC_BF256ECB:
+          blocksize = 8;
+          keysize = 32;
+          var_key = 1;
+-         pctx_enc = &ctx_enc;
+-         pctx_dec = &ctx_dec;
++         pctx_enc = ctx_enc;
++         pctx_dec = ctx_dec;
+          cipher_type = EVP_bf_ecb();
+          strcpy(cipher_name,"Blowfish-256-ECB");
+       break;
+@@ -243,16 +261,16 @@
+          var_key = 1;
+          sb_init = 1;
+          cipher_type = EVP_bf_ecb();
+-         pctx_enc = &ctx_enc_ecb;
+-         pctx_dec = &ctx_dec_ecb;
++         pctx_enc = ctx_enc_ecb;
++         pctx_dec = ctx_dec_ecb;
+       break;
+       case VTUN_ENC_BF128ECB: /* blowfish 128 ecb is the default */
+       default:
+          blocksize = 8;
+          keysize = 16;
+          var_key = 1;
+-         pctx_enc = &ctx_enc;
+-         pctx_dec = &ctx_dec;
++         pctx_enc = ctx_enc;
++         pctx_dec = ctx_dec;
+          cipher_type = EVP_bf_ecb();
+          strcpy(cipher_name,"Blowfish-128-ECB");
+       break;
+@@ -294,10 +312,10 @@
+    lfd_free(enc_buf); enc_buf = NULL;
+    lfd_free(dec_buf); dec_buf = NULL;
+ 
+-   EVP_CIPHER_CTX_cleanup(&ctx_enc);
+-   EVP_CIPHER_CTX_cleanup(&ctx_dec);
+-   EVP_CIPHER_CTX_cleanup(&ctx_enc_ecb);
+-   EVP_CIPHER_CTX_cleanup(&ctx_dec_ecb);
++   EVP_CIPHER_CTX_cleanup(ctx_enc);
++   EVP_CIPHER_CTX_cleanup(ctx_dec);
++   EVP_CIPHER_CTX_cleanup(ctx_enc_ecb);
++   EVP_CIPHER_CTX_cleanup(ctx_dec_ecb);
+ 
+    return 0;
+ }
+@@ -323,7 +341,7 @@
+    outlen=len+pad;
+    if (pad == blocksize)
+       RAND_bytes(in_ptr+len, blocksize-1);
+-   EVP_EncryptUpdate(&ctx_enc, out_ptr, &outlen, in_ptr, len+pad);
++   EVP_EncryptUpdate(ctx_enc, out_ptr, &outlen, in_ptr, len+pad);
+    *out = enc_buf;
+ 
+    sequence_num++;
+@@ -343,7 +361,7 @@
+ 
+    outlen=len;
+    if (!len) return 0;
+-   EVP_DecryptUpdate(&ctx_dec, out_ptr, &outlen, in_ptr, len);
++   EVP_DecryptUpdate(ctx_dec, out_ptr, &outlen, in_ptr, len);
+    recv_ib_mesg(&outlen, &out_ptr);
+    if (!outlen) return 0;
+    tmp_ptr = out_ptr + outlen; tmp_ptr--;
+@@ -431,13 +449,15 @@
+       break;
+    } /* switch(cipher) */
+ 
+-   EVP_CIPHER_CTX_init(&ctx_enc);
+-   EVP_EncryptInit_ex(&ctx_enc, cipher_type, NULL, NULL, NULL);
++   setup_ctx_ptrs();
++
++   EVP_CIPHER_CTX_init(ctx_enc);
++   EVP_EncryptInit_ex(ctx_enc, cipher_type, NULL, NULL, NULL);
+    if (var_key)
+-      EVP_CIPHER_CTX_set_key_length(&ctx_enc, keysize);
+-   EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, pkey, NULL);
+-   EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, NULL, iv);
+-   EVP_CIPHER_CTX_set_padding(&ctx_enc, 0);
++      EVP_CIPHER_CTX_set_key_length(ctx_enc, keysize);
++   EVP_EncryptInit_ex(ctx_enc, NULL, NULL, pkey, NULL);
++   EVP_EncryptInit_ex(ctx_enc, NULL, NULL, NULL, iv);
++   EVP_CIPHER_CTX_set_padding(ctx_enc, 0);
+    if (enc_init_first_time)
+    {
+       sprintf(tmpstr,"%s encryption initialized", cipher_name);
+@@ -521,13 +541,15 @@
+       break;
+    } /* switch(cipher) */
+ 
+-   EVP_CIPHER_CTX_init(&ctx_dec);
+-   EVP_DecryptInit_ex(&ctx_dec, cipher_type, NULL, NULL, NULL);
++   setup_ctx_ptrs();
++
++   EVP_CIPHER_CTX_init(ctx_dec);
++   EVP_DecryptInit_ex(ctx_dec, cipher_type, NULL, NULL, NULL);
+    if (var_key)
+-      EVP_CIPHER_CTX_set_key_length(&ctx_dec, keysize);
+-   EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, pkey, NULL);
+-   EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, NULL, iv);
+-   EVP_CIPHER_CTX_set_padding(&ctx_dec, 0);
++      EVP_CIPHER_CTX_set_key_length(ctx_dec, keysize);
++   EVP_DecryptInit_ex(ctx_dec, NULL, NULL, pkey, NULL);
++   EVP_DecryptInit_ex(ctx_dec, NULL, NULL, NULL, iv);
++   EVP_CIPHER_CTX_set_padding(ctx_dec, 0);
+    if (dec_init_first_time)
+    {
+       sprintf(tmpstr,"%s decryption initialized", cipher_name);
+@@ -559,7 +581,7 @@
+ 
+          in_ptr = in - blocksize*2;
+          outlen = blocksize*2;
+-         EVP_EncryptUpdate(&ctx_enc_ecb, in_ptr, 
++         EVP_EncryptUpdate(ctx_enc_ecb, in_ptr, 
+             &outlen, in_ptr, blocksize*2);
+          *out = in_ptr;
+          len = outlen;
+@@ -586,7 +608,7 @@
+          in_ptr = in;
+          iv = malloc(blocksize);
+          outlen = blocksize*2;
+-         EVP_DecryptUpdate(&ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);
++         EVP_DecryptUpdate(ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);
+          
+          if ( !strncmp(in_ptr, "ivec", 4) )
+          {
+@@ -629,7 +651,7 @@
+                if (cipher_enc_state != CIPHER_INIT)
+                {
+                   cipher_enc_state = CIPHER_INIT;
+-                  EVP_CIPHER_CTX_cleanup(&ctx_enc);
++                  EVP_CIPHER_CTX_cleanup(ctx_enc);
+ #ifdef LFD_ENCRYPT_DEBUG
+                   vtun_syslog(LOG_INFO, 
+                      "Forcing local encryptor re-init");
+@@ -710,7 +732,7 @@
+          if (cipher_enc_state != CIPHER_INIT)
+          {
+             cipher_enc_state = CIPHER_INIT;
+-            EVP_CIPHER_CTX_cleanup(&ctx_enc);
++            EVP_CIPHER_CTX_cleanup(ctx_enc);
+          }
+ #ifdef LFD_ENCRYPT_DEBUG
+          vtun_syslog(LOG_INFO, "Remote requests encryptor re-init");
+@@ -724,7 +746,7 @@
+              cipher_enc_state != CIPHER_REQ_INIT &&
+              cipher_enc_state != CIPHER_INIT)
+          {
+-            EVP_CIPHER_CTX_cleanup (&ctx_dec);
++            EVP_CIPHER_CTX_cleanup (ctx_dec);
+             cipher_dec_state = CIPHER_INIT;
+             cipher_enc_state = CIPHER_REQ_INIT;
+          }

diff --git a/net-vpn/vtun/files/vtun-3.0.4-naughty-inlines.patch b/net-vpn/vtun/files/vtun-3.0.4-naughty-inlines.patch
new file mode 100644
index 000000000000..d36d95d7c6e2
--- /dev/null
+++ b/net-vpn/vtun/files/vtun-3.0.4-naughty-inlines.patch
@@ -0,0 +1,21 @@
+--- a/vtun.h	2016-10-01 23:27:51.000000000 +0200
++++ b/vtun.h	2022-11-27 19:08:02.609754913 +0100
+@@ -232,6 +232,6 @@
+ int  tunnel(struct vtun_host *host);
+ int  read_config(char *file);
+ struct vtun_host * find_host(char *host);
+-inline void clear_nat_hack_flags(int svr);
++void clear_nat_hack_flags(int svr);
+ 
+ #endif
+--- a/cfg_file.y	2022-11-27 19:09:33.380433928 +0100
++++ b/cfg_file.y	2022-11-27 19:09:57.340613164 +0100
+@@ -610,7 +610,7 @@
+ }
+ 
+ /* Clear the VTUN_NAT_HACK flag which are not relevant to the current operation mode */
+-inline void clear_nat_hack_flags(int svr)
++void clear_nat_hack_flags(int svr)
+ {
+ 	if (svr)
+ 		llist_trav(&host_list,clear_nat_hack_server,NULL);

diff --git a/net-vpn/vtun/metadata.xml b/net-vpn/vtun/metadata.xml
index ff77edd66cd7..d47d668be1d7 100644
--- a/net-vpn/vtun/metadata.xml
+++ b/net-vpn/vtun/metadata.xml
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<!-- maintainer-needed -->
+	<maintainer type="person">
+		<email>sigsegv@radiotube.org</email>
+		<name>Jan-Espen Oversand</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
 	<upstream>
 		<remote-id type="sourceforge">vtun</remote-id>
 	</upstream>

diff --git a/net-vpn/vtun/vtun-3.0.4.ebuild b/net-vpn/vtun/vtun-3.0.4.ebuild
new file mode 100644
index 000000000000..c48f4f30a1cd
--- /dev/null
+++ b/net-vpn/vtun/vtun-3.0.4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info
+
+DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression"
+SRC_URI="https://sourceforge.net/projects/vtun/files/${PN}/${PV}/${P}.tar.gz"
+HOMEPAGE="http://vtun.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+IUSE="lzo socks5 ssl zlib"
+
+RDEPEND="
+	lzo? ( dev-libs/lzo:2 )
+	socks5? ( net-proxy/dante )
+	ssl? ( dev-libs/openssl:0= )
+	zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+BDEPEND="sys-devel/bison"
+
+DOCS=( ChangeLog Credits FAQ README README.Setup README.Shaper TODO )
+CONFIG_CHECK="~TUN"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-libssl-ctx.patch
+	"${FILESDIR}"/${P}-includes.patch
+	"${FILESDIR}"/${P}-naughty-inlines.patch
+	"${FILESDIR}"/${P}-autoconf-fork-not-working.patch
+)
+
+src_prepare() {
+	default
+	sed -i -e '/^LDFLAGS/s|=|+=|g' Makefile.in || die
+	sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die
+}
+
+src_configure() {
+	econf \
+		$(use_enable ssl) \
+		$(use_enable zlib) \
+		$(use_enable lzo) \
+		$(use_enable socks5 socks) \
+		--enable-shaper
+}
+
+src_install() {
+	default
+	newinitd "${FILESDIR}"/vtun.rc vtun
+	insinto /etc
+	doins "${FILESDIR}"/vtund-start.conf
+	rm -r "${ED}"/var || die
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/vtun/files/, net-vpn/vtun/
@ 2022-12-16  5:20 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-12-16  5:20 UTC (permalink / raw
  To: gentoo-commits

commit:     ca305be17ae525e1b4ed7ba9bf87dba5f9d5c326
Author:     Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
AuthorDate: Tue Dec 13 18:31:51 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 16 05:20:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca305be1

net-vpn/vtun: fix implicit function decls

Fix implicit setproctitle, also this is libbsd so libbsd is a runtime depencency.

Also fix implicit getpt, grantpt, ptsname, by enabling nonstandard (_GNU_SOURCE)
gnu extensions and extra open/posix (_XOPEN_SOURCE).

Closes: https://bugs.gentoo.org/875443
Signed-off-by: Jan-Espen Oversand <sigsegv <AT> radiotube.org>
Closes: https://github.com/gentoo/gentoo/pull/28656
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-vpn/vtun/files/vtun-3.0.3-includes.patch       | 12 ++++++++++-
 net-vpn/vtun/files/vtun-3.0.4-includes.patch       | 24 +++++++++++++++++++++-
 .../{vtun-3.0.3-r2.ebuild => vtun-3.0.3-r3.ebuild} |  5 +++--
 .../{vtun-3.0.4.ebuild => vtun-3.0.4-r1.ebuild}    |  3 ++-
 4 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/net-vpn/vtun/files/vtun-3.0.3-includes.patch b/net-vpn/vtun/files/vtun-3.0.3-includes.patch
index 46ff5eca90a4..517ddf3cbb9c 100644
--- a/net-vpn/vtun/files/vtun-3.0.3-includes.patch
+++ b/net-vpn/vtun/files/vtun-3.0.3-includes.patch
@@ -20,14 +20,24 @@
  #include "linkfd.h"
 --- a/lib.h
 +++ b/lib.h
-@@ -26,6 +26,7 @@
+@@ -26,6 +26,8 @@
  #include <sys/types.h>
  #include <signal.h>
  #include <errno.h>
 +#include <unistd.h> /* read(), write() */
++#include <bsd/unistd.h> /* setproctitle(), see man libbsd(7) */
  
  #ifdef HAVE_LIBUTIL_H
  #include <libutil.h>
+@@ -35,7 +37,7 @@
+   void init_title(int argc,char *argv[],char *env[], char *name);
+   void set_title(const char *ftm, ...);
+ #else
+-  #define init_title( a... ) 
++  #define init_title(argc, argv, env, name) setproctitle_init(argc, argv, env)
+   #define set_title setproctitle
+ #endif /* HAVE_SETPROC_TITLE */
+ 
 --- a/vtun.h
 +++ b/vtun.h
 @@ -232,5 +232,9 @@

diff --git a/net-vpn/vtun/files/vtun-3.0.4-includes.patch b/net-vpn/vtun/files/vtun-3.0.4-includes.patch
index d17e4acbc5c4..06546c6bd815 100644
--- a/net-vpn/vtun/files/vtun-3.0.4-includes.patch
+++ b/net-vpn/vtun/files/vtun-3.0.4-includes.patch
@@ -20,14 +20,24 @@
  #include "linkfd.h"
 --- a/lib.h
 +++ b/lib.h
-@@ -26,6 +26,7 @@
+@@ -26,6 +26,8 @@
  #include <sys/types.h>
  #include <signal.h>
  #include <errno.h>
 +#include <unistd.h> /* read(), write() */
++#include <bsd/unistd.h> /* setproctitle(), see man libbsd(7) */
  
  #ifdef HAVE_LIBUTIL_H
  #include <libutil.h>
+@@ -35,7 +37,7 @@
+   void init_title(int argc,char *argv[],char *env[], char *name);
+   void set_title(const char *ftm, ...);
+ #else
+-  #define init_title( a... ) 
++  #define init_title(argc, argv, env, name) setproctitle_init(argc, argv, env)
+   #define set_title setproctitle
+ #endif /* HAVE_SETPROC_TITLE */
+ 
 --- a/lock.c
 +++ b/lock.c
 @@ -32,6 +32,7 @@
@@ -48,3 +58,15 @@
  
  #include "vtun.h"
  #include "linkfd.h"
+--- a/generic/pty_dev.c
++++ b/generic/pty_dev.c
+@@ -22,6 +22,8 @@
+ 
+ #include "config.h"
+ 
++#define _GNU_SOURCE // getpt, grantpt 
++#define _XOPEN_SOURCE // unlockpt
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+

diff --git a/net-vpn/vtun/vtun-3.0.3-r2.ebuild b/net-vpn/vtun/vtun-3.0.3-r3.ebuild
similarity index 94%
rename from net-vpn/vtun/vtun-3.0.3-r2.ebuild
rename to net-vpn/vtun/vtun-3.0.3-r3.ebuild
index 2152bb74e3ce..aeebc636d14f 100644
--- a/net-vpn/vtun/vtun-3.0.3-r2.ebuild
+++ b/net-vpn/vtun/vtun-3.0.3-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -18,7 +18,8 @@ RDEPEND="
 	lzo? ( dev-libs/lzo:2 )
 	socks5? ( net-proxy/dante )
 	ssl? ( dev-libs/openssl:0= )
-	zlib? ( sys-libs/zlib )"
+	zlib? ( sys-libs/zlib )
+	dev-libs/libbsd"
 DEPEND="${RDEPEND}"
 BDEPEND="sys-devel/bison"
 

diff --git a/net-vpn/vtun/vtun-3.0.4.ebuild b/net-vpn/vtun/vtun-3.0.4-r1.ebuild
similarity index 96%
rename from net-vpn/vtun/vtun-3.0.4.ebuild
rename to net-vpn/vtun/vtun-3.0.4-r1.ebuild
index a1c1e76bb471..800d5d0feb11 100644
--- a/net-vpn/vtun/vtun-3.0.4.ebuild
+++ b/net-vpn/vtun/vtun-3.0.4-r1.ebuild
@@ -18,7 +18,8 @@ RDEPEND="
 	lzo? ( dev-libs/lzo:2 )
 	socks5? ( net-proxy/dante )
 	ssl? ( dev-libs/openssl:0= )
-	zlib? ( sys-libs/zlib )"
+	zlib? ( sys-libs/zlib )
+	dev-libs/libbsd"
 DEPEND="${RDEPEND}"
 BDEPEND="sys-devel/bison"
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/vtun/files/, net-vpn/vtun/
@ 2022-12-16 22:57 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-12-16 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     c89929c39b281565db5dd4fd51c7c1509db976d6
Author:     Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
AuthorDate: Fri Dec 16 20:16:44 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 16 22:57:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c89929c3

net-vpn/vtun: Fix bashism in shell script

Fix shell script compatibility issue in rc script (bashism).

Closes: https://bugs.gentoo.org/849446
Signed-off-by: Jan-Espen Oversand <sigsegv <AT> radiotube.org>
Closes: https://github.com/gentoo/gentoo/pull/28682
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-vpn/vtun/files/vtun.rc                                  | 3 ++-
 net-vpn/vtun/{vtun-3.0.3-r3.ebuild => vtun-3.0.3-r4.ebuild} | 0
 net-vpn/vtun/{vtun-3.0.4-r1.ebuild => vtun-3.0.4-r2.ebuild} | 0
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/net-vpn/vtun/files/vtun.rc b/net-vpn/vtun/files/vtun.rc
index 7ef322985043..9d081eeb4f06 100644
--- a/net-vpn/vtun/files/vtun.rc
+++ b/net-vpn/vtun/files/vtun.rc
@@ -7,7 +7,8 @@ depend() {
 }
 
 start() {
-	IFS=$'\n'
+	IFS=$(printf '\n.'); # Set separator (IFS) to <newline><dot>
+	IFS=${IFS%.};        # Remove <dot> - The <dot> was because shells remove trailing newlines with $(..)
 	for line in `grep -v '^[[:space:]]*#' /etc/vtund-start.conf | grep -v '^[[:space:]]*$'`
 	do
 		echo $line | 

diff --git a/net-vpn/vtun/vtun-3.0.3-r3.ebuild b/net-vpn/vtun/vtun-3.0.3-r4.ebuild
similarity index 100%
rename from net-vpn/vtun/vtun-3.0.3-r3.ebuild
rename to net-vpn/vtun/vtun-3.0.3-r4.ebuild

diff --git a/net-vpn/vtun/vtun-3.0.4-r1.ebuild b/net-vpn/vtun/vtun-3.0.4-r2.ebuild
similarity index 100%
rename from net-vpn/vtun/vtun-3.0.4-r1.ebuild
rename to net-vpn/vtun/vtun-3.0.4-r2.ebuild


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/vtun/files/, net-vpn/vtun/
@ 2023-04-10  8:10 Joonas Niilola
  0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2023-04-10  8:10 UTC (permalink / raw
  To: gentoo-commits

commit:     a833e8490840f789b92f17bf6a08db13f1ca9944
Author:     Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
AuthorDate: Fri Mar 10 19:13:49 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 08:10:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a833e849

net-vpn/vtun: drop 3.0.3-r4

Closes: https://bugs.gentoo.org/900336
Signed-off-by: Jan-Espen Oversand <sigsegv <AT> radiotube.org>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-vpn/vtun/Manifest                              |   1 -
 .../vtun-3.0.2-remove-config-presence-check.patch  |  13 --
 net-vpn/vtun/files/vtun-3.0.3-C99-inline.patch     |  49 -----
 net-vpn/vtun/files/vtun-3.0.3-fno-common.patch     |  25 ---
 net-vpn/vtun/files/vtun-3.0.3-gcc5.patch           |  11 -
 net-vpn/vtun/files/vtun-3.0.3-includes.patch       |  72 -------
 net-vpn/vtun/files/vtun-libssl-1.1.patch           | 229 ---------------------
 net-vpn/vtun/vtun-3.0.3-r4.ebuild                  |  62 ------
 8 files changed, 462 deletions(-)

diff --git a/net-vpn/vtun/Manifest b/net-vpn/vtun/Manifest
index 69aacb9b0565..92748306cddb 100644
--- a/net-vpn/vtun/Manifest
+++ b/net-vpn/vtun/Manifest
@@ -1,2 +1 @@
-DIST vtun-3.0.3.tar.gz 130051 BLAKE2B 9bbc11724fb75acd024fda8b4e84af425c5377b3d8a938f7e789ecb1c2cdb95f109a1edc59f3fcbd2c5898bd17be76054060e8e36a1fb4355b40b61cc64adaad SHA512 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54
 DIST vtun-3.0.4.tar.gz 132691 BLAKE2B 040c3c66074a1ebdd8a2f32c988b7f4d9423d248ad1259456cd8cdbe0b9adbbaca4cd1e1a4e8c4e6a936a221a9443c099d5d8a219f830925f220bc09e5e7feae SHA512 b1bb7294bd745c2ca888704e2b0f8e05447b5e01bec0f921648afe363d61a19508dea9e26663993cd69c506aa92621e76f36045bddf7c3723d13a72741ca6781

diff --git a/net-vpn/vtun/files/vtun-3.0.2-remove-config-presence-check.patch b/net-vpn/vtun/files/vtun-3.0.2-remove-config-presence-check.patch
deleted file mode 100644
index c2d9e7d999a7..000000000000
--- a/net-vpn/vtun/files/vtun-3.0.2-remove-config-presence-check.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -86,9 +86,7 @@
- 
- install_config: 
- 	$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR)
--	if [ ! -f $(ETC_DIR)/vtund.conf ]; then \
--	  $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
--	fi
-+	$(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
- 
- install: vtund install_config install_man
- 	$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run

diff --git a/net-vpn/vtun/files/vtun-3.0.3-C99-inline.patch b/net-vpn/vtun/files/vtun-3.0.3-C99-inline.patch
deleted file mode 100644
index 0e7c68be8f13..000000000000
--- a/net-vpn/vtun/files/vtun-3.0.3-C99-inline.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- a/lfd_shaper.c
-+++ b/lfd_shaper.c
-@@ -69,7 +69,7 @@ int shaper_counter(int len, char *in, char **out)
- }
- 
- /* Convert tv struct to milisec */
--unsigned long inline tv2ms(struct timeval tv)
-+unsigned long tv2ms(struct timeval tv)
- {
-      register unsigned long ms = (tv.tv_sec * 1000)+(tv.tv_usec / 1000); 
-      return  ms ? ms : 1;
---- a/linkfd.c
-+++ b/linkfd.c
-@@ -105,7 +105,7 @@ int lfd_free_mod(void)
- }
- 
-  /* Run modules down (from head to tail) */
--inline int lfd_run_down(int len, char *in, char **out)
-+int lfd_run_down(int len, char *in, char **out)
- {
-      register struct lfd_mod *mod;
-      
-@@ -119,7 +119,7 @@ inline int lfd_run_down(int len, char *in, char **out)
- }
- 
- /* Run modules up (from tail to head) */
--inline int lfd_run_up(int len, char *in, char **out)
-+int lfd_run_up(int len, char *in, char **out)
- {
-      register struct lfd_mod *mod;
-      
-@@ -133,7 +133,7 @@ inline int lfd_run_up(int len, char *in, char **out)
- }
- 
- /* Check if modules are accepting the data(down) */
--inline int lfd_check_down(void)
-+int lfd_check_down(void)
- {
-      register struct lfd_mod *mod;
-      int err = 1;
-@@ -145,7 +145,7 @@ inline int lfd_check_down(void)
- }
- 
- /* Check if modules are accepting the data(up) */
--inline int lfd_check_up(void)
-+int lfd_check_up(void)
- {
-      register struct lfd_mod *mod;
-      int err = 1;

diff --git a/net-vpn/vtun/files/vtun-3.0.3-fno-common.patch b/net-vpn/vtun/files/vtun-3.0.3-fno-common.patch
deleted file mode 100644
index 2dd6dd2e3348..000000000000
--- a/net-vpn/vtun/files/vtun-3.0.3-fno-common.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://bugs.gentoo.org/708372
---- a/auth.c
-+++ b/auth.c
-@@ -70,7 +70,7 @@ void gen_chal(char *buf)
- void encrypt_chal(char *chal, char *pwd)
- { 
-    register int i;
--   BF_KEY key;
-+   extern BF_KEY key;
- 
-    BF_set_key(&key, 16, MD5(pwd,strlen(pwd),NULL));
- 
---- a/lfd_encrypt.c
-+++ b/lfd_encrypt.c
-@@ -64,8 +64,8 @@
- #define ENC_BUF_SIZE VTUN_FRAME_SIZE + 128 
- #define ENC_KEY_SIZE 16
- 
--BF_KEY key;
--char * enc_buf;
-+extern BF_KEY key;
-+extern char * enc_buf;
- char * dec_buf;
- 
- #define CIPHER_INIT		0

diff --git a/net-vpn/vtun/files/vtun-3.0.3-gcc5.patch b/net-vpn/vtun/files/vtun-3.0.3-gcc5.patch
deleted file mode 100644
index 8270f7a4d9ed..000000000000
--- a/net-vpn/vtun/files/vtun-3.0.3-gcc5.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/cfg_file.y
-+++ b/cfg_file.y
-@@ -624,7 +624,7 @@ int clear_nat_hack_client(void *d, void
- }
-
- /* Clear the VTUN_NAT_HACK flag which are not relevant to the current operation mode */
--inline void clear_nat_hack_flags(int svr)
-+extern inline void clear_nat_hack_flags(int svr)
- {
- 	if (svr)
- 		llist_trav(&host_list,clear_nat_hack_server,NULL);

diff --git a/net-vpn/vtun/files/vtun-3.0.3-includes.patch b/net-vpn/vtun/files/vtun-3.0.3-includes.patch
deleted file mode 100644
index 517ddf3cbb9c..000000000000
--- a/net-vpn/vtun/files/vtun-3.0.3-includes.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/lfd_encrypt.c
-+++ b/lfd_encrypt.c
-@@ -44,6 +44,7 @@
- #include <strings.h>
- #include <string.h>
- #include <time.h>
-+#include <arpa/inet.h> /* htonl() */
- 
- #include "vtun.h"
- #include "linkfd.h"
---- a/lib.c
-+++ b/lib.c
-@@ -34,6 +34,7 @@
- #include <sys/wait.h>
- #include <syslog.h>
- #include <errno.h>
-+#include <time.h> /* nanosleep() */
- 
- #include "vtun.h"
- #include "linkfd.h"
---- a/lib.h
-+++ b/lib.h
-@@ -26,6 +26,8 @@
- #include <sys/types.h>
- #include <signal.h>
- #include <errno.h>
-+#include <unistd.h> /* read(), write() */
-+#include <bsd/unistd.h> /* setproctitle(), see man libbsd(7) */
- 
- #ifdef HAVE_LIBUTIL_H
- #include <libutil.h>
-@@ -35,7 +37,7 @@
-   void init_title(int argc,char *argv[],char *env[], char *name);
-   void set_title(const char *ftm, ...);
- #else
--  #define init_title( a... ) 
-+  #define init_title(argc, argv, env, name) setproctitle_init(argc, argv, env)
-   #define set_title setproctitle
- #endif /* HAVE_SETPROC_TITLE */
- 
---- a/vtun.h
-+++ b/vtun.h
-@@ -232,5 +232,9 @@
- int  read_config(char *file);
- struct vtun_host * find_host(char *host);
- inline void clear_nat_hack_flags(int svr);
-+int send_msg(int len, char *in, char **out);
-+int send_ib_mesg(int *len, char **in);
-+int recv_msg(int len, char *in, char **out);
-+int recv_ib_mesg(int *len, char **in);
- 
- #endif
---- a/lock.c
-+++ b/lock.c
-@@ -32,6 +32,7 @@
- #include <sys/types.h>
- #include <signal.h>
- #include <errno.h>
-+#include <time.h> /* nanosleep() */
- 
- #include "vtun.h"
- #include "linkfd.h"
---- a/lfd_shaper.c
-+++ b/lfd_shaper.c
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <sys/time.h>
- #include <syslog.h>
-+#include <time.h> /* nanosleep() */
- 
- #include "vtun.h"
- #include "linkfd.h"

diff --git a/net-vpn/vtun/files/vtun-libssl-1.1.patch b/net-vpn/vtun/files/vtun-libssl-1.1.patch
deleted file mode 100644
index f2bf0c1fa82b..000000000000
--- a/net-vpn/vtun/files/vtun-libssl-1.1.patch
+++ /dev/null
@@ -1,229 +0,0 @@
---- a/lfd_encrypt.c
-+++ b/lfd_encrypt.c
-@@ -96,11 +96,11 @@ unsigned long sequence_num;
- char * pkey;
- char * iv_buf;
- 
--EVP_CIPHER_CTX ctx_enc;	/* encrypt */
--EVP_CIPHER_CTX ctx_dec;	/* decrypt */
-+EVP_CIPHER_CTX *ctx_enc;	/* encrypt */
-+EVP_CIPHER_CTX *ctx_dec;	/* decrypt */
- 
--EVP_CIPHER_CTX ctx_enc_ecb;	/* sideband ecb encrypt */
--EVP_CIPHER_CTX ctx_dec_ecb;	/* sideband ecb decrypt */
-+EVP_CIPHER_CTX *ctx_enc_ecb;	/* sideband ecb encrypt */
-+EVP_CIPHER_CTX *ctx_dec_ecb;	/* sideband ecb decrypt */
- 
- int prep_key(char **key, int size, struct vtun_host *host)
- {
-@@ -151,6 +151,11 @@ int alloc_encrypt(struct vtun_host *host)
-    char cipher_name[32];
-    EVP_CIPHER_CTX *pctx_enc;
-    EVP_CIPHER_CTX *pctx_dec;
-+   
-+   ctx_enc = EVP_CIPHER_CTX_new();
-+   ctx_dec = EVP_CIPHER_CTX_new();
-+   ctx_enc_ecb = EVP_CIPHER_CTX_new();
-+   ctx_dec_ecb = EVP_CIPHER_CTX_new();
- 
-    enc_init_first_time = 1;   
-    dec_init_first_time = 1;   
-@@ -178,15 +183,15 @@ int alloc_encrypt(struct vtun_host *host)
-          keysize = 32;
-          sb_init = 1;
-          cipher_type = EVP_aes_256_ecb();
--         pctx_enc = &ctx_enc_ecb;
--         pctx_dec = &ctx_dec_ecb;
-+         pctx_enc = ctx_enc_ecb;
-+         pctx_dec = ctx_dec_ecb;
-       break;
-       
-       case VTUN_ENC_AES256ECB:
-          blocksize = 16;
-          keysize = 32;
--         pctx_enc = &ctx_enc;
--         pctx_dec = &ctx_dec;
-+         pctx_enc = ctx_enc;
-+         pctx_dec = ctx_dec;
-          cipher_type = EVP_aes_256_ecb();
-          strcpy(cipher_name,"AES-256-ECB");
-       break;      
-@@ -197,14 +202,14 @@ int alloc_encrypt(struct vtun_host *host)
-          keysize = 16;
-          sb_init=1;
-          cipher_type = EVP_aes_128_ecb();
--         pctx_enc = &ctx_enc_ecb;
--         pctx_dec = &ctx_dec_ecb;
-+         pctx_enc = ctx_enc_ecb;
-+         pctx_dec = ctx_dec_ecb;
-       break;
-       case VTUN_ENC_AES128ECB:
-          blocksize = 16;
-          keysize = 16;
--         pctx_enc = &ctx_enc;
--         pctx_dec = &ctx_dec;
-+         pctx_enc = ctx_enc;
-+         pctx_dec = ctx_dec;
-          cipher_type = EVP_aes_128_ecb();
-          strcpy(cipher_name,"AES-128-ECB");
-       break;
-@@ -217,16 +222,16 @@ int alloc_encrypt(struct vtun_host *host)
-          var_key = 1;
-          sb_init = 1;
-          cipher_type = EVP_bf_ecb();
--         pctx_enc = &ctx_enc_ecb;
--         pctx_dec = &ctx_dec_ecb;
-+         pctx_enc = ctx_enc_ecb;
-+         pctx_dec = ctx_dec_ecb;
-       break;
- 
-       case VTUN_ENC_BF256ECB:
-          blocksize = 8;
-          keysize = 32;
-          var_key = 1;
--         pctx_enc = &ctx_enc;
--         pctx_dec = &ctx_dec;
-+         pctx_enc = ctx_enc;
-+         pctx_dec = ctx_dec;
-          cipher_type = EVP_bf_ecb();
-          strcpy(cipher_name,"Blowfish-256-ECB");
-       break;
-@@ -239,16 +244,16 @@ int alloc_encrypt(struct vtun_host *host)
-          var_key = 1;
-          sb_init = 1;
-          cipher_type = EVP_bf_ecb();
--         pctx_enc = &ctx_enc_ecb;
--         pctx_dec = &ctx_dec_ecb;
-+         pctx_enc = ctx_enc_ecb;
-+         pctx_dec = ctx_dec_ecb;
-       break;
-       case VTUN_ENC_BF128ECB: /* blowfish 128 ecb is the default */
-       default:
-          blocksize = 8;
-          keysize = 16;
-          var_key = 1;
--         pctx_enc = &ctx_enc;
--         pctx_dec = &ctx_dec;
-+         pctx_enc = ctx_enc;
-+         pctx_dec = ctx_dec;
-          cipher_type = EVP_bf_ecb();
-          strcpy(cipher_name,"Blowfish-128-ECB");
-       break;
-@@ -290,10 +295,10 @@ int free_encrypt()
-    lfd_free(enc_buf); enc_buf = NULL;
-    lfd_free(dec_buf); dec_buf = NULL;
- 
--   EVP_CIPHER_CTX_cleanup(&ctx_enc);
--   EVP_CIPHER_CTX_cleanup(&ctx_dec);
--   EVP_CIPHER_CTX_cleanup(&ctx_enc_ecb);
--   EVP_CIPHER_CTX_cleanup(&ctx_dec_ecb);
-+   EVP_CIPHER_CTX_cleanup(ctx_enc);
-+   EVP_CIPHER_CTX_cleanup(ctx_dec);
-+   EVP_CIPHER_CTX_cleanup(ctx_enc_ecb);
-+   EVP_CIPHER_CTX_cleanup(ctx_dec_ecb);
- 
-    return 0;
- }
-@@ -319,7 +324,7 @@ int encrypt_buf(int len, char *in, char **out)
-    outlen=len+pad;
-    if (pad == blocksize)
-       RAND_bytes(in_ptr+len, blocksize-1);
--   EVP_EncryptUpdate(&ctx_enc, out_ptr, &outlen, in_ptr, len+pad);
-+   EVP_EncryptUpdate(&ctx_enc, out_ptr, outlen, in_ptr, len+pad);
-    *out = enc_buf;
- 
-    sequence_num++;
-@@ -339,7 +344,7 @@ int decrypt_buf(int len, char *in, char **out)
- 
-    outlen=len;
-    if (!len) return 0;
--   EVP_DecryptUpdate(&ctx_dec, out_ptr, &outlen, in_ptr, len);
-+   EVP_DecryptUpdate(ctx_dec, out_ptr, &outlen, in_ptr, len);
-    recv_ib_mesg(&outlen, &out_ptr);
-    if (!outlen) return 0;
-    tmp_ptr = out_ptr + outlen; tmp_ptr--;
-@@ -427,13 +432,13 @@ int cipher_enc_init(char * iv)
-       break;
-    } /* switch(cipher) */
- 
--   EVP_CIPHER_CTX_init(&ctx_enc);
--   EVP_EncryptInit_ex(&ctx_enc, cipher_type, NULL, NULL, NULL);
-+   EVP_CIPHER_CTX_init(ctx_enc);
-+   EVP_EncryptInit_ex(ctx_enc, cipher_type, NULL, NULL, NULL);
-    if (var_key)
--      EVP_CIPHER_CTX_set_key_length(&ctx_enc, keysize);
--   EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, pkey, NULL);
--   EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, NULL, iv);
--   EVP_CIPHER_CTX_set_padding(&ctx_enc, 0);
-+      EVP_CIPHER_CTX_set_key_length(ctx_enc, keysize);
-+   EVP_EncryptInit_ex(ctx_enc, NULL, NULL, pkey, NULL);
-+   EVP_EncryptInit_ex(ctx_enc, NULL, NULL, NULL, iv);
-+   EVP_CIPHER_CTX_set_padding(ctx_enc, 0);
-    if (enc_init_first_time)
-    {
-       sprintf(tmpstr,"%s encryption initialized", cipher_name);
-@@ -517,13 +522,13 @@ int cipher_dec_init(char * iv)
-       break;
-    } /* switch(cipher) */
- 
--   EVP_CIPHER_CTX_init(&ctx_dec);
--   EVP_DecryptInit_ex(&ctx_dec, cipher_type, NULL, NULL, NULL);
-+   EVP_CIPHER_CTX_init(ctx_dec);
-+   EVP_DecryptInit_ex(ctx_dec, cipher_type, NULL, NULL, NULL);
-    if (var_key)
--      EVP_CIPHER_CTX_set_key_length(&ctx_dec, keysize);
--   EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, pkey, NULL);
--   EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, NULL, iv);
--   EVP_CIPHER_CTX_set_padding(&ctx_dec, 0);
-+      EVP_CIPHER_CTX_set_key_length(ctx_dec, keysize);
-+   EVP_DecryptInit_ex(ctx_dec, NULL, NULL, pkey, NULL);
-+   EVP_DecryptInit_ex(ctx_dec, NULL, NULL, NULL, iv);
-+   EVP_CIPHER_CTX_set_padding(ctx_dec, 0);
-    if (dec_init_first_time)
-    {
-       sprintf(tmpstr,"%s decryption initialized", cipher_name);
-@@ -555,7 +560,7 @@ int send_msg(int len, char *in, char **out)
- 
-          in_ptr = in - blocksize*2;
-          outlen = blocksize*2;
--         EVP_EncryptUpdate(&ctx_enc_ecb, in_ptr, 
-+         EVP_EncryptUpdate(ctx_enc_ecb, in_ptr, 
-             &outlen, in_ptr, blocksize*2);
-          *out = in_ptr;
-          len = outlen;
-@@ -582,7 +587,7 @@ int recv_msg(int len, char *in, char **out)
-          in_ptr = in;
-          iv = malloc(blocksize);
-          outlen = blocksize*2;
--         EVP_DecryptUpdate(&ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);
-+         EVP_DecryptUpdate(ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);
-          
-          if ( !strncmp(in_ptr, "ivec", 4) )
-          {
-@@ -625,7 +630,7 @@ int recv_msg(int len, char *in, char **out)
-                if (cipher_enc_state != CIPHER_INIT)
-                {
-                   cipher_enc_state = CIPHER_INIT;
--                  EVP_CIPHER_CTX_cleanup(&ctx_enc);
-+                  EVP_CIPHER_CTX_cleanup(ctx_enc);
- #ifdef LFD_ENCRYPT_DEBUG
-                   vtun_syslog(LOG_INFO, 
-                      "Forcing local encryptor re-init");
-@@ -706,7 +711,7 @@ int recv_ib_mesg(int *len, char **in)
-          if (cipher_enc_state != CIPHER_INIT)
-          {
-             cipher_enc_state = CIPHER_INIT;
--            EVP_CIPHER_CTX_cleanup(&ctx_enc);
-+            EVP_CIPHER_CTX_cleanup(ctx_enc);
-          }
- #ifdef LFD_ENCRYPT_DEBUG
-          vtun_syslog(LOG_INFO, "Remote requests encryptor re-init");
-@@ -720,7 +725,7 @@ int recv_ib_mesg(int *len, char **in)
-              cipher_enc_state != CIPHER_REQ_INIT &&
-              cipher_enc_state != CIPHER_INIT)
-          {
--            EVP_CIPHER_CTX_cleanup (&ctx_dec);
-+            EVP_CIPHER_CTX_cleanup (ctx_dec);
-             cipher_dec_state = CIPHER_INIT;
-             cipher_enc_state = CIPHER_REQ_INIT;
-          }

diff --git a/net-vpn/vtun/vtun-3.0.3-r4.ebuild b/net-vpn/vtun/vtun-3.0.3-r4.ebuild
deleted file mode 100644
index aeebc636d14f..000000000000
--- a/net-vpn/vtun/vtun-3.0.3-r4.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info
-
-DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-HOMEPAGE="http://vtun.sourceforge.net/"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 ppc ~sparc x86"
-IUSE="lzo socks5 ssl zlib"
-
-RDEPEND="
-	lzo? ( dev-libs/lzo:2 )
-	socks5? ( net-proxy/dante )
-	ssl? ( dev-libs/openssl:0= )
-	zlib? ( sys-libs/zlib )
-	dev-libs/libbsd"
-DEPEND="${RDEPEND}"
-BDEPEND="sys-devel/bison"
-
-DOCS=( ChangeLog Credits FAQ README README.Setup README.Shaper TODO )
-CONFIG_CHECK="~TUN"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-includes.patch
-	# remove unneeded checking for /etc/vtund.conf
-	"${FILESDIR}"/${PN}-3.0.2-remove-config-presence-check.patch
-	# GCC 5 compatibility, patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778164
-	"${FILESDIR}"/${P}-gcc5.patch
-	# openssl 1.1 compatibility, bug 674280
-	"${FILESDIR}"/${PN}-libssl-1.1.patch
-	"${FILESDIR}"/${P}-fno-common.patch
-	"${FILESDIR}"/${P}-C99-inline.patch
-)
-
-src_prepare() {
-	default
-	sed -i -e '/^LDFLAGS/s|=|+=|g' Makefile.in || die
-	sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die
-}
-
-src_configure() {
-	econf \
-		$(use_enable ssl) \
-		$(use_enable zlib) \
-		$(use_enable lzo) \
-		$(use_enable socks5 socks) \
-		--enable-shaper
-}
-
-src_install() {
-	default
-	newinitd "${FILESDIR}"/vtun.rc vtun
-	insinto /etc
-	doins "${FILESDIR}"/vtund-start.conf
-	rm -r "${ED}"/var || die
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-10  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 22:57 [gentoo-commits] repo/gentoo:master commit in: net-vpn/vtun/files/, net-vpn/vtun/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-04-10  8:10 Joonas Niilola
2022-12-16  5:20 Sam James
2022-12-09  6:54 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox