public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/
Date: Thu,  3 Oct 2019 13:57:43 +0000 (UTC)	[thread overview]
Message-ID: <1570111044.2b134ba23299a635f3ff4056aa75bebdaaca93f3.blueness@gentoo> (raw)

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
+}


             reply	other threads:[~2019-10-03 13:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 13:57 Anthony G. Basile [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-04  4:32 [gentoo-commits] repo/gentoo:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/ Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1570111044.2b134ba23299a635f3ff4056aa75bebdaaca93f3.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox