* [gentoo-commits] repo/gentoo:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/
@ 2019-10-03 13:57 Anthony G. Basile
0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2019-10-03 13:57 UTC (permalink / raw
To: gentoo-commits
commit: 2b134ba23299a635f3ff4056aa75bebdaaca93f3
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 3 13:57:24 2019 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Oct 3 13:57:24 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b134ba2
net-proxy/torsocks: version bump to 2.3.0, bug #680502
Closes: https://bugs.gentoo.org/680502
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
net-proxy/torsocks/Manifest | 1 +
.../files/torsocks-2.3.0-fix-syscall.patch | 94 ++++++++++++++++++++++
net-proxy/torsocks/torsocks-2.3.0.ebuild | 48 +++++++++++
3 files changed, 143 insertions(+)
diff --git a/net-proxy/torsocks/Manifest b/net-proxy/torsocks/Manifest
index e91855d4925..8c6d485bcea 100644
--- a/net-proxy/torsocks/Manifest
+++ b/net-proxy/torsocks/Manifest
@@ -1 +1,2 @@
DIST torsocks-2.2.0.tar.gz 115269 BLAKE2B e6e376dbe9b248bcb51fb0c3c16346f4888310abd6e84942acca69f67ae15afe5dfeba9a6b3a8d1fa562f87548450af93cea3bea4d899980ca6acb651658cfaa SHA512 903d11d58ece76eaf75ff8fc11a27e4a29f94be530f2d77d1a6f0982d556a4b9c78677a43eed88f2451054d0e985672900ecf73b360fa09e80195c3b9006622b
+DIST torsocks-2.3.0.tar.gz 118033 BLAKE2B a4329ffa5e20204024c4f7dda8619ba2d3e2a5f370727acdc720527688bdb3f8735b0386dfa07758fe59e1890f9ce88bb148a1b0c401bbb5966d2fe17934ca61 SHA512 139f4cf60191632add8bc845b2d68d25a0285e9746988167d832e50cedb8083f2765571429d3a11350fa2d327a1ff0a0ead9b464dac90d897b13ab948f609114
diff --git a/net-proxy/torsocks/files/torsocks-2.3.0-fix-syscall.patch b/net-proxy/torsocks/files/torsocks-2.3.0-fix-syscall.patch
new file mode 100644
index 00000000000..93eb7ad4537
--- /dev/null
+++ b/net-proxy/torsocks/files/torsocks-2.3.0-fix-syscall.patch
@@ -0,0 +1,94 @@
+From 4c00ec8773fd63fa48ef49e1ccf2adac598427be Mon Sep 17 00:00:00 2001
+From: Alejandro Alvarado <44826516+seisvelas@users.noreply.github.com>
+Date: Mon, 17 Dec 2018 19:25:18 -0600
+Subject: Add getdents / getdents64 support re ticket 28861
+
+---
+ src/common/compat.h | 8 ++++++++
+ src/lib/syscall.c | 37 +++++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+)
+
+diff --git a/src/common/compat.h b/src/common/compat.h
+index a9b73c2..d79301f 100644
+--- a/src/common/compat.h
++++ b/src/common/compat.h
+@@ -129,6 +129,12 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine)(void));
+ #ifndef __NR_memfd_create
+ #define __NR_memfd_create -19
+ #endif
++#ifndef __NR_getdents
++#define __NR_getdents -20
++#endif
++#ifndef __NR_getdents64
++#define __NR_getdents64 -21
++#endif
+
+ #define TSOCKS_NR_SOCKET __NR_socket
+ #define TSOCKS_NR_CONNECT __NR_connect
+@@ -149,6 +155,8 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine)(void));
+ #define TSOCKS_NR_CLOCK_GETTIME __NR_clock_gettime
+ #define TSOCKS_NR_FORK __NR_fork
+ #define TSOCKS_NR_MEMFD_CREATE __NR_memfd_create
++#define TSOCKS_NR_GETDENTS __NR_getdents
++#define TSOCKS_NR_GETDENTS64 __NR_getdents64
+
+ /*
+ * Despite glibc providing wrappers for these calls for a long time
+diff --git a/src/lib/syscall.c b/src/lib/syscall.c
+index 7fba580..f793da7 100644
+--- a/src/lib/syscall.c
++++ b/src/lib/syscall.c
+@@ -437,6 +437,37 @@ static LIBC_SYSCALL_RET_TYPE handle_memfd_create(va_list args)
+
+ return tsocks_libc_syscall(TSOCKS_NR_MEMFD_CREATE, name, flags);
+ }
++/*
++ * Handle getdents(2) syscall.
++ */
++static LIBC_SYSCALL_RET_TYPE handle_getdents(va_list args)
++{
++ unsigned int fd;
++ struct linux_dirent *dirp;
++ unsigned int count;
++
++ fd = va_arg(args, __typeof__(fd));
++ dirp = va_arg(args, __typeof__(dirp));
++ count = va_arg(args, __typeof__(count));
++
++ return tsocks_libc_syscall(TSOCKS_NR_GETDENTS, fd, dirp, count);
++}
++/*
++ * Handle getdents64(2) syscall.
++ */
++static LIBC_SYSCALL_RET_TYPE handle_getdents64(va_list args)
++{
++ unsigned int fd;
++ struct linux_dirent64 *dirp;
++ unsigned int count;
++
++ fd = va_arg(args, __typeof__(fd));
++ dirp = va_arg(args, __typeof__(dirp));
++ count = va_arg(args, __typeof__(count));
++
++ return tsocks_libc_syscall(TSOCKS_NR_GETDENTS64, fd, dirp, count);
++}
++
+ #endif /* __linux__ */
+
+ /*
+@@ -558,6 +589,12 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(long int number, va_list args)
+ case TSOCKS_NR_MEMFD_CREATE:
+ ret = handle_memfd_create(args);
+ break;
++ case TSOCKS_NR_GETDENTS:
++ ret = handle_getdents(args);
++ break;
++ case TSOCKS_NR_GETDENTS64:
++ ret = handle_getdents64(args);
++ break;
+ #endif /* __linux__ */
+ default:
+ /*
+--
+cgit v1.1
+
diff --git a/net-proxy/torsocks/torsocks-2.3.0.ebuild b/net-proxy/torsocks/torsocks-2.3.0.ebuild
new file mode 100644
index 00000000000..185229c5cf7
--- /dev/null
+++ b/net-proxy/torsocks/torsocks-2.3.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+MY_PV="$(ver_rs 3 -)"
+MY_PF="${PN}-${MY_PV}"
+S=${WORKDIR}/${MY_PF}
+
+DESCRIPTION="Use most socks-friendly applications with Tor"
+HOMEPAGE="https://github.com/dgoulet/torsocks"
+SRC_URI="https://github.com/dgoulet/torsocks/archive/v${MY_PV}.tar.gz -> ${MY_PF}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static-libs"
+
+# We do not depend on tor which might be running on a different box
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-fix-syscall.patch )
+
+src_prepare() {
+ # Disable tests requiring network access.
+ local test
+ for test in dns fd_passing getpeername; do
+ sed -i -e "/^ test_${test} \\\\\$/d" tests/Makefile.am || \
+ die "failed to disable network tests"
+ done
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ # Remove libtool .la files
+ find "${D}" -name '*.la' -delete || die
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/
@ 2023-01-04 4:32 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-01-04 4:32 UTC (permalink / raw
To: gentoo-commits
commit: c0248a88bb85e2d2c1067954eeb768e1eadfcd0d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 4 03:49:13 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 4 04:31:57 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0248a88
net-proxy/torsocks: fix build w/ clang 16
Closes: https://bugs.gentoo.org/881077
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-proxy/torsocks/Manifest | 2 +-
net-proxy/torsocks/files/torsocks-2.4.0-clang16.patch | 13 +++++++++++++
.../{torsocks-2.4.0.ebuild => torsocks-2.4.0-r1.ebuild} | 6 +++++-
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/net-proxy/torsocks/Manifest b/net-proxy/torsocks/Manifest
index b9bfe25373d6..3af31a60f5ef 100644
--- a/net-proxy/torsocks/Manifest
+++ b/net-proxy/torsocks/Manifest
@@ -1 +1 @@
-DIST torsocks-2.4.0.tar.gz 118991 BLAKE2B e1817c3bbf10f83431292c644d7187e40b62c5f223784074b3f9c082d8d75243090e226ffebb6fd81805fbd887588790833adc4ab8923e8116585c0a29255ad0 SHA512 7d625ce3a4600f87b86ae9ac79dfd206e7709cb0bafe0b7afcf33a6f1825f968cc63ad3e23c584582b244647bdeafbfdbfc54f7c81e521b0a3d278a1483ce86e
+DIST torsocks-2.4.0-r1.tar.gz 118991 BLAKE2B e1817c3bbf10f83431292c644d7187e40b62c5f223784074b3f9c082d8d75243090e226ffebb6fd81805fbd887588790833adc4ab8923e8116585c0a29255ad0 SHA512 7d625ce3a4600f87b86ae9ac79dfd206e7709cb0bafe0b7afcf33a6f1825f968cc63ad3e23c584582b244647bdeafbfdbfc54f7c81e521b0a3d278a1483ce86e
diff --git a/net-proxy/torsocks/files/torsocks-2.4.0-clang16.patch b/net-proxy/torsocks/files/torsocks-2.4.0-clang16.patch
new file mode 100644
index 000000000000..3bedd71dc736
--- /dev/null
+++ b/net-proxy/torsocks/files/torsocks-2.4.0-clang16.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/881077
+https://gitlab.torproject.org/tpo/core/torsocks/-/issues/40014
+https://lists.torproject.org/pipermail/tor-dev/2022-December/014790.html
+--- a/src/common/config-file.h
++++ b/src/common/config-file.h
+@@ -109,6 +109,7 @@ int conf_file_set_allow_inbound(const char *val, struct configuration *config);
+ int conf_file_set_allow_outbound_localhost(const char *val, struct
+ configuration *config);
+ int conf_file_set_isolate_pid(const char *val, struct configuration *config);
++int conf_file_set_enable_ipv6(const char *val, struct configuration *config);
+
+ int conf_apply_socks_auth(struct configuration *config);
+
diff --git a/net-proxy/torsocks/torsocks-2.4.0.ebuild b/net-proxy/torsocks/torsocks-2.4.0-r1.ebuild
similarity index 91%
rename from net-proxy/torsocks/torsocks-2.4.0.ebuild
rename to net-proxy/torsocks/torsocks-2.4.0-r1.ebuild
index 94ad25e9ef98..7efc2f3d402c 100644
--- a/net-proxy/torsocks/torsocks-2.4.0.ebuild
+++ b/net-proxy/torsocks/torsocks-2.4.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -21,6 +21,10 @@ IUSE="static-libs"
DEPEND=""
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.0-clang16.patch
+)
+
src_prepare() {
# Disable tests requiring network access.
local test
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-04 4:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 4:32 [gentoo-commits] repo/gentoo:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2019-10-03 13:57 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox