#767235 torsocks: FTBFS on hurd-i386

Package:
src:torsocks
Source:
torsocks
Submitter:
Date:
2026-03-02 13:15:01 UTC
Severity:
important
Tags:
#767235#5
Date:
2014-10-29 14:04:08 UTC
From:
To:
Hi,

Currently torsocks FTBFS on GNU/Hurd due to lacking OS support. It did
build previously, latest Hurd version is 1.3-3. The attached patch
re-enables the build of torsocks for Hurd. All tests in the testsuite
pass. (Perhaps maybe some comments in the patch are redundant, please
let me know.)

Thanks!

#767235#10
Date:
2014-10-29 14:12:07 UTC
From:
To:
Svante Signell, le Wed 29 Oct 2014 15:04:08 +0100, a écrit :

Err, but then how is it supposed to work at all?

Samuel

#767235#15
Date:
2014-10-29 14:21:32 UTC
From:
To:
These are only case statements in syscall.c to the handle functions.
#767235#20
Date:
2014-10-29 14:51:42 UTC
From:
To:
Svante Signell, le Wed 29 Oct 2014 15:21:32 +0100, a écrit :

Yes, but what is is supposed to do with "arbitrary numbering"?  What is
the torsocks code actually making of it?

Samuel

#767235#25
Date:
2014-11-04 19:46:23 UTC
From:
To:
Hi David,

could you please have a look at this Debian bug report:

https://bugs.debian.org/767235

Thanks in advance!

[Dropping the "patch" tag, as it seems unclear that the patch actually
does the right thing.]

Cheers,
--
intrigeri

#767235#34
Date:
2017-07-20 09:58:18 UTC
From:
To:
[intrigeri 2014]

As far as I can tell, the tsocks_syscall() function is not used on Hurd, thus
failing to hijack connect(), close(), socket() and several other system calls.

#767235#39
Date:
2026-02-19 12:05:26 UTC
From:
To:
we are now in 2026 so this is open since more than 10 years now :( I would
like to fix this. Unfortunately I do not understand why this patch fix the usage
on hurd.

Can you explain why this fixes the issue?

Actually you need to convince upstream to add your patch. I want to have a
minimal diff with upstream, that's why I would only include it in Debian if
upstream accepts the patch. I can also forward a MR, but without being able to
explain it does not make sense to forward a MR.

https://gitlab.torproject.org/tpo/core/torsocks/-/merge_requests

Regards,

hefee

#767235#46
Date:
2026-02-19 13:10:40 UTC
From:
To:
Hello,

Hefee, le jeu. 19 févr. 2026 13:05:26 +0100, a ecrit:

Looking at the change, it seems to be circumventing the fact that
syscall() is not really defined on GNU/Hurd.  Instead of defining
arbitrary values for TSOCKS_NR_*, we could as well put the syscall
redirection code inside #ifndef __GNU__ since there is nothing to
redirect, applications running on GNU/Hurd won't ever be using
syscall().

Samuel

#767235#51
Date:
2026-02-19 14:49:53 UTC
From:
To:
Hey,

Thanks for your fast explanation.

Okay digging deeper into the code I see, that also the linux part on compat.h
has these numbering [1]. So it is not that uncommon.

[1] https://salsa.debian.org/pkg-privacy-team/torsocks/-/blob/debian/sid/src/
common/compat.h?ref_type=heads#L74

The change on configure.ac I understand, that this reflects in the correct libc
version. But buildd is actually fine with the configure step, so is that still
needed?

torsocks.h okay it changed their hunks, but seems fine.

I think the change on syscall.c is not needed anymore, as they changed to
negative logic [2].
https://salsa.debian.org/pkg-privacy-team/torsocks/-/blob/debian/sid/src/lib/
syscall.c#L87

I now have a feeling, that I understand and could ask upstream, if you can
update the patch for the new version. At least hunks have changed and it would
be nice if we propose a working patch for upstream.

I'm a little bit lost in the preprocessor macros. Is __GNU__ only only true
for Hurd?

Regards,

hefee

#767235#56
Date:
2026-02-19 14:53:48 UTC
From:
To:
Hefee, le jeu. 19 févr. 2026 15:49:53 +0100, a ecrit:

To get the proper libc_name to be able to dlopen() it, yes.
https://salsa.debian.org/pkg-privacy-team/torsocks/-/blob/debian/sid/src/lib/syscall.c#L87

Indeed.

Yes, it's really only for GNU/Hurd and not the other GNU variants.

Samuel

#767235#61
Date:
2026-02-24 12:57:26 UTC
From:
To:
Hey,

that's for the fast responses.

Will you update the patch, so that will apply to the current torsocks version
2.5.0? Me don't have any insights in hurd, so it would proberly takes ages to
update the patch.

Will you create a upstream MR with that patch or should I forward that?

regards,

hefee

PS: btw. but a different issue - also HURD/amd64 is failing but already in the
configure step:
https://buildd.debian.org/status/fetch.php?pkg=torsocks&arch=hurd-amd64&ver=2.5.0-5&stamp=1771514351&raw=0

#767235#66
Date:
2026-03-01 20:43:31 UTC
From:
To:
Hello,

Hefee, le mar. 24 févr. 2026 13:57:26 +0100, a ecrit:

Here is an updated patch, which notably simply drops the syscall() part
since that's not actually used on GNU/Hurd.

Please forward it.

Samuel

#767235#73
Date:
2026-03-02 13:13:05 UTC
From:
To:
Hey,

forwarded the patch to upstream.

regards

hefee