rpms/timidity++/devel TiMidity++-2.13.2-ipv6.patch, 1.1, 1.2 timidity++.spec, 1.29, 1.30 TiMidity++-2.13.2-ipv6-fixes.patch, 1.1, NONE

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Sat May 3 19:39:03 UTC 2008


Author: jwrdegoede

Update of /cvs/extras/rpms/timidity++/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11727

Modified Files:
	TiMidity++-2.13.2-ipv6.patch timidity++.spec 
Removed Files:
	TiMidity++-2.13.2-ipv6-fixes.patch 
Log Message:
* Sat May  3 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-16
- Some small fixes to ipv6 support from upstream


TiMidity++-2.13.2-ipv6.patch:

Index: TiMidity++-2.13.2-ipv6.patch
===================================================================
RCS file: /cvs/extras/rpms/timidity++/devel/TiMidity++-2.13.2-ipv6.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TiMidity++-2.13.2-ipv6.patch	20 Feb 2008 21:26:06 -0000	1.1
+++ TiMidity++-2.13.2-ipv6.patch	3 May 2008 19:38:20 -0000	1.2
@@ -1,6 +1,5 @@
-diff -up TiMidity++-2.13.2/utils/net.c.ipv6 TiMidity++-2.13.2/utils/net.c
---- TiMidity++-2.13.2/utils/net.c.ipv6	2002-07-19 02:46:14.000000000 +0200
-+++ TiMidity++-2.13.2/utils/net.c	2008-02-01 14:44:46.000000000 +0100
+--- TiMidity++-2.13.2/utils/net.c	2008-05-03 20:26:26.071330866 +0300
++++ TiMidity++-2.13.2/utils/net.c	2008-05-03 20:44:00.054330651 +0300
 @@ -58,7 +58,9 @@
  SOCKET open_socket(char *host, unsigned short port)
  {
@@ -12,7 +11,7 @@
  
  #if defined(WINSOCK)
      static int first = 1;
-@@ -69,27 +71,33 @@ SOCKET open_socket(char *host, unsigned 
+@@ -69,27 +71,36 @@
      }
  #endif
  
@@ -32,19 +31,22 @@
 +    hints.ai_flags = AI_ADDRCONFIG;
 +
 +    snprintf(service, sizeof(service), "%d", port);
++
++    s = getaddrinfo(host, service, &hints, &result);
  
 -    if((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET)
 -	return (SOCKET)-1;
-+    s = getaddrinfo(host, service, &hints, &result);
- 
--    if(connect(fd, (struct sockaddr *)&in, sizeof(in)) == SOCKET_ERROR)
 +    if (s)
 +        return (SOCKET)-1;
-+
+ 
+-    if(connect(fd, (struct sockaddr *)&in, sizeof(in)) == SOCKET_ERROR)
 +    for (rp = result; rp != NULL; rp = rp->ai_next)
      {
 -	closesocket(fd);
 -	return (SOCKET)-1;
++        if (rp->ai_family != AF_INET && rp->ai_family != AF_INET6)
++            continue;
++
 +        fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
 +
 +        if (fd != -1 && connect(fd, rp->ai_addr, rp->ai_addrlen) != -1)
@@ -62,10 +64,9 @@
  }
  
  #if !defined(__W32__) || defined(__CYGWIN32__)
-diff -up TiMidity++-2.13.2/libarc/url_news.c.ipv6 TiMidity++-2.13.2/libarc/url_news.c
---- TiMidity++-2.13.2/libarc/url_news.c.ipv6	2002-07-19 02:09:22.000000000 +0200
-+++ TiMidity++-2.13.2/libarc/url_news.c	2008-02-01 14:44:46.000000000 +0100
-@@ -288,8 +288,17 @@ URL url_news_open(char *name)
+--- TiMidity++-2.13.2/libarc/url_news.c	2008-05-03 20:26:26.069330916 +0300
++++ TiMidity++-2.13.2/libarc/url_news.c	2008-05-03 20:44:00.052330701 +0300
+@@ -288,8 +288,17 @@
      buff[sizeof(buff) - 1] = '\0';
  
      host = buff;
@@ -85,10 +86,9 @@
      if(*p == ':')
      {
  	*p++ = '\0'; /* terminate `host' string */
-diff -up TiMidity++-2.13.2/libarc/url_ftp.c.ipv6 TiMidity++-2.13.2/libarc/url_ftp.c
---- TiMidity++-2.13.2/libarc/url_ftp.c.ipv6	2002-01-15 11:53:19.000000000 +0100
-+++ TiMidity++-2.13.2/libarc/url_ftp.c	2008-02-01 14:44:46.000000000 +0100
-@@ -234,6 +234,14 @@ URL url_ftp_open(char *name)
+--- TiMidity++-2.13.2/libarc/url_ftp.c	2008-05-03 20:26:26.069330916 +0300
++++ TiMidity++-2.13.2/libarc/url_ftp.c	2008-05-03 20:44:00.052330701 +0300
+@@ -234,6 +234,14 @@
  		*passwd++ = '\0';
  	}
  
@@ -103,10 +103,9 @@
  #ifdef DEBUG
  	printf("open(host=`%s', port=`%d')\n", host, port);
  #endif /* DEBUG */
-diff -up TiMidity++-2.13.2/libarc/url_http.c.ipv6 TiMidity++-2.13.2/libarc/url_http.c
---- TiMidity++-2.13.2/libarc/url_http.c.ipv6	2002-01-15 11:53:19.000000000 +0100
-+++ TiMidity++-2.13.2/libarc/url_http.c	2008-02-01 14:44:46.000000000 +0100
-@@ -133,8 +133,15 @@ URL url_http_open(char *name)
+--- TiMidity++-2.13.2/libarc/url_http.c	2008-05-03 20:26:26.069330916 +0300
++++ TiMidity++-2.13.2/libarc/url_http.c	2008-05-03 20:44:00.052330701 +0300
+@@ -133,8 +133,15 @@
  	p = name;
  	if(strncmp(p, "http://", 7) == 0)
  	    p += 7;
@@ -124,7 +123,7 @@
  	len = q - p;
  	if(len >= sizeof(wwwserver) - 1) { /* What?? */
  	    strcpy(wwwserver, "localhost");
-@@ -158,8 +165,18 @@ URL url_http_open(char *name)
+@@ -158,8 +165,18 @@
  	memcpy(buff, name, n + 1);
  
  	host = buff;
@@ -145,9 +144,8 @@
  	if(*p == ':')
  	{
  	    char *pp;
-diff -up TiMidity++-2.13.2/interface/server_c.c.ipv6 TiMidity++-2.13.2/interface/server_c.c
---- TiMidity++-2.13.2/interface/server_c.c.ipv6	2004-09-27 01:40:13.000000000 +0200
-+++ TiMidity++-2.13.2/interface/server_c.c	2008-02-01 14:44:46.000000000 +0100
+--- TiMidity++-2.13.2/interface/server_c.c	2008-05-03 20:26:26.063331347 +0300
++++ TiMidity++-2.13.2/interface/server_c.c	2008-05-03 20:44:00.040331003 +0300
 @@ -50,6 +50,7 @@
  #include <sys/socket.h>
  #include <sys/time.h>
@@ -156,7 +154,7 @@
  #ifndef NO_STRING_H
  #include <string.h>
  #else
-@@ -227,7 +228,7 @@ static double start_time;
+@@ -227,7 +228,7 @@
  static int tmr_running;
  
  static int is_system_prefix = 0;
@@ -165,14 +163,13 @@
  static double low_time_at = 0.3;
  static double high_time_at = 0.5;
  static FILE *outfp;
-@@ -294,34 +295,58 @@ static void ctl_event(CtlEvent *e)
+@@ -294,44 +295,82 @@
  
  static int pasv_open(int *port)
  {
 -    int sfd;
 -    struct sockaddr_in server;
 +    int sfd, s;
-+    struct sockaddr_storage server;
 +    struct addrinfo hints, *result, *rp;
 +    char service[NI_MAXSERV];
  
@@ -189,7 +186,7 @@
      {
 -	perror("socket");
 -	return -1;
-+        fprintf(stderr, "getaddrinfo ", gai_strerror(s));
++        fprintf(stderr, "getaddrinfo %s", gai_strerror(s));
 +        return -1;
      }
  
@@ -199,6 +196,9 @@
 -    server.sin_addr.s_addr = htonl(INADDR_ANY);
 +    for (rp = result; rp != NULL; rp = rp->ai_next)
 +    {
++        if (rp->ai_family != AF_INET && rp->ai_family != AF_INET6)
++            continue;
++
 +        sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
 +
 +        if (sfd == -1)
@@ -241,8 +241,12 @@
 +
      if(*port == 0)
      {
++	struct sockaddr_storage server;
  	int len = sizeof(server);
-@@ -331,7 +356,17 @@ static int pasv_open(int *port)
++
+ 	if(getsockname(sfd, (struct sockaddr *)&server, &len) < 0)
+ 	{
+ 	    perror("getsockname");
  	    close(sfd);
  	    return -1;
  	}
@@ -261,7 +265,7 @@
      }
  
      /* Set it up to wait for connections. */
-@@ -847,7 +882,7 @@ static int cmd_help(int argc, char **arg
+@@ -847,7 +886,7 @@
  static int cmd_open(int argc, char **argv)
  {
      int sock;
@@ -270,7 +274,7 @@
      int addrlen;
      int port;
  
-@@ -881,8 +916,20 @@ static int cmd_open(int argc, char **arg
+@@ -881,8 +920,29 @@
      }
      close(sock);
  
@@ -282,21 +286,29 @@
 +        case AF_INET:
 +            if (((struct sockaddr_in *) &control_client)->sin_addr.s_addr !=
 +                ((struct sockaddr_in *) &in)->sin_addr.s_addr)
++              {
++                close(data_fd);
++                data_fd = -1;
 +                return send_status(513, "Security violation: Address mismatch");
-+            break;
++              }
++              break;
 +        case AF_INET6:
-+            if (((struct sockaddr_in6 *) &control_client)->sin6_addr.s6_addr != 
-+                ((struct sockaddr_in6 *) &in)->sin6_addr.s6_addr)
++            if (memcmp(
++                ((struct sockaddr_in6 *) &control_client)->sin6_addr.s6_addr,
++                ((struct sockaddr_in6 *) &in)->sin6_addr.s6_addr, 16))
++              {
++                close(data_fd);
++                data_fd = -1;
 +                return send_status(513, "Security violation: Address mismatch");
-+            break;
++              }
++              break;
 +    }
  
      send_status(200, "Ready data connection");
      data_buffer_len = 0;
-diff -up TiMidity++-2.13.2/timidity/timidity.c.ipv6 TiMidity++-2.13.2/timidity/timidity.c
---- TiMidity++-2.13.2/timidity/timidity.c.ipv6	2008-02-01 15:07:26.000000000 +0100
-+++ TiMidity++-2.13.2/timidity/timidity.c	2008-02-01 15:03:32.000000000 +0100
-@@ -1489,6 +1489,8 @@ MAIN_INTERFACE int read_config_file(char
+--- TiMidity++-2.13.2/timidity/timidity.c	2008-05-03 20:26:26.051329973 +0300
++++ TiMidity++-2.13.2/timidity/timidity.c	2008-05-03 20:44:00.017329627 +0300
+@@ -1489,6 +1489,8 @@
  	/* #extension HTTPproxy hostname:port */
  	else if(strcmp(w[0], "HTTPproxy") == 0)
  	{
@@ -305,7 +317,7 @@
  	    if(words < 2)
  	    {
  		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
-@@ -1500,7 +1502,7 @@ MAIN_INTERFACE int read_config_file(char
+@@ -1500,7 +1502,7 @@
  	    /* If network is not supported, this extension is ignored. */
  #ifdef SUPPORT_SOCKET
  	    url_http_proxy_host = safe_strdup(w[1]);
@@ -314,7 +326,7 @@
  	    {
  		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
  			  "%s: line %d: Syntax error", name, line);
-@@ -1516,11 +1518,30 @@ MAIN_INTERFACE int read_config_file(char
+@@ -1516,11 +1518,30 @@
  		CHECKERRLIMIT;
  		continue;
  	    }
@@ -345,7 +357,7 @@
  	    if(words < 2)
  	    {
  		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
-@@ -1532,7 +1553,7 @@ MAIN_INTERFACE int read_config_file(char
+@@ -1532,7 +1553,7 @@
  	    /* If network is not supported, this extension is ignored. */
  #ifdef SUPPORT_SOCKET
  	    url_ftp_proxy_host = safe_strdup(w[1]);
@@ -354,7 +366,7 @@
  	    {
  		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
  			  "%s: line %d: Syntax error", name, line);
-@@ -1548,6 +1569,23 @@ MAIN_INTERFACE int read_config_file(char
+@@ -1548,6 +1569,23 @@
  		CHECKERRLIMIT;
  		continue;
  	    }


Index: timidity++.spec
===================================================================
RCS file: /cvs/extras/rpms/timidity++/devel/timidity++.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- timidity++.spec	3 Apr 2008 14:29:07 -0000	1.29
+++ timidity++.spec	3 May 2008 19:38:20 -0000	1.30
@@ -1,7 +1,7 @@
 Summary: A software wavetable MIDI synthesizer
 Name: timidity++
 Version: 2.13.2
-Release: 15%{?dist}
+Release: 16%{?dist}
 Group: Applications/Multimedia
 Source: http://downloads.sourceforge.net/timidity/TiMidity++-%{version}.tar.bz2
 Source1: fedora-timidity.desktop
@@ -21,8 +21,7 @@
 Patch14: TiMidity++-2.13.2-ipv6.patch
 Patch15: TiMidity++-2.13.2-dynlibroot.patch
 Patch16: TiMidity++-2.13.2-cfgfile-name.patch
-Patch17: TiMidity++-2.13.2-ipv6-fixes.patch
-Patch18: TiMidity++-2.13.2-missing-protos.patch
+Patch17: TiMidity++-2.13.2-missing-protos.patch
 
 License: GPLv2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -58,7 +57,6 @@
 %patch15 -p1
 %patch16 -p1
 %patch17 -p1
-%patch18 -p1
 
 
 %build
@@ -121,6 +119,9 @@
 
 
 %changelog
+* Sat May  3 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-16
+- Some small fixes to ipv6 support from upstream
+
 * Thu Apr  3 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-15
 - Fix missing prototype compiler warnings
 


--- TiMidity++-2.13.2-ipv6-fixes.patch DELETED ---




More information about the scm-commits mailing list