Opened 16 years ago

Closed 13 years ago

#16324 closed update (fixed)

tcpproxy 1.1.9 does not build; update to 2.0.0-beta15

Reported by: cedstrom@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: haspatch Cc: raimue (Rainer Müller)
Port: tcpproxy

Description

tcpproxy is out of date and doesn't build. Here is a patch to fix that. Apply to /trunk/dports/net/tcpproxy

Index: files/patch-tcpproxy.c.diff
===================================================================
--- files/patch-tcpproxy.c.diff	(revision 39299)
+++ files/patch-tcpproxy.c.diff	(working copy)
@@ -1,32 +1,97 @@
---- tcpproxy.c	Sun Apr  4 23:30:30 2004
-+++ tcpproxy.c.new	Thu May 27 17:10:28 2004
-@@ -87,7 +87,7 @@
- #include <unistd.h>
+--- acp.c	2005-10-28 10:18:03.000000000 -0700
++++ acp.c.new	2008-08-16 11:46:54.000000000 -0700
+@@ -29,7 +29,7 @@
  
+ #include <ctype.h>
  #include <signal.h>
 -#include <wait.h>
 +#include <sys/wait.h>
  #include <errno.h>
+ #include <time.h>
+ 
+--- makefile	2007-08-30 02:24:19.000000000 -0700
++++ makefile.new	2008-08-16 11:35:55.000000000 -0700
+@@ -1,6 +1,6 @@
+ 
+ CC =		gcc
+-CFLAGS =	-ggdb -O2 -Wall -DVERSION='"$(VERSION) $(RELEASE)"'
++CFLAGS =	-ggdb -O2 -Wall -DVERSION='"$(VERSION) $(RELEASE)"' -D__PREFIX__='"/opt/local"'
+ 
+ PROGRAM =	tcpproxy
+ VERSION =	2.0.0-beta15
+
+--- procinfo.c	2006-01-07 06:03:13.000000000 -0800
++++ procinfo.c.new	2008-08-16 11:47:18.000000000 -0700
+@@ -29,7 +29,7 @@
+ 
  #include <ctype.h>
- #include <pwd.h>
-@@ -105,8 +105,9 @@
- #include "ip-lib.h"
- #include "lib.h"
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <errno.h>
+ #include <time.h>
  
--#define	PIDFILE			"/var/run/tcpproxy.pid"
--#define	ERROR_LOG		"/tmp/tcpproxy-error.log"
-+#define CONFFILE		"__PREFIX__/etc/tcpproxy.conf"
-+#define	PIDFILE			"__PREFIX__/var/run/tcpproxy.pid"
-+#define	ERROR_LOG		"__PREFIX__/var/log/tcpproxy-error.log"
- #define	MAX_PORT		80
+--- tcpproxy.c	2007-08-30 02:36:12.000000000 -0700
++++ tcpproxy.c.new	2008-08-16 11:46:34.000000000 -0700
+@@ -29,7 +29,7 @@
  
+ #include <ctype.h>
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <errno.h>
+ #include <time.h>
  
-@@ -1212,7 +1213,7 @@
+@@ -45,7 +45,7 @@
+ #include <syslog.h>
+ #include <sys/time.h>
+ 
+-#include <linux/netfilter_ipv4.h>
++/* #include <linux/netfilter_ipv4.h> */
+ 
+ 
+ 
+@@ -677,7 +677,7 @@
  	if (*configfile != 0)
- 		read_configuration(configfile, x);
+ 		read_configuration(config, configfile);
   	else if (bound == 0  &&  k >= argc) {
 -		copy_string(configfile, "/etc/tcpproxy.conf", sizeof(configfile));
 +		copy_string(configfile, CONFFILE, sizeof(configfile));
- 		standalone = 1;
  
- 		read_configuration(configfile, x);
+ 		/* This default is the most common cause for tcpproxy installations
+ 		 * to fail initially.
+@@ -1012,15 +1012,18 @@
+ 
+ 
+ 	if (x->redirmode != 0) {
+-		int	rc;
++		//int	rc;
+ 		size_t	socksize;
+ 		struct sockaddr_in sock;
+ 
+ 		socksize = sizeof(sock);
++#if 0
+ 		rc = getsockopt(0, SOL_IP, SO_ORIGINAL_DST, &sock, &socksize);
+ 		if (rc != 0)
+ 			;
+-		else if (strcmp((char *) inet_ntoa(sock.sin_addr), x->sock.ipnum) != 0  ||
++		else 
++#endif
++		if (strcmp((char *) inet_ntoa(sock.sin_addr), x->sock.ipnum) != 0  ||
+ 			 ntohs(sock.sin_port) != x->sock.port) {
+ 
+ 			/*
+--- tcpproxy.h	2006-08-28 11:20:46.000000000 -0700
++++ tcpproxy.h.new	2008-08-16 11:37:14.000000000 -0700
+@@ -7,8 +7,9 @@
+ 
+ 
+ #define	PROXYNAME		"tcpproxy"
+-#define PIDFILE                 "/var/run/tcpproxy.pid"
+-#define ERROR_LOG               "/tmp/tcpproxy-error.log"
++#define CONFFILE		"__PREFIX__/etc/tcpproxy.conf"
++#define PIDFILE                 "__PREFIX__/run/tcpproxy.pid"
++#define ERROR_LOG               "__PREFIX__/tcpproxy-error.log"
+ #define MAX_PORT                80
+ 
+ 
Index: Portfile
===================================================================
--- Portfile	(revision 39299)
+++ Portfile	(working copy)
@@ -3,16 +3,16 @@
 PortSystem 1.0
 
 name		tcpproxy
-version		1.1.9
+version		2.0.0-beta15
 categories	net
 platforms	darwin
-maintainers	nomaintainer
+maintainers	openmaintainer@macports.org
 description	tcpproxy is a proxy (tunnel, redirector) for TCP/IP protocols
 long_description	${description}
 
-homepage	http://quietsche-entchen.de/cgi-bin/wiki.cgi/software/tcpproxy.yawk
-master_sites	http://quietsche-entchen.de/cgi-bin/wiki.cgi/download/
-checksums	md5 7ae45da0d1b263bc507be97e35dbb15b
+homepage	http://quietsche-entchen.de/cgi-bin/wiki.cgi/proxies/TcpProxy
+master_sites	http://quietsche-entchen.de/download/
+checksums	md5 e946f807049d6296f54aa57b5c17f1c8
 patchfiles	patch-tcpproxy.c.diff
 
 configure	{

Change History (10)

comment:1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

I fixed the homepage and download location of tcpproxy in r39330. tcpproxy 1.1.9 now installs fine for me on Leopard.

I would rather not update the port to 2.0.0-beta15; we usually want to update ports only to released versions of software, unless tcpproxy 1.1.9 really doesn't work at all and the developers consider 2.0.0-beta15 to be of release quality. (Do they?)

If desired, we could copy the tcpproxy port and create a new tcpproxy-devel port which would be for pre-release versions like 2.0.0-beta15, if there are specific features of 2.0.0-beta15 that you need that do not exist in 1.1.9.

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Also, your patch to patch-tcpproxy.c.diff isn't good because it now hardcodes /opt/local into the patchfile. MacPorts could be installed into a different prefix.

comment:3 in reply to:  2 Changed 16 years ago by cedstrom@…

Replying to ryandesign@macports.org:

Also, your patch to patch-tcpproxy.c.diff isn't good because it now hardcodes /opt/local into the patchfile. MacPorts could be installed into a different prefix.

Ah yes, that was for debugging purposes and I forgot to remove it. Simply removing the patch for makefile.new works.

There's no need to upgrade now; we can keep this patch for when 2.0 goes stable.

Thanks!

comment:4 Changed 16 years ago by raimue (Rainer Müller)

Cc: raimue@… added

Should we close this ticket now or leave it open until 2.0.0 is released?

I am always for closing tickets to reduce the clutter.

comment:5 Changed 16 years ago by raimue (Rainer Müller)

Resolution: wontfix
Status: newclosed

Closing per answer in private mail.

comment:6 Changed 15 years ago by jmroot (Joshua Root)

Type: defectupdate

comment:7 Changed 15 years ago by (none)

Milestone: Port Updates

Milestone Port Updates deleted

comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Port: tcpproxy added
Resolution: wontfix
Status: closedreopened
Summary: [PATCH] tcpproxy - 1.1.9 - does not buildtcpproxy 1.1.9 does not build; update to 2.0.0-beta15

I'm reopening this ticket to do this update now. 2.0.0-beta15 has been the "current" version since September 2007 and 1.1.9 isn't even available on the developer's site anymore. That seems to be a vote for 2.0.0-beta15's stability. There's also a report in #29549 of 1.1.9 crashing; perhaps that's resolved by updating to 2.0.0-beta15.

comment:9 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to ryandesign@…
Status: reopenednew

comment:10 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.