#2 Update to 2.2.0
Merged 5 years ago by pwouters. Opened 5 years ago by maha.
rpms/ maha/torsocks master  into  master

update to 2.2.0
Marcel Haerry • 5 years ago  
file modified
+2
@@ -1,3 +1,5 @@ 

  /torsocks-*.tar.gz

  /torsocks-*.tar.gz.asc

  /*.rpm

+ /torsocks-2.2.0.tar.xz

+ /torsocks-2.2.0.tar.xz.asc

file modified
+2 -2
@@ -1,2 +1,2 @@ 

- cced40ded9a0c7335050b778677fbd60  torsocks-2.1.0.tar.bz2

- 6a23ca93e000578e1cdb43cc8bc417c7  torsocks-2.1.0.tar.bz2.asc

+ SHA512 (torsocks-2.2.0.tar.xz) = 89eb1263bfb0079ca5cb7fcc3a6fa1ecde1327df9ea98de48babfff1f8947b1e9db8407ead747fef0190671e7fff502025dcfcd9b6cba97abbaf25b5a575c62a

+ SHA512 (torsocks-2.2.0.tar.xz.asc) = d1f41a3a84b08cf8fd06f0edae8a0cd9c638e6c0e92db3c9bdbdd71fb345c1ac20182d85f4c491ae56291d99fc26a8f3eed2f13708aa3aa1884ba620070a9fe3

@@ -1,25 +0,0 @@ 

- From b4a4af2c15a909b01115fbe3807f943fc4172701 Mon Sep 17 00:00:00 2001

- From: Jamie Nguyen <j@jamielinux.com>

- Date: Thu, 28 May 2015 07:59:11 +0100

- Subject: [PATCH] Do not run tests that require network access

- 

- ---

-  tests/test_list | 3 ---

-  1 file changed, 3 deletions(-)

- 

- diff --git a/tests/test_list b/tests/test_list

- index e66a239..51b1167 100644

- --- a/tests/test_list

- +++ b/tests/test_list

- @@ -1,8 +1,5 @@

-  ./test_connect

- -./test_dns

- -./test_fd_passing

-  ./test_socket

- -./test_getpeername

-  ./unit/test_onion

-  ./unit/test_connection

-  ./unit/test_utils

- -- 

- 2.1.0

- 

@@ -0,0 +1,22 @@ 

+ Description: do not run tests that require network access

+ Forwarded: not-needed

+ Origin: vendor

+ Author: intrigeri <intrigeri@boum.org>

+ 

+ ---

+  tests/Makefile.am | 3 ---

+  1 file changed, 3 deletions(-)

+ 

+ diff --git a/tests/Makefile.am b/tests/Makefile.am

+ index a1ee8b1..564497d 100644

+ --- a/tests/Makefile.am

+ +++ b/tests/Makefile.am

+ @@ -2,9 +2,6 @@ SUBDIRS = utils unit

+  

+  TESTS = \

+  	test_connect \

+ -	test_dns \

+ -	test_fd_passing \

+ -	test_getpeername \

+  	test_socket \

+  	# end of TESTS

@@ -0,0 +1,97 @@ 

+ Bug: http://bugs.torproject.org/20871

+ Origin: upstream, https://gitweb.torproject.org/torsocks.git/commit/?h=maint-2.2.x&id=15465aa7ace1d5e6dbb58e7adf37933b48e20250

+ From: David Goulet <dgoulet@ev0ke.net>

+ Date: Fri, 24 Feb 2017 11:02:13 -0500

+ Subject: Fix check_addr() to return either 0 or 1

+ 

+ This function is used by utils_is_address_ipv4/6 and has to return 0 on

+ error or 1 on success.

+ 

+ Fixes #20871

+ 

+ Signed-off-by: David Goulet <dgoulet@ev0ke.net>

+ ---

+  src/common/utils.c            | 11 ++++++-----

+  tests/unit/test_config-file.c |  4 ++--

+  tests/unit/test_utils.c       |  8 ++++----

+  3 files changed, 12 insertions(+), 11 deletions(-)

+ 

+ diff --git a/src/common/utils.c b/src/common/utils.c

+ index 82479af..8fe9c6e 100644

+ --- a/src/common/utils.c

+ +++ b/src/common/utils.c

+ @@ -45,8 +45,8 @@ static const char *localhost_names_v6[] = {

+  };

+  

+  /*

+ - * Return 1 if the given IP belongs in the af domain else return a negative

+ - * value.

+ + * Return 1 if the given IP belongs in the af domain else return 0 if the

+ + * given ip is not a valid address or the af value is unknown.

+   */

+  static int check_addr(const char *ip, int af)

+  {

+ @@ -56,9 +56,10 @@ static int check_addr(const char *ip, int af)

+  	assert(ip);

+  

+  	ret = inet_pton(af, ip, buf);

+ -	if (ret != 1) {

+ -		ret = -1;

+ -	}

+ +  if (ret == -1) {

+ +    /* Possible if the af value is unknown to inet_pton. */

+ +    ret = 0;

+ +  }

+  

+  	return ret;

+  }

+ diff --git a/tests/unit/test_config-file.c b/tests/unit/test_config-file.c

+ index 59e3115..b48094c 100644

+ --- a/tests/unit/test_config-file.c

+ +++ b/tests/unit/test_config-file.c

+ @@ -104,13 +104,13 @@ static void test_config_file_read_invalid_values(void)

+  

+  	memset(&config, 0x0, sizeof(config));

+  	ret = config_file_read(fixture("config4"), &config);

+ -	ok(ret == -1 &&

+ +	ok(ret == 0 &&

+  		config.conf_file.tor_address == NULL,

+  		"TorAddress invalid IPv4 returns -1");

+  

+  	memset(&config, 0x0, sizeof(config));

+  	ret = config_file_read(fixture("config5"), &config);

+ -	ok(ret == -1 &&

+ +	ok(ret == 0 &&

+  		config.conf_file.tor_address == NULL,

+  		"TorAddress invalid IPv6 returns -1");

+  

+ diff --git a/tests/unit/test_utils.c b/tests/unit/test_utils.c

+ index dc5b0ca..95469d8 100644

+ --- a/tests/unit/test_utils.c

+ +++ b/tests/unit/test_utils.c

+ @@ -36,10 +36,10 @@ static void test_is_address_ipv4(void)

+  	ok(ret == 1, "Valid IPv4 address");

+  

+  	ret = utils_is_address_ipv4("127.0.0.256");

+ -	ok(ret == -1, "Invalid IPv4 address");

+ +	ok(ret == 0, "Invalid IPv4 address");

+  

+  	ret = utils_is_address_ipv4("::1");

+ -	ok(ret == -1, "Invalid IPv4 address when IPv6");

+ +	ok(ret == 0, "Invalid IPv4 address when IPv6");

+  }

+  

+  static void test_is_address_ipv6(void)

+ @@ -55,10 +55,10 @@ static void test_is_address_ipv6(void)

+  	ok(ret == 1, "Valid IPv6 address");

+  

+  	ret = utils_is_address_ipv6("2001:DB8:0:0:8:800:200C:G");

+ -	ok(ret == -1, "Invalid IPv6 address");

+ +	ok(ret == 0, "Invalid IPv6 address");

+  

+  	ret = utils_is_address_ipv6("192.168.0.1");

+ -	ok(ret == -1, "Invalid IPv6 address when IPv4");

+ +	ok(ret == 0, "Invalid IPv6 address when IPv4");

+  }

+  

+  static void test_localhost_resolve(void)

file modified
+30 -16
@@ -1,20 +1,19 @@ 

  Name:              torsocks

- Version:           2.1.0

- Release:           7%{?dist}

+ Version:           2.2.0

+ Release:           1%{?dist}

  

  Summary:           Use SOCKS-friendly applications with Tor

- Group:             Applications/Internet

  License:           GPLv2+

  URL:               https://gitweb.torproject.org/torsocks.git

  

- Source0:           https://people.torproject.org/~dgoulet/torsocks/torsocks-%{version}.tar.bz2

- Source1:           https://people.torproject.org/~dgoulet/torsocks/torsocks-%{version}.tar.bz2.asc

- 

- Patch0:            %{name}-2.1.0-Do-not-run-tests-that-require-network-access.patch

- 

- # Unit tests require /usr/bin/prove

- BuildRequires:     perl(Test::Harness)

+ Source0:           https://people.torproject.org/~dgoulet/torsocks/torsocks-%{version}.tar.xz

+ Source1:           https://people.torproject.org/~dgoulet/torsocks/torsocks-%{version}.tar.xz.asc

  

+ Patch0:            %{name}-2.2.0-Do-not-run-tests-that-require-network-access.patch

+ Patch1:            %{name}-2.2.0-Fix-check_addr-to-return-either-0-or-1.patch

+ %if 0%{?rhel} == 7 || 0%{?fedora} > 26

+ BuildRequires:     automake

+ %endif

  

  %description

  Torsocks allows you to use most SOCKS-friendly applications in a safe way
@@ -23,17 +22,25 @@ 

  

  

  %prep

- %setup -q -n %{name}-%{version}

- %patch0 -p1

+ %autosetup -p1

+ %if 0%{?fedora} > 26

+ sed -i 's/1.15/1.15.1/g' aclocal.m4 configure

+ %endif

+ %if 0%{?rhel} == 7

+ sed -i 's/1.15/1.13.4/g' aclocal.m4 configure

+ %endif

  

  

  %build

- %configure --libdir=%{_libdir}

- make %{?_smp_mflags}

+ %if 0%{?rhel} == 7 || 0%{?fedora} > 26

+ automake

+ %endif

+ %configure

+ %make_build

  

  

  %install

- make install DESTDIR=%{buildroot}

+ %make_install

  

  # Remove extraneous files.

  rm -f %{buildroot}%{_libdir}/torsocks/libtorsocks.{a,la}*
@@ -51,7 +58,8 @@ 

  

  

  %files

- %doc ChangeLog gpl-2.0.txt doc/notes/DEBUG doc/socks/socks-extensions.txt

+ %doc ChangeLog doc/notes/DEBUG doc/socks/socks-extensions.txt

+ %license gpl-2.0.txt

  %{_bindir}/torsocks

  %{_mandir}/man1/torsocks.1.*

  %{_mandir}/man5/torsocks.conf.5.*
@@ -65,9 +73,15 @@ 

  

  

  %changelog

+ * Wed Feb 14 2018 Marcel Haerry <mh+fedora@scrit.ch> - 2.2.0-1

+ - Update to latest release

+ 

  * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-7

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

  

+ * Mon Sep 11 2017 Vasiliy N. Glazov <vascom2@gmail.com> - 2.1.0-6.5

+ - Cleanup spec

+ 

  * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

  

This also includes the cleanup from vascom

2 new commits added

  • update to 2.2.0
  • Cleanup torsocks.spec
5 years ago

LGTM, I'll merge tomorrow if there aren't any concerns from anyone else.

rebased onto b6bc3dd

5 years ago

Pull-Request has been merged by pwouters

5 years ago