[Pkg-privacy-commits] [Git][pkg-privacy-team/torsocks][master] 3 commits: Add patch to make torsocks M-A:foreign and Arch:all.

Hefee (@hefee) hefee at debian.org
Thu Mar 6 23:45:49 GMT 2025



Hefee pushed to branch master at Privacy Maintainers / torsocks


Commits:
3682c121 by Sandro Knauß at 2025-03-07T00:43:59+01:00
Add patch to make torsocks M-A:foreign and Arch:all.

- - - - -
b644e932 by Sandro Knauß at 2025-03-07T00:44:33+01:00
Use Pre-Depends for libtorsocks.

- - - - -
cfa450ef by Sandro Knauß at 2025-03-07T00:45:31+01:00
Do not ship <tripplet>-torsocks scripts anymore, instead we use ld.so feature to load the correct library.

- - - - -


5 changed files:

- debian/control
- debian/libtorsocks.install
- + debian/patches/0004-Make-torsocks-multi-arch-foreign-compatible.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/control
=====================================
@@ -13,7 +13,9 @@ Vcs-Git: https://salsa.debian.org/pkg-privacy-team/torsocks.git
 Homepage: https://gitweb.torproject.org/torsocks.git
 
 Package: torsocks
-Architecture: any
+Architecture: all
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
 Depends: libtorsocks (= ${binary:Version}),
          ${shlibs:Depends},
          ${misc:Depends}
@@ -30,6 +32,7 @@ Description: use SOCKS-friendly applications with Tor
 Package: libtorsocks
 Architecture: any
 Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends},
          ${misc:Depends}
 Breaks: torsocks (<< 2.4.0-3)


=====================================
debian/libtorsocks.install
=====================================
@@ -1,2 +1,2 @@
-usr/bin/${DEB_HOST_GNU_TYPE}-torsocks
+etc/ld.so.conf.d/torsocks-${DEB_HOST_GNU_TYPE}.conf
 usr/lib/${DEB_HOST_MULTIARCH}/torsocks/


=====================================
debian/patches/0004-Make-torsocks-multi-arch-foreign-compatible.patch
=====================================
@@ -0,0 +1,52 @@
+Description: Make torsocks multi-arch:foreign compatible.
+Author: Sandro Knauß <hefee at debian.org>
+Origin: Debian
+Bug-Debian: https://bugs.debian.org/902792
+Forwarded: not-needed
+
+---
+ src/bin/torsocks.in | 19 +++++++++++++------
+ 1 file changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/src/bin/torsocks.in b/src/bin/torsocks.in
+index eee4608..2b9e98e 100644
+--- a/src/bin/torsocks.in
++++ b/src/bin/torsocks.in
+@@ -60,13 +60,15 @@
+ # Modified by David Goulet <dgoulet at ev0ke.net> 2013
+ # Modified by Alex Xu (Hello71) <alex_y_xu at yahoo.ca> 2018
+ 
++# Debian: To make this multi-arch compatible use LD_PRELOAD method to load the
++# correct library, for us. libdir would be arch specific).
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
++libdir="DONOTUSE"
+ LIBDIR="${libdir}/torsocks"
+ LIB_NAME="libtorsocks"
+ SHLIB_EXT="@SHLIB_EXT@"
+-SHLIB="${LIBDIR}/${LIB_NAME}.${SHLIB_EXT}"
++SHLIB="${LIB_NAME}.${SHLIB_EXT}"
+ 
+ # https://github.com/mkropat/sh-realpath
+ #
+@@ -310,10 +312,15 @@ if [ $# -eq 0 ] ; then
+ 	exit 1
+ fi
+ 
+-if [ ! -e "$SHLIB" ]; then
+-   echo "ERROR: $SHLIB does not exist! Try re-installing torsocks." >&2
+-   exit 1
+-fi
++
++# Debian: To make this multi-arch compatible use LD_PRELOAD method to load the
++# correct library, for us.
++
++
++#if [ ! -e "$SHLIB" ]; then
++#   echo "ERROR: $SHLIB does not exist! Try re-installing torsocks." >&2
++#   exit 1
++#fi
+ 
+ while true;
+ do


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
 exclude_test_requiring_network.patch
 fix_compatibility_with_C99.patch
 fix_groff_warning_on_torsocks.8
+0004-Make-torsocks-multi-arch-foreign-compatible.patch


=====================================
debian/rules
=====================================
@@ -14,6 +14,6 @@ DESTDIR = $(CURDIR)/debian/tmp
 	dh $@
 
 execute_after_dh_auto_install:
-	cp $(DESTDIR)/usr/bin/torsocks $(DESTDIR)/usr/bin/$(DEB_HOST_GNU_TYPE)-torsocks
+	echo "/usr/lib/$(DEB_HOST_GNU_TYPE)/torsocks" > $(DESTDIR)/etc/ld.so.conf.d/torsocks-$(DEB_HOST_GNU_TYPE).conf
 
 override_dh_makeshlibs:



View it on GitLab: https://salsa.debian.org/pkg-privacy-team/torsocks/-/compare/82ab093d357f8732b7845fd26b865337bc2e2844...cfa450ef0ff5b5fae6ca1a2ec29a1633a56705b2

-- 
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/torsocks/-/compare/82ab093d357f8732b7845fd26b865337bc2e2844...cfa450ef0ff5b5fae6ca1a2ec29a1633a56705b2
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-commits/attachments/20250306/7c165857/attachment-0001.htm>


More information about the Pkg-privacy-commits mailing list