Bug#591417: Real fix

2010-08-17 Thread Loïc Minier
On Mon, Aug 16, 2010, Marcos Talau wrote:
 Your patch fix the compile problem, but the Nameservers opt still
 not working.
 
 I talked with upstream and the best thing to do is dropping this
 code from the package.

 Ok; but these are completely different problems; where is the
 Nameservers opt bug tracked?  This bug is about a FTBFS, and the source
 code is clearly incorrect (to the point it broke the toolchain).  I'm
 happy if you hit the two birds with one stone and remove the code
 though.

-- 
Loïc Minier



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#591417: Real fix

2010-08-16 Thread Loïc Minier
tags 591417 + upstream
user 591417 ubuntu-de...@lists.ubuntu.com
usertags 591417 + ubuntu-patch maverick
stop

Hey

 The source was indeed bogus; please find a real fix attached.

 The issue is that src/cfgfile.c uses the name nsaddr as an identifier
 for a local variable, but it's a compatibility #define in resolv.h.
 Renaming to e.g. nsaddress fixes the issue.

 tbm couldn't reproduce with -O2, only with -O3, but I could reproduce
 with -O2 in Ubuntu and confirmed that my changes fix the issue in
 Ubuntu; I'm attaching an Ubuntu debdiff.

 (For folks interested in the GCC ICE, I've opened LP #618684.)

   Cheers,
-- 
Loïc Minier
Description: cfgfile.c: use nsaddress as identifier rather than nsaddr which is #define-d in resolv.h
Author: Loïc Minier loic.min...@ubuntu.com
Origin: ubuntu
Bug-Debian: http://bugs.debian.org/591417
Bug-Ubuntu: https://launchpad.net/bugs/539874

--- ziproxy-2.7.2.orig/src/cfgfile.c
+++ ziproxy-2.7.2/src/cfgfile.c
@@ -397,15 +397,15 @@ int ReadCfgFile(char * cfg_file)
 		
 	n = qp_get_array_size (conf_handler, Nameservers);
 	if (n) {
-		struct sockaddr_in nsaddr;
+		struct sockaddr_in nsaddress;
 
 		if (n  MAXNS)
 			fprintf(stderr, Configuration error: 
 	You can not specify more than %d Nameservers. 
 	Using nameserver 1-%d.\n, MAXNS, MAXNS);
 
-		nsaddr.sin_family = AF_INET;
-		nsaddr.sin_port = htons(53);
+		nsaddress.sin_family = AF_INET;
+		nsaddress.sin_port = htons(53);
 
 		res_init();
 		_res.nscount = 0;
@@ -414,8 +414,8 @@ int ReadCfgFile(char * cfg_file)
 			char *nserver_str;
 			
 			qp_getconf_array_str (conf_handler, Nameservers, i, nserver_str, QP_FLAG_NONE);
-			inet_aton(nserver_str, nsaddr.sin_addr);
-			_res.nsaddr_list[_res.nscount++] = nsaddr;
+			inet_aton(nserver_str, nsaddress.sin_addr);
+			_res.nsaddr_list[_res.nscount++] = nsaddress;
 		}
 	}
 
diff -Nru ziproxy-2.7.2/debian/changelog ziproxy-2.7.2/debian/changelog
--- ziproxy-2.7.2/debian/changelog  2010-03-19 17:33:37.0 +0100
+++ ziproxy-2.7.2/debian/changelog  2010-08-16 16:42:28.0 +0200
@@ -1,3 +1,11 @@
+ziproxy (2.7.2-1.1ubuntu2) maverick; urgency=low
+
+  * cfgfile.c: use nsaddress as identifier rather than nsaddr which is
+#define-d in resolv.h; LP: #539874.
+  * Remove -O1 workaround on arm.
+
+ -- Loïc Minier loic.min...@ubuntu.com  Mon, 16 Aug 2010 16:28:51 +0200
+
 ziproxy (2.7.2-1.1ubuntu1) lucid; urgency=low
 
   * Disable optimization on arm (LP: #539874)
diff -Nru ziproxy-2.7.2/debian/patches/60_cfgfile-nsaddr-clash.diff 
ziproxy-2.7.2/debian/patches/60_cfgfile-nsaddr-clash.diff
--- ziproxy-2.7.2/debian/patches/60_cfgfile-nsaddr-clash.diff   1970-01-01 
01:00:00.0 +0100
+++ ziproxy-2.7.2/debian/patches/60_cfgfile-nsaddr-clash.diff   2010-08-16 
16:41:29.0 +0200
@@ -0,0 +1,38 @@
+Description: cfgfile.c: use nsaddress as identifier rather than nsaddr which 
is #define-d in resolv.h
+Author: Loïc Minier loic.min...@ubuntu.com
+Origin: ubuntu
+Bug-Debian: http://bugs.debian.org/591417
+Bug-Ubuntu: https://launchpad.net/bugs/539874
+
+--- ziproxy-2.7.2.orig/src/cfgfile.c
 ziproxy-2.7.2/src/cfgfile.c
+@@ -397,15 +397,15 @@ int ReadCfgFile(char * cfg_file)
+   
+   n = qp_get_array_size (conf_handler, Nameservers);
+   if (n) {
+-  struct sockaddr_in nsaddr;
++  struct sockaddr_in nsaddress;
+ 
+   if (n  MAXNS)
+   fprintf(stderr, Configuration error: 
+   You can not specify more than %d 
Nameservers. 
+   Using nameserver 1-%d.\n, MAXNS, 
MAXNS);
+ 
+-  nsaddr.sin_family = AF_INET;
+-  nsaddr.sin_port = htons(53);
++  nsaddress.sin_family = AF_INET;
++  nsaddress.sin_port = htons(53);
+ 
+   res_init();
+   _res.nscount = 0;
+@@ -414,8 +414,8 @@ int ReadCfgFile(char * cfg_file)
+   char *nserver_str;
+   
+   qp_getconf_array_str (conf_handler, Nameservers, i, 
nserver_str, QP_FLAG_NONE);
+-  inet_aton(nserver_str, nsaddr.sin_addr);
+-  _res.nsaddr_list[_res.nscount++] = nsaddr;
++  inet_aton(nserver_str, nsaddress.sin_addr);
++  _res.nsaddr_list[_res.nscount++] = nsaddress;
+   }
+   }
+ 
diff -Nru ziproxy-2.7.2/debian/patches/series 
ziproxy-2.7.2/debian/patches/series
--- ziproxy-2.7.2/debian/patches/series 2009-12-29 23:53:54.0 +0100
+++ ziproxy-2.7.2/debian/patches/series 2010-08-16 16:41:56.0 +0200
@@ -1,2 +1,3 @@
 01_ziproxyconf.diff
 02_manziproxylogtoolru.diff
+60_cfgfile-nsaddr-clash.diff
diff -Nru ziproxy-2.7.2/debian/rules ziproxy-2.7.2/debian/rules
--- ziproxy-2.7.2/debian/rules  2010-03-19 17:33:37.0 +0100
+++ ziproxy-2.7.2/debian/rules  2010-08-16 16:28:49.0 +0200
@@ -1,11 +1,5 @@
 #!/usr/bin/make -f
 
-# 

Bug#591417: Real fix

2010-08-16 Thread Marcos Talau
Loïc Minier l...@dooz.org writes:


  The source was indeed bogus; please find a real fix attached.


Your patch fix the compile problem, but the Nameservers opt still not working.

I talked with upstream and the best thing to do is dropping this
code from the package.

Thanks,
Talau


pgp5UKRadWM1k.pgp
Description: PGP signature