Bug 543566 - Review Request: tsocks - Library to allow transparent SOCKS proxying
Summary: Review Request: tsocks - Library to allow transparent SOCKS proxying
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michael Schwendt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-02 16:36 UTC by Jean-Francois Saucier
Modified: 2010-11-24 20:29 UTC (History)
5 users (show)

Fixed In Version: 1.8-0.5.beta5.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-14 01:22:14 UTC
bugs.michael: fedora-review+
tibbs: fedora-cvs+


Attachments (Terms of Use)

Description Jean-Francois Saucier 2009-12-02 16:36:45 UTC
Spec URL: http://jfsaucier.fedorapeople.org/packages/tsocks.spec
SRPM URL: http://jfsaucier.fedorapeople.org/packages/tsocks-1.8-1.beta5.fc12.src.rpm
Description: 
tsocks is a library to allow transparent SOCKS proxying. It supports
both SOCKS 4 and SOCKS 5 (only TCP).

tsocks is designed for use in machines which are firewalled from
the internet. It avoids the need to recompile applications like lynx
or telnet so they can use SOCKS to reach the internet. It behaves
much like the SOCKSified TCP/IP stacks seen on other platforms.



This is my first submitted package and I need a sponsor.

Thank you!

Comment 1 Jean-Francois Saucier 2009-12-03 16:23:29 UTC
* Thu Dec  3 2009 Jean-Francois Saucier <jfsaucier@infoglobe.ca> - 1.8-2.beta5.fc12
- Fix Source0 URL as per the guidelines

Spec URL: http://jfsaucier.fedorapeople.org/packages/tsocks.spec
SRPM URL:
http://jfsaucier.fedorapeople.org/packages/tsocks-1.8-2.beta5.fc12.src.rpm

Comment 2 Michael Schwendt 2009-12-05 12:31:48 UTC
* Please run "rpmlint" on the src.rpm and the built rpms and either resolve any problems it reports or comment on why they need not be fixed.

(!) This is explicitly left to you as an exercise. Feel free to ask any questions that might come up, though.


* You could also submit a scratch-build in the official Fedora build system, which is explained at: https://fedoraproject.org/wiki/PackageMaintainers/Join


* Why the need for glibc-static?
  https://fedoraproject.org/wiki/Packaging:Guidelines#Staticly_Linking_Executables


> Release: 2.beta5%{?dist}

This doesn't adhere to the Package Naming Guidelines for pre-releases:
https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages


> Summary:        Library to allow transparent SOCKS proxying
> Group:          Applications/Internet

Perhaps nit-picky, but what is it, a library or an application? ;-)


> %description
> ...the internet.

... the Internet.


> %doc %{_mandir}/man?/*

The %doc here is redundant. Files in %_mandir are implicitly marked as %doc.


> %files

There are a couple of documentation files included in the tarball, which look like worthy additions for the %doc line: FAQ ChangeLog



> %post
> /sbin/ldconfig

> %postun
> /sbin/ldconfig

This creates shell-scripts within /sbin/ldconfig is executed via /bin/sh. The more common form is to run /sbin/ldconfig directly by using the -p argument (to specify what to run instead of /bin/sh):

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


> * Thu Dec  3 2009 Jean-Francois Saucier <jfsaucier@infoglobe.ca> - 
> 1.8-2.beta5.fc12

Widely accepted practise is to omit the .fc12 expanded dist value here.

Comment 3 Jean-Francois Saucier 2009-12-05 20:35:45 UTC
Spec URL: http://jfsaucier.fedorapeople.org/packages/tsocks.spec
SRPM URL:
http://jfsaucier.fedorapeople.org/packages/tsocks-1.8-0.3.beta5.fc12.src.rpm


Thanks a lot for taking your time reviewing my package. I tried to solve most bugs, see below for transcript :

* rpmlint :
rpmlint is silent on the srpm and spec file. I fixed most of the errors/warnings on the rpm file. Here is the remaining warnings for the rpm file :

- tsocks.i686: W: no-soname /usr/lib/libtsocks.so.1.8
I checked to solve this one, but I'm not sure how to do it cleanly and what it affect. Can you enlight me on this?

- tsocks.i686: W: shared-lib-calls-exit /usr/lib/libtsocks.so.1.8 exit@GLIBC_2.0
I could patch the program, but I'm not sure it's worth it.

- tsocks.i686: W: devel-file-in-non-devel-package /usr/lib/libtsocks.so
tsocks need this file and it's not a devel-file.



* I submited scratch build for f11 and f12 on i386, x86_64, ppc and ppc64 and everything is good :
http://koji.fedoraproject.org/koji/taskinfo?taskID=1851702
http://koji.fedoraproject.org/koji/taskinfo?taskID=1851708


* I patch the Makefile to remove the need of static library linking.


* I think that I fixed my version and release string. I must have misread the guidelines ;)


* You are right, I changed the group because tsocks is more a library with a wrapper script than an application.


* Description, man pages, add worthy files, ldconfig and changelog all fixed!

Comment 4 Michael Schwendt 2009-12-11 21:50:34 UTC
> tsocks.i686: W: no-soname /usr/lib/libtsocks.so.1.8
> I checked to solve this one, but I'm not sure how to do it
> cleanly and what it affect. Can you enlight me on this?

libtsocks isn't an ordinary shared library, which would be linked with applications at build-time and which would create a dependency on the internal library DT_SONAME in the application (as well as corresponding library dependencies in the RPM packages).  libtsocks is loaded manually via LD_PRELOAD before the run-time linker loads other libraries needed for an application.  Hence it doesn't need a SONAME (man ld). 

Which also explains why I questioned whether this is a library or an application? ;)  To copy a more elaborate description from tsocks.8 and extending it with a note on the preloading would be added value.

(One could argue whether the versioned files libtsocks.so.1.8 and libtsocks.so.1 need to be present at all, since nothing uses them currently. It's strange that the author installs the library this way instead of installing the library only as a single libtsocks.so file. However, in parts of the documentation he refers to the versioned library file names. Inconsistent. Dropping them would need a change of the docs, too. Not worthwhile IMO.)


> - tsocks.i686: W: shared-lib-calls-exit /usr/lib/libtsocks.so.1.8
> exit@GLIBC_2.0
> I could patch the program, but I'm not sure it's worth it.

Assuming you have ran "rpmlint -i" on the binary rpm, yes, in this case it would not be worth it. The preloaded library only exits in fatal OOM conditions.


> - tsocks.i686: W: devel-file-in-non-devel-package /usr/lib/libtsocks.so
> tsocks need this file and it's not a devel-file.

True. It's a false positive for this particular package. It's important to understand this rpmlint warning, though, to apply it correctly in the context of ordinary shared library packages.


> * I submited scratch build for f11 and f12 on i386, x86_64, ppc and
> ppc64 and everything is good :
> http://koji.fedoraproject.org/koji/taskinfo?taskID=1851702
> http://koji.fedoraproject.org/koji/taskinfo?taskID=1851708

The 64-bit builds are bad, however. On x86_64 and ppc64, %{_libdir} expands to /usr/lib64 (to allow for multi-lib installations), but /usr/bin/tsocks contains a hardcoded /usr/lib where it won't find the library.

Comment 5 Jean-Francois Saucier 2009-12-14 14:24:24 UTC
Spec URL: http://jfsaucier.fedorapeople.org/packages/tsocks.spec
SRPM URL:
http://jfsaucier.fedorapeople.org/packages/tsocks-1.8-0.4.beta5.fc12.src.rpm


Thank you very much for the explanation, I appreciate it.

I change the Summary and Description field to reflect what is in tsocks.8. You are right, it is more complete and it better describe the library.

I agree with you about the versioned library. I found it odd but I didn't want to change upstream too much.

For the shared-lib-calls-exit warning, yes, I have run rpmlint -i on the binary RPM.

For the x86_64 and ppc64 builds, I really missed there... I should have tested the RPM thoughtfully. For this new version, I changed the bash script to make it work on x86_64. Sadly, I don't have a ppc64 laying around ;) Do you know if Fedora make some hardware available to run some tests?

Comment 6 Michael Schwendt 2010-01-06 19:47:25 UTC
http://fedoraproject.org/wiki/Architecture/PowerPC#PPC_Shell_access_for_debugging

and as far as I know, Kevin Fenzi (kevin) offers access to 32-bit powerpc machines.

[...]

> fix_lib_path.patch

You could have simply dropped the absolute library path altogether

  export LD_PRELOAD=libtsocks.so

because it is stored in default search path for libraries. That would be arch-independent.

[...]

"man 8 tsocks" refers to /lib/libtsocks.so which doesn't match the current packaging.

[...]

Some additional run-time testing. From the bottom of "man 1 tsocks",

|       <without any argument>
|              create a new shell with LD_PRELOAD including tsocks(8).

and the header of /usr/bin/tsocks:

| The third form creates a new shell with LD_PRELOAD set and is achieved
| simply by running the script with no arguments 
| 
| /usr/bin/tsocks
|
| When finished the user can simply terminate the shell with 'exit'

Doesn't work:

$ tsocks
/usr/bin/tsocks: insufficient arguments
$

Comment 7 Jean-Francois Saucier 2010-01-06 21:27:15 UTC
Spec URL: http://jfsaucier.fedorapeople.org/packages/tsocks.spec
SRPM URL:
http://jfsaucier.fedorapeople.org/packages/tsocks-1.8-0.5.beta5.fc12.src.rpm


Thank you for the pointer on PPC, I will try to contact him soon.


> fix_lib_path.patch

I used this trick to differentiate i386 and x86_64 library path since I have seen this code in ALSA source a long time ago. In this case, I think that your simple solution is much better than this old trick! I have updated the patch with this one.


> "man 8 tsocks" refers to /lib/libtsocks.so

The upstream author recommend putting the library directly in /lib to be available at boot time. I don't personally think it's the good place, so I changed the library folder and just fixed the documentation.


> Some additional run-time testing ... Doesn't work

You are right, this option didn't work as planned. I use tsocks since four years and never used that feature! The problem is directly at the start of upstream bash script. I have fixed and tested it


Also, I have changed the patchs file name to be more consistent with guidelines. I have also removed INSTALL from %doc as I don't think it's necessary.


rpmlint give the same warnings/errors and package build fine in mock.


Thank you for your feedback!

Comment 8 Michael Schwendt 2010-01-10 14:03:47 UTC
That did it. Enough fixes for such a small package. :)

APPROVED

Comment 9 Jean-Francois Saucier 2010-01-11 02:45:52 UTC
New Package CVS Request
=======================
Package Name: tsocks
Short Description: Library for catching network connections, redirecting them on a SOCKS server
Owners: jfsaucier
Branches: F-11 F-12
InitialCC:

Comment 10 Jason Tibbitts 2010-01-12 06:16:22 UTC
CVS done (by process-cvs-requests.py)

Comment 11 Fedora Update System 2010-01-13 02:22:46 UTC
tsocks-1.8-0.5.beta5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/tsocks-1.8-0.5.beta5.fc11

Comment 12 Fedora Update System 2010-01-13 02:26:30 UTC
tsocks-1.8-0.5.beta5.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/tsocks-1.8-0.5.beta5.fc12

Comment 13 Fedora Update System 2010-01-14 01:22:09 UTC
tsocks-1.8-0.5.beta5.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2010-01-14 01:22:26 UTC
tsocks-1.8-0.5.beta5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Jean-Francois Saucier 2010-11-24 00:04:19 UTC
Package Change Request
======================
Package Name: tsocks
New Branches: el5 el6
Owners: jfsaucier pcarrier

Comment 16 Jason Tibbitts 2010-11-24 20:29:18 UTC
Git done (by process-git-requests).


Note You need to log in before you can comment on or make changes to this bug.