unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* torsocks 2.0 bug
@ 2016-01-29 10:45 swedebugia
  2016-01-29 11:28 ` Efraim Flashner
  0 siblings, 1 reply; 8+ messages in thread
From: swedebugia @ 2016-01-29 10:45 UTC (permalink / raw)
  To: guix-devel

Hi

I found after reconfiguring my system lately that the update to torsocks 
2.0 broke this:

$ torsocks icecat

Which I use all the time.

I tested with the former 2-3 versions of Icecat in my store and they all 
fail silently. Passing debug options does not give a clue to whats 
wrong.

I tested torsocks 2.0 with youtube-dl and lynx and both work.

I would like to patch tor.scm to have the option of installing an 
earlier version of torsocks but dont know hot to check out the old 
version.

cheers swedebugia

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

* Re: torsocks 2.0 bug
  2016-01-29 10:45 torsocks 2.0 bug swedebugia
@ 2016-01-29 11:28 ` Efraim Flashner
  2016-01-29 15:28   ` swedebugia
  0 siblings, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2016-01-29 11:28 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1766 bytes --]

On Fri, 29 Jan 2016 11:45:59 +0100
swedebugia@riseup.net wrote:

> Hi
> 
> I found after reconfiguring my system lately that the update to torsocks 
> 2.0 broke this:
> 
> $ torsocks icecat
> 
> Which I use all the time.
> 
> I tested with the former 2-3 versions of Icecat in my store and they all 
> fail silently. Passing debug options does not give a clue to whats 
> wrong.

What type of things don't work? That update was about 2.5 months ago, did you
do all the normal things like rebooting after reconfiguring?

> I tested torsocks 2.0 with youtube-dl and lynx and both work.
> 
> I would like to patch tor.scm to have the option of installing an 
> earlier version of torsocks but dont know hot to check out the old 
> version.
> 
> cheers swedebugia
> 

here's the patch that updated torsocks. (attached)

to have your own, custom torsocks from the previous version, you could add a
file torsocks.scm, and build it with `guix build -f torsocks.scm`

#:use-module ...

(define-public torsocks-custom  <-- I'm not sure if this line is necessary here
  (package (inherit torsocks)
    (name "torsocks-custom")
    (version "1.2")
      (source (origin
                (method url-fetch)
                (uri (string-append "http://torsocks.googlecode.com/files/torsocks-"
                                   version ".tar.gz"))
               (sha256
                (base32
                 "1m0is5q24sf7jjlkl0icfkdc0m53nbkg0q72s57p48yp4hv7v9dy"))))
    (arguments '())
    (native-inputs '(()))))

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-torsocks-Upgrade-to-2.0.0.patch --]
[-- Type: text/x-patch, Size: 5067 bytes --]

From ba583bd2ce887cdd8b99ea55c15b57c5209e4b58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Tue, 10 Nov 2015 18:38:04 +0100
Subject: [PATCH] gnu: torsocks: Upgrade to 2.0.0.

* gnu/packages/tor.scm (torsocks): Update to 2.0.0.
  [source]: Fetch from git.torproject.org.  Use
  'torsocks-dns-test.patch'.
  [arguments, native-inputs]: New fields.
  [license]: Change to GPL2.
* gnu/packages/patches/torsocks-dns-test.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                |  1 +
 gnu/packages/patches/torsocks-dns-test.patch | 18 ++++++++++++++
 gnu/packages/tor.scm                         | 37 ++++++++++++++++++++--------
 3 files changed, 46 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/torsocks-dns-test.patch

diff --git a/gnu-system.am b/gnu-system.am
index cf99a9a..c5b32b2 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -661,6 +661,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/texi2html-document-encoding.patch	\
   gnu/packages/patches/texi2html-i18n.patch			\
   gnu/packages/patches/tidy-CVE-2015-5522+5523.patch		\
+  gnu/packages/patches/torsocks-dns-test.patch			\
   gnu/packages/patches/tvtime-gcc41.patch			\
   gnu/packages/patches/tvtime-pngoutput.patch			\
   gnu/packages/patches/tvtime-videodev2.patch			\
diff --git a/gnu/packages/patches/torsocks-dns-test.patch b/gnu/packages/patches/torsocks-dns-test.patch
new file mode 100644
index 0000000..ba70ba5
--- /dev/null
+++ b/gnu/packages/patches/torsocks-dns-test.patch
@@ -0,0 +1,18 @@
+Skip DNS tests that rely on the ability to look up arbitary
+host names.
+
+--- torsocks/tests/test_dns.c	2015-11-10 18:30:53.955941984 +0100
++++ torsocks/tests/test_dns.c	2015-11-10 18:31:02.199941892 +0100
+@@ -134,11 +134,8 @@ static void test_getaddrinfo(const struc
+ int main(int argc, char **argv)
+ {
+ 	/* Libtap call for the number of tests planned. */
+-	plan_tests(NUM_TESTS);
++	plan_tests(1);
+ 
+-	test_getaddrinfo(&tor_check);
+-    test_gethostbyname(&tor_dir_auth1);
+-	test_gethostbyaddr(&tor_dir_auth2);
+ 	test_getaddrinfo(&tor_localhost);
+ 
+     return 0;
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 3cf45a4..3b057d4 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -18,13 +18,16 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages tor)
-  #:use-module ((guix licenses) #:select (bsd-3 gpl2+))
+  #:use-module ((guix licenses) #:select (bsd-3 gpl2+ gpl2))
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages tls)
@@ -66,22 +69,36 @@ applications based on the TCP protocol.")
 (define-public torsocks
   (package
     (name "torsocks")
-    (version "1.2")
+    (version "2.0.0")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "http://torsocks.googlecode.com/files/torsocks-"
-                                 version ".tar.gz"))
-             (sha256
-              (base32
-               "1m0is5q24sf7jjlkl0icfkdc0m53nbkg0q72s57p48yp4hv7v9dy"))))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.torproject.org/torsocks.git")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "0an2q5ail9z414riyjbkjkm29504hy778j914baz2gn5hlv2cfak"))
+              (file-name (string-append name "-" version "-checkout"))
+              (patches (list (search-patch "torsocks-dns-test.patch")))))
     (build-system gnu-build-system)
-    (home-page "http://code.google.com/p/torsocks/")
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'bootstrap
+                    (lambda _
+                      (system* "autoreconf" "-vfi"))))))
+    (native-inputs `(("autoconf" ,(autoconf-wrapper))
+                     ("automake" ,automake)
+                     ("libtool" ,libtool)
+                     ("perl-test-harness" ,perl-test-harness)))
+    (home-page "http://www.torproject.org/")
     (synopsis "Use socks-friendly applications with Tor")
     (description
      "Torsocks allows you to use most socks-friendly applications in a safe
 way with Tor.  It ensures that DNS requests are handled safely and explicitly
 rejects UDP traffic from the application you're using.")
-    (license gpl2+)))
+
+    ;; All the files explicitly say "version 2 only".
+    (license gpl2)))
 
 (define-public privoxy
   (package
-- 
2.7.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: torsocks 2.0 bug
  2016-01-29 11:28 ` Efraim Flashner
@ 2016-01-29 15:28   ` swedebugia
  2016-02-03  9:40     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: swedebugia @ 2016-01-29 15:28 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

On 2016-01-29 12:28, Efraim Flashner wrote:
> On Fri, 29 Jan 2016 11:45:59 +0100
> swedebugia@riseup.net wrote:
> 
>> Hi
>> 
>> I found after reconfiguring my system lately that the update to 
>> torsocks
>> 2.0 broke this:
>> 
>> $ torsocks icecat
>> 
>> Which I use all the time.
>> 
>> I tested with the former 2-3 versions of Icecat in my store and they 
>> all
>> fail silently. Passing debug options does not give a clue to whats
>> wrong.
> 
> What type of things don't work? That update was about 2.5 months ago, 
> did you
> do all the normal things like rebooting after reconfiguring?
> 
>> I tested torsocks 2.0 with youtube-dl and lynx and both work.
>> 
>> I would like to patch tor.scm to have the option of installing an
>> earlier version of torsocks but dont know hot to check out the old
>> version.
>> 
>> cheers swedebugia
>> 
> 
> here's the patch that updated torsocks. (attached)
> 
> to have your own, custom torsocks from the previous version, you could 
> add a
> file torsocks.scm, and build it with `guix build -f torsocks.scm`
> 
> #:use-module ...
> 
> (define-public torsocks-custom  <-- I'm not sure if this line is 
> necessary here
>   (package (inherit torsocks)
>     (name "torsocks-custom")
>     (version "1.2")
>       (source (origin
>                 (method url-fetch)
>                 (uri (string-append
> "http://torsocks.googlecode.com/files/torsocks-"
>                                    version ".tar.gz"))
>                (sha256
>                 (base32
>                  
> "1m0is5q24sf7jjlkl0icfkdc0m53nbkg0q72s57p48yp4hv7v9dy"))))
>     (arguments '())
>     (native-inputs '(()))))

Thanks for the tips.
I looked into torsocks and it seems:
* they moved to https://gitweb.torproject.org/torsocks.git
* there is a version 2.1 (from 8 months ago) here: 
https://gitweb.torproject.org/torsocks.git/commit/?id=a43a3656a5bb4391fb1654d5ff44a5257e1f165f
* 2.0 branch is a complete rewrite of 1.3 which was the last stable 
1.x-version. 
https://lists.torproject.org/pipermail/tor-dev/2013-August/005319.html

I propose: we update to 2.1 first and see if this fixes the problem with 
only icecat.

cheers
sdb

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

* Re: torsocks 2.0 bug
  2016-01-29 15:28   ` swedebugia
@ 2016-02-03  9:40     ` Ludovic Courtès
  2016-02-03 18:08       ` swedebugia
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-02-03  9:40 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

swedebugia@riseup.net skribis:

> I propose: we update to 2.1 first and see if this fixes the problem
> with only icecat.

Sounds good.  Would you like to send a patch?

Thanks,
Ludo’.

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

* Re: torsocks 2.0 bug
  2016-02-03  9:40     ` Ludovic Courtès
@ 2016-02-03 18:08       ` swedebugia
  2016-02-03 19:33         ` Andreas Enge
  0 siblings, 1 reply; 8+ messages in thread
From: swedebugia @ 2016-02-03 18:08 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

On 2016-02-03 10:40, ludo@gnu.org wrote:
> swedebugia@riseup.net skribis:
> 
>> I propose: we update to 2.1 first and see if this fixes the problem
>> with only icecat.
> 
> Sounds good.  Would you like to send a patch?

I tried my best and... failed. Ha!

Attached an almost working patch with details of what fails.

Cheers
sdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-torsocks-Update-to-2.1.0.patch --]
[-- Type: text/x-diff; name=0001-gnu-torsocks-Update-to-2.1.0.patch, Size: 1849 bytes --]

From de72a36bbe3559c345e41359c91d80820d858127 Mon Sep 17 00:00:00 2001
From: swedebugia <swedebugia@riseup.net>
Date: Wed, 3 Feb 2016 18:58:47 +0100
Subject: [PATCH] gnu: torsocks: Update to 2.1.0.

---
 gnu/packages/tor.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 5fb8f95..329e282 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -70,7 +70,7 @@ applications based on the TCP protocol.")
 (define-public torsocks
   (package
     (name "torsocks")
-    (version "2.0.0")
+    (version "2.1.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -78,15 +78,20 @@ applications based on the TCP protocol.")
                     (commit (string-append "v" version))))
               (sha256
                (base32
-                "0an2q5ail9z414riyjbkjkm29504hy778j914baz2gn5hlv2cfak"))
+                "1l890pg0h2hqpkabsnwc6pq2qi8mfv58qzaaicc9y62rq5nmrrws"))
               (file-name (string-append name "-" version "-checkout"))
               (patches (list (search-patch "torsocks-dns-test.patch")))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
+                  ; FIXME. this phase is still needed but fails. I dont
+                  ; understand why. It works fine when done manually in an
+                  ; environment.
                   (add-before 'configure 'bootstrap
                     (lambda _
-                      (system* "autoreconf" "-vfi"))))))
+                      (system* "autoreconf" "-i")
+       ; FIXME. test_fd_passing fail.
+       #:tests? #f)))))
     (native-inputs `(("autoconf" ,(autoconf-wrapper))
                      ("automake" ,automake)
                      ("libtool" ,libtool)
-- 
2.6.3


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

* Re: torsocks 2.0 bug
  2016-02-03 18:08       ` swedebugia
@ 2016-02-03 19:33         ` Andreas Enge
  2016-06-28  9:12           ` ng0
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Enge @ 2016-02-03 19:33 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

On Wed, Feb 03, 2016 at 07:08:32PM +0100, swedebugia@riseup.net wrote:
>       '(#:phases (modify-phases %standard-phases
> +                  ; FIXME. this phase is still needed but fails. I dont
> +                  ; understand why. It works fine when done manually in an
> +                  ; environment.
>                    (add-before 'configure 'bootstrap
>                      (lambda _
> -                      (system* "autoreconf" "-vfi"))))))
> +                      (system* "autoreconf" "-i")

The problem is here. First of all, there was no need to drop the options "v"
and "f". But the real problem comes from dropping the parentheses.
So now what follows is part of the "lambda" function:

> +       ; FIXME. test_fd_passing fail.
> +       #:tests? #f)))))

And it ends with "#f", so the return value of the function is false, and the
phase fails.

I tried closing more parentheses, and then the build passes, but the tests
still fail. This would need to be investigated more.

Andreas

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

* Re: torsocks 2.0 bug
  2016-02-03 19:33         ` Andreas Enge
@ 2016-06-28  9:12           ` ng0
  2016-08-01 15:37             ` ng0
  0 siblings, 1 reply; 8+ messages in thread
From: ng0 @ 2016-06-28  9:12 UTC (permalink / raw)
  To: guix-devel

Hi,

I found this thread while I was deleting old threads.

I worked on torsocks-2.1.0 without knowing there was
a discussion before. As expected I ran into problems
too.

The only change I did so far was version bumping, which
when building torsocks-2.1.0 only fails tests.

This is because our torsocks-2.0 disable dns patch no
longer works but so far I have found no solution to
fix it.

Problems appear to be exclusive to tests/unit/test_dns.c ,
line 59.
I suggest that whoever wrote the torsocks patch creates
one for torsocks-2.1.0

Andreas Enge writes:

> On Wed, Feb 03, 2016 at 07:08:32PM +0100, swedebugia@riseup.net wrote:
>>       '(#:phases (modify-phases %standard-phases
>> +                  ; FIXME. this phase is still needed but fails. I dont
>> +                  ; understand why. It works fine when done manually in an
>> +                  ; environment.
>>                    (add-before 'configure 'bootstrap
>>                      (lambda _
>> -                      (system* "autoreconf" "-vfi"))))))
>> +                      (system* "autoreconf" "-i")
>
> The problem is here. First of all, there was no need to drop the options "v"
> and "f". But the real problem comes from dropping the parentheses.
> So now what follows is part of the "lambda" function:
>
>> +       ; FIXME. test_fd_passing fail.
>> +       #:tests? #f)))))
>
> And it ends with "#f", so the return value of the function is false, and the
> phase fails.
>
> I tried closing more parentheses, and then the build passes, but the tests
> still fail. This would need to be investigated more.
>
> Andreas
>
>

--
♥Ⓐ  ng0
For non-prism friendly talk find me on
psyced.org / loupsycedyglgamf.onion

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

* Re: torsocks 2.0 bug
  2016-06-28  9:12           ` ng0
@ 2016-08-01 15:37             ` ng0
  0 siblings, 0 replies; 8+ messages in thread
From: ng0 @ 2016-08-01 15:37 UTC (permalink / raw)
  To: guix-devel

A short note to link threads:
It is likely that 2.2.x release will fix the current bug, see
https://lists.gnu.org/archive/html/guix-devel/2016-07/msg01452.html

ng0@we.make.ritual.n0.is writes:

> Hi,
>
> I found this thread while I was deleting old threads.
>
> I worked on torsocks-2.1.0 without knowing there was
> a discussion before. As expected I ran into problems
> too.
>
> The only change I did so far was version bumping, which
> when building torsocks-2.1.0 only fails tests.
>
> This is because our torsocks-2.0 disable dns patch no
> longer works but so far I have found no solution to
> fix it.
>
> Problems appear to be exclusive to tests/unit/test_dns.c ,
> line 59.
> I suggest that whoever wrote the torsocks patch creates
> one for torsocks-2.1.0
>
> Andreas Enge writes:
>
>> On Wed, Feb 03, 2016 at 07:08:32PM +0100, swedebugia@riseup.net wrote:
>>>       '(#:phases (modify-phases %standard-phases
>>> +                  ; FIXME. this phase is still needed but fails. I dont
>>> +                  ; understand why. It works fine when done manually in an
>>> +                  ; environment.
>>>                    (add-before 'configure 'bootstrap
>>>                      (lambda _
>>> -                      (system* "autoreconf" "-vfi"))))))
>>> +                      (system* "autoreconf" "-i")
>>
>> The problem is here. First of all, there was no need to drop the options "v"
>> and "f". But the real problem comes from dropping the parentheses.
>> So now what follows is part of the "lambda" function:
>>
>>> +       ; FIXME. test_fd_passing fail.
>>> +       #:tests? #f)))))
>>
>> And it ends with "#f", so the return value of the function is false, and the
>> phase fails.
>>
>> I tried closing more parentheses, and then the build passes, but the tests
>> still fail. This would need to be investigated more.
>>
>> Andreas
>>
>>


-- 
♥Ⓐ  ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org

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

end of thread, other threads:[~2016-08-01 15:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-29 10:45 torsocks 2.0 bug swedebugia
2016-01-29 11:28 ` Efraim Flashner
2016-01-29 15:28   ` swedebugia
2016-02-03  9:40     ` Ludovic Courtès
2016-02-03 18:08       ` swedebugia
2016-02-03 19:33         ` Andreas Enge
2016-06-28  9:12           ` ng0
2016-08-01 15:37             ` ng0

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).