From 97beef1ba9a22669cd210e81487055cd8d8478ab Mon Sep 17 00:00:00 2001 From: Alin Năstac Date: Wed, 18 Feb 2009 00:01:47 +0000 Subject: Fix LD_PRELOAD setup, thanks to Yuval Hager (#255960). (Portage version: 2.1.6.4/cvs/Linux 2.6.25-gentoo-r6 x86_64) --- net-proxy/tsocks/ChangeLog | 13 +- .../tsocks/files/tsocks-1.8_beta5-gentoo-r2.patch | 133 +++++++++++++++++++++ .../tsocks/files/tsocks-1.8_beta5-gentoo.patch | 65 ---------- net-proxy/tsocks/tsocks-1.8_beta5-r2.ebuild | 61 ---------- net-proxy/tsocks/tsocks-1.8_beta5-r4.ebuild | 58 +++++++++ 5 files changed, 202 insertions(+), 128 deletions(-) create mode 100644 net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo-r2.patch delete mode 100644 net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo.patch delete mode 100644 net-proxy/tsocks/tsocks-1.8_beta5-r2.ebuild create mode 100644 net-proxy/tsocks/tsocks-1.8_beta5-r4.ebuild (limited to 'net-proxy/tsocks') diff --git a/net-proxy/tsocks/ChangeLog b/net-proxy/tsocks/ChangeLog index 37e1d315f41c..2c570312c241 100644 --- a/net-proxy/tsocks/ChangeLog +++ b/net-proxy/tsocks/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-proxy/tsocks -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/ChangeLog,v 1.27 2008/08/22 21:58:52 maekke Exp $ +# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/ChangeLog,v 1.28 2009/02/18 00:01:46 mrness Exp $ + +*tsocks-1.8_beta5-r4 (18 Feb 2009) + + 18 Feb 2009; Alin Năstac + -files/tsocks-1.8_beta5-gentoo.patch, + +files/tsocks-1.8_beta5-gentoo-r2.patch, -tsocks-1.8_beta5-r2.ebuild, + +tsocks-1.8_beta5-r4.ebuild: + Fix LD_PRELOAD setup, thanks to Yuval Hager + (#255960). 22 Aug 2008; Markus Meier metadata.xml, tsocks-1.8_beta5-r3.ebuild: diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo-r2.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo-r2.patch new file mode 100644 index 000000000000..adb1206367a7 --- /dev/null +++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo-r2.patch @@ -0,0 +1,133 @@ +diff -Naur tsocks-1.8.orig/Makefile.in tsocks-1.8/Makefile.in +--- tsocks-1.8.orig/Makefile.in 2002-03-16 12:12:40.000000000 +0200 ++++ tsocks-1.8/Makefile.in 2009-01-22 10:30:17.000000000 +0200 +@@ -28,6 +28,7 @@ + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + CFLAGS = @CFLAGS@ ++LDFLAGS = @LDFLAGS@ + INCLUDES = -I. + LIBS = @LIBS@ + SPECIALLIBS = @SPECIALLIBS@ +@@ -41,16 +42,16 @@ + all: ${TARGETS} + + ${VALIDATECONF}: ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o +- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS} ++ ${SHCC} ${LDFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS} + + ${INSPECT}: ${INSPECT}.c ${COMMON}.o +- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} ++ ${SHCC} ${LDFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} + + ${SAVE}: ${SAVE}.c +- ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c ++ ${SHCC} ${LDFLAGS} ${INCLUDES} -static -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} ++ ${SHCC} ${LDFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS} + ln -sf ${SHLIB} ${LIB_NAME}.so + + %.so: %.c +diff -Naur tsocks-1.8.orig/tsocks tsocks-1.8/tsocks +--- tsocks-1.8.orig/tsocks 2002-03-16 12:27:18.000000000 +0200 ++++ tsocks-1.8/tsocks 2009-01-22 10:30:34.000000000 +0200 +@@ -46,14 +46,14 @@ + on) + if [ -z "$LD_PRELOAD" ] + then +- export LD_PRELOAD="/usr/lib/libtsocks.so" ++ export LD_PRELOAD="/lib/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 "/lib/libtsocks\.so" || \ ++ export LD_PRELOAD="/lib/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/\/lib\/libtsocks.so \?//'` + if [ -z "$LD_PRELOAD" ] + then + unset LD_PRELOAD +@@ -68,10 +68,10 @@ + *) + if [ -z "$LD_PRELOAD" ] + then +- export LD_PRELOAD="/usr/lib/libtsocks.so" ++ export LD_PRELOAD="/lib/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 "/lib/libtsocks\.so" || \ ++ export LD_PRELOAD="/lib/libtsocks.so $LD_PRELOAD" + fi + + if [ $# = 0 ] +diff -Naur tsocks-1.8.orig/tsocks.8 tsocks-1.8/tsocks.8 +--- tsocks-1.8.orig/tsocks.8 2002-03-16 12:20:51.000000000 +0200 ++++ tsocks-1.8/tsocks.8 2009-01-22 10:30:17.000000000 +0200 +@@ -127,8 +127,8 @@ + libtsocks in /etc/ld.so.preload. Please make sure you correctly enter the + full path to the library in this file if you do this. If you get it wrong, + you will be UNABLE TO DO ANYTHING with the machine and will have to boot +-it with a rescue disk and remove the file (or try the saveme program, see +-the INSTALL file for more info). THIS IS A ***WARNING***, please be ++it with a rescue disk and remove the file (or try the tsocks-saveme program, ++simply unlinks /etc/ld.so.preload ). THIS IS A ***WARNING***, please be + careful. Also be sure the library is in the root filesystem as all hell + will break loose if the directory it is in is not available at boot time. + +diff -Naur tsocks-1.8.orig/tsocks.conf.5 tsocks-1.8/tsocks.conf.5 +--- tsocks-1.8.orig/tsocks.conf.5 2002-05-18 05:13:08.000000000 +0300 ++++ tsocks-1.8/tsocks.conf.5 2009-01-22 10:30:17.000000000 +0200 +@@ -139,21 +139,20 @@ + the version that server supports. + + .TP +-validateconf +-validateconf can be used to verify the configuration file. It checks the format +-of the file and also the contents for errors. Having read the file it dumps +-the configuration to the screen in a formatted, readable manner. This can be +-extremely useful in debugging problems. +- +-validateconf can read a configuration file from a location other than the +-location specified at compile time with the -f command line +-option. +- +-Normally validateconf simply dumps the configuration read to the screen (in +-a nicely readable format), however it also has a useful 'test' mode. When +-passed a hostname/ip on the command line like -t , validateconf +-determines which of the SOCKS servers specified in the configuration file +-would be used by tsocks to access the specified host. ++tsocks-validateconf ++tsocks-validateconf can be used to verify the configuration file. It checks ++the format of the file and also the contents for errors. Having read the file ++it dumps the configuration to the screen in a formatted, readable manner. ++This can be extremely useful in debugging problems. ++ ++tsocks-validateconf can read a configuration file from a location other than the ++location specified at compile time with the -f command line option. ++ ++Normally tsocks-validateconf simply dumps the configuration read to the screen ++(in a nicely readable format), however it also has a useful 'test' mode. When ++passed a hostname/ip on the command line like -t , ++tsocks-validateconf determines which of the SOCKS servers specified in the ++configuration file would be used by tsocks to access the specified host. + + .SH SEE ALSO + tsocks(8) +diff -Naur tsocks-1.8.orig/validateconf.c tsocks-1.8/validateconf.c +--- tsocks-1.8.orig/validateconf.c 2002-02-07 12:49:59.000000000 +0200 ++++ tsocks-1.8/validateconf.c 2009-01-22 10:30:17.000000000 +0200 +@@ -23,7 +23,7 @@ + */ + + /* Global configuration variables */ +-char *progname = "validateconf"; /* Name for error msgs */ ++char *progname = "tsocks-validateconf"; /* Name for error msgs */ + + /* Header Files */ + #include diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo.patch deleted file mode 100644 index aee2d06fdb75..000000000000 --- a/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -Nru tsocks-1.8.orig/tsocks.8 tsocks-1.8/tsocks.8 ---- tsocks-1.8.orig/tsocks.8 2002-03-16 12:20:51.000000000 +0200 -+++ tsocks-1.8/tsocks.8 2006-09-22 15:01:13.005417500 +0300 -@@ -127,8 +127,8 @@ - libtsocks in /etc/ld.so.preload. Please make sure you correctly enter the - full path to the library in this file if you do this. If you get it wrong, - you will be UNABLE TO DO ANYTHING with the machine and will have to boot --it with a rescue disk and remove the file (or try the saveme program, see --the INSTALL file for more info). THIS IS A ***WARNING***, please be -+it with a rescue disk and remove the file (or try the tsocks-saveme program, -+simply unlinks /etc/ld.so.preload ). THIS IS A ***WARNING***, please be - careful. Also be sure the library is in the root filesystem as all hell - will break loose if the directory it is in is not available at boot time. - -diff -Nru tsocks-1.8.orig/tsocks.conf.5 tsocks-1.8/tsocks.conf.5 ---- tsocks-1.8.orig/tsocks.conf.5 2002-05-18 05:13:08.000000000 +0300 -+++ tsocks-1.8/tsocks.conf.5 2006-09-22 15:03:49.063170500 +0300 -@@ -139,21 +139,20 @@ - the version that server supports. - - .TP --validateconf --validateconf can be used to verify the configuration file. It checks the format --of the file and also the contents for errors. Having read the file it dumps --the configuration to the screen in a formatted, readable manner. This can be --extremely useful in debugging problems. -- --validateconf can read a configuration file from a location other than the --location specified at compile time with the -f command line --option. -- --Normally validateconf simply dumps the configuration read to the screen (in --a nicely readable format), however it also has a useful 'test' mode. When --passed a hostname/ip on the command line like -t , validateconf --determines which of the SOCKS servers specified in the configuration file --would be used by tsocks to access the specified host. -+tsocks-validateconf -+tsocks-validateconf can be used to verify the configuration file. It checks -+the format of the file and also the contents for errors. Having read the file -+it dumps the configuration to the screen in a formatted, readable manner. -+This can be extremely useful in debugging problems. -+ -+tsocks-validateconf can read a configuration file from a location other than the -+location specified at compile time with the -f command line option. -+ -+Normally tsocks-validateconf simply dumps the configuration read to the screen -+(in a nicely readable format), however it also has a useful 'test' mode. When -+passed a hostname/ip on the command line like -t , -+tsocks-validateconf determines which of the SOCKS servers specified in the -+configuration file would be used by tsocks to access the specified host. - - .SH SEE ALSO - tsocks(8) -diff -Nru tsocks-1.8.orig/validateconf.c tsocks-1.8/validateconf.c ---- tsocks-1.8.orig/validateconf.c 2002-02-07 12:49:59.000000000 +0200 -+++ tsocks-1.8/validateconf.c 2006-09-22 15:04:10.368502000 +0300 -@@ -23,7 +23,7 @@ - */ - - /* Global configuration variables */ --char *progname = "validateconf"; /* Name for error msgs */ -+char *progname = "tsocks-validateconf"; /* Name for error msgs */ - - /* Header Files */ - #include diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r2.ebuild b/net-proxy/tsocks/tsocks-1.8_beta5-r2.ebuild deleted file mode 100644 index 33a3d5b68476..000000000000 --- a/net-proxy/tsocks/tsocks-1.8_beta5-r2.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/tsocks-1.8_beta5-r2.ebuild,v 1.7 2007/04/22 08:26:07 kloeri Exp $ - -inherit multilib eutils autotools toolchain-funcs - -DESCRIPTION="Transparent SOCKS v4 proxying library" -HOMEPAGE="http://tsocks.sourceforge.net/" -SRC_URI="mirror://sourceforge/tsocks/${PN}-${PV/_}.tar.gz - tordns? ( mirror://gentoo/${PN}-${PV/_beta/b}-tordns1-gentoo.patch.gz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 ppc ppc64 sparc x86 ~x86-fbsd" -IUSE="tordns" - -S="${WORKDIR}/${P%%_*}" - -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}/${P}-gentoo.patch" - epatch "${FILESDIR}/${P}-bsd.patch" - use tordns && epatch "../${PN}-${PV/_beta/b}-tordns1-gentoo.patch" - eautoconf -} - -src_compile() { - tc-export CC - - # NOTE: the docs say to install it into /lib. If you put it into - # /usr/lib and add it to /etc/ld.so.preload on many systems /usr isn't - # mounted in time :-( (Ben Lutgens) - econf \ - --with-conf=/etc/socks/tsocks.conf \ - --libdir=/$(get_libdir) || die "configure failed" - # Fix QA notice lack of SONAME - emake DYNLIB_FLAGS=-Wl,--soname,libtsocks.so.${PV/_beta*} || die "emake failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "make install failed" - newbin validateconf tsocks-validateconf - newbin saveme tsocks-saveme - dobin inspectsocks - insinto /etc/socks - doins tsocks.conf.*.example - dodoc FAQ - use tordns && dodoc README* - # tsocks script is buggy so we need this symlink - dodir /usr/$(get_libdir) - dosym /$(get_libdir)/libtsocks.so /usr/$(get_libdir)/libtsocks.so -} - -pkg_postinst() { - einfo "Make sure you create /etc/socks/tsocks.conf from one of the examples in that directory" - einfo "The following executables have been renamed:" - einfo " /usr/bin/saveme renamed to tsocks-saveme" - einfo " /usr/bin/validateconf renamed to tsocks-validateconf" -} diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r4.ebuild b/net-proxy/tsocks/tsocks-1.8_beta5-r4.ebuild new file mode 100644 index 000000000000..df9c2c409024 --- /dev/null +++ b/net-proxy/tsocks/tsocks-1.8_beta5-r4.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/tsocks-1.8_beta5-r4.ebuild,v 1.1 2009/02/18 00:01:46 mrness Exp $ + +inherit multilib eutils autotools toolchain-funcs + +DESCRIPTION="Transparent SOCKS v4 proxying library" +HOMEPAGE="http://tsocks.sourceforge.net/" +SRC_URI="mirror://sourceforge/tsocks/${PN}-${PV/_}.tar.gz + tordns? ( mirror://gentoo/${PN}-${PV/_beta/b}-tordns1-gentoo-r1.patch.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="tordns" + +S="${WORKDIR}/${P%%_*}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-gentoo-r2.patch" + epatch "${FILESDIR}/${P}-bsd.patch" + use tordns && epatch "../${PN}-${PV/_beta/b}-tordns1-gentoo-r1.patch" + eautoconf +} + +src_compile() { + tc-export CC + + # NOTE: the docs say to install it into /lib. If you put it into + # /usr/lib and add it to /etc/ld.so.preload on many systems /usr isn't + # mounted in time :-( (Ben Lutgens) + econf \ + --with-conf=/etc/socks/tsocks.conf \ + --libdir=/$(get_libdir) || die "configure failed" + # Fix QA notice lack of SONAME + emake DYNLIB_FLAGS=-Wl,--soname,libtsocks.so.${PV/_beta*} || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + newbin validateconf tsocks-validateconf + newbin saveme tsocks-saveme + dobin inspectsocks + insinto /etc/socks + doins tsocks.conf.*.example + dodoc FAQ + use tordns && dodoc README* +} + +pkg_postinst() { + einfo "Make sure you create /etc/socks/tsocks.conf from one of the examples in that directory" + einfo "The following executables have been renamed:" + einfo " /usr/bin/saveme renamed to tsocks-saveme" + einfo " /usr/bin/validateconf renamed to tsocks-validateconf" +} -- cgit v1.2.3-65-gdbad