From 894a82a40694a6c76f6f08b3796aad6894021e9a Mon Sep 17 00:00:00 2001 From: Jean-Francois Saucier Date: Jan 13 2010 01:08:29 +0000 Subject: - Initial import for Fedora 11 --- diff --git a/.cvsignore b/.cvsignore index e69de29..600293d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +tsocks-1.8beta5.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..de4fd8c --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +tsocks-1_8-0_5_beta5_fc12:F-11:tsocks-1.8-0.5.beta5.fc12.src.rpm:1263344743 diff --git a/sources b/sources index e69de29..5f7a32e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +51caefd77e5d440d0bbd6443db4fc0f8 tsocks-1.8beta5.tar.gz diff --git a/tsocks.spec b/tsocks.spec new file mode 100644 index 0000000..21afec5 --- /dev/null +++ b/tsocks.spec @@ -0,0 +1,79 @@ +%define real_version 1.8beta5 +Name: tsocks +Version: 1.8 +Release: 0.5.beta5%{?dist} +Summary: Library for catching network connections, redirecting them on a SOCKS server +Group: System Environment/Libraries +License: GPLv2+ +URL: http://tsocks.sourceforge.net/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{real_version}.tar.gz +Patch0: tsocks_remove_static_lib.patch +Patch1: tsocks_fix_lib_path.patch +Patch2: tsocks_script_validation_error.patch +Patch3: tsocks_documentation_update.patch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +%description +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. + +tsocks is a library to allow transparent SOCKS proxying. It wraps the +normal connect() function. When a connection is attempted, it consults +the configuration file (which is defined at configure time but defaults +to /etc/tsocks.conf) and determines if the IP address specified is local. +If it is not, the library redirects the connection to a SOCKS server +specified in the configuration file. It then negotiates that connection +with the SOCKS server and passes the connection back to the calling +program. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + +%build +%configure +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc ChangeLog COPYING FAQ TODO tsocks.conf.simple.example tsocks.conf.complex.example +%{_mandir}/man?/* +%{_bindir}/* +%{_libdir}/libtsocks* + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%changelog +* Wed Jan 6 2010 Jean-Francois Saucier - 1.8-0.5.beta5 +- Fix the library path problem more cleanly +- Fix bash script validation to handle the no argument case +- Change patch name to reflect guidelines +- Fix documentation to reflect patch modifications +- Remove INSTALL from packaged files + +* Mon Dec 14 2009 Jean-Francois Saucier - 1.8-0.4.beta5 +- Fix the library path problem on x86_64 and ppc64 +- Elaborate the summary and description fields + +* Sat Dec 5 2009 Jean-Francois Saucier - 1.8-0.3.beta5 +- Fix as per the recommendations on bug #543566 + +* Thu Dec 3 2009 Jean-Francois Saucier - 1.8-0.2.beta5 +- Fix Source0 URL as per the guidelines + +* Tue Dec 1 2009 Jean-Francois Saucier - 1.8-0.1.beta5 +- Initial build for Fedora diff --git a/tsocks_documentation_update.patch b/tsocks_documentation_update.patch new file mode 100644 index 0000000..5c9cb41 --- /dev/null +++ b/tsocks_documentation_update.patch @@ -0,0 +1,17 @@ +diff -up tsocks-1.8/tsocks.8.orig tsocks-1.8/tsocks.8 +--- tsocks-1.8/tsocks.8.orig 2010-01-06 15:21:30.943839291 -0500 ++++ tsocks-1.8/tsocks.8 2010-01-06 15:22:25.271556160 -0500 +@@ -15,11 +15,11 @@ specified below: + + Bash, Ksh and Bourne shell - + +-export LD_PRELOAD=/lib/libtsocks.so ++export LD_PRELOAD=libtsocks.so + + C Shell - + +-setenv LD_PRELOAD=/lib/libtsocks.so ++setenv LD_PRELOAD=libtsocks.so + + This process can be automated (for Bash, Bourne and Korn shell + users) for a single command or for all commands in a shell session diff --git a/tsocks_fix_lib_path.patch b/tsocks_fix_lib_path.patch new file mode 100644 index 0000000..f605be6 --- /dev/null +++ b/tsocks_fix_lib_path.patch @@ -0,0 +1,36 @@ +diff -up tsocks-1.8/tsocks.orig tsocks-1.8/tsocks +--- tsocks-1.8/tsocks.orig 2010-01-06 15:05:03.168841738 -0500 ++++ tsocks-1.8/tsocks 2010-01-06 15:06:51.047555817 -0500 +@@ -46,14 +46,14 @@ case "$1" in + on) + if [ -z "$LD_PRELOAD" ] + then +- export LD_PRELOAD="/usr/lib/libtsocks.so" ++ export LD_PRELOAD="libtsocks.so" + else +- echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \ +- export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD" ++ echo $LD_PRELOAD | grep -q "libtsocks\.so" || \ ++ export LD_PRELOAD="libtsocks.so $LD_PRELOAD" + fi + ;; + off) +- export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/usr\/lib\/libtsocks.so \?//'` ++ export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/libtsocks.so \?//'` + if [ -z "$LD_PRELOAD" ] + then + unset LD_PRELOAD +@@ -68,10 +68,10 @@ case "$1" in + *) + if [ -z "$LD_PRELOAD" ] + then +- export LD_PRELOAD="/usr/lib/libtsocks.so" ++ export LD_PRELOAD="libtsocks.so" + else +- echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \ +- export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD" ++ echo $LD_PRELOAD | grep -q "libtsocks\.so" || \ ++ export LD_PRELOAD="libtsocks.so $LD_PRELOAD" + fi + + if [ $# = 0 ] diff --git a/tsocks_remove_static_lib.patch b/tsocks_remove_static_lib.patch new file mode 100644 index 0000000..15ecf6d --- /dev/null +++ b/tsocks_remove_static_lib.patch @@ -0,0 +1,12 @@ +diff -up tsocks-1.8/Makefile.in.orig tsocks-1.8/Makefile.in +--- tsocks-1.8/Makefile.in.orig 2009-12-05 10:49:44.033729745 -0500 ++++ tsocks-1.8/Makefile.in 2009-12-05 10:49:54.429979972 -0500 +@@ -47,7 +47,7 @@ ${INSPECT}: ${INSPECT}.c ${COMMON}.o + ${SHCC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} + + ${SAVE}: ${SAVE}.c +- ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c ++ ${SHCC} ${CFLAGS} ${INCLUDES} -o ${SAVE} ${SAVE}.c + + ${SHLIB}: ${OBJS} ${COMMON}.o ${PARSER}.o + ${SHCC} ${CFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS} diff --git a/tsocks_script_validation_error.patch b/tsocks_script_validation_error.patch new file mode 100644 index 0000000..294afda --- /dev/null +++ b/tsocks_script_validation_error.patch @@ -0,0 +1,15 @@ +diff -up tsocks-1.8/tsocks.orig tsocks-1.8/tsocks +--- tsocks-1.8/tsocks.orig 2010-01-06 15:10:23.151847455 -0500 ++++ tsocks-1.8/tsocks 2010-01-06 15:13:27.436555813 -0500 +@@ -37,11 +37,6 @@ + # This script is originally from the debian tsocks package by + # Tamas Szerb + +-if [ $# = 0 ] ; then +- echo "$0: insufficient arguments" +- exit +-fi +- + case "$1" in + on) + if [ -z "$LD_PRELOAD" ]