rpms/libupnp/devel libupnp.spec, NONE, 1.1 libupnp_dsm_320.patch, NONE, 1.1 libupnp_ixml_FC4.patch, NONE, 1.1 libupnp_performance.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Eric Tanguy (tanguy) fedora-extras-commits at redhat.com
Fri Jan 20 08:40:11 UTC 2006


Author: tanguy

Update of /cvs/extras/rpms/libupnp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv561/devel

Modified Files:
	.cvsignore sources 
Added Files:
	libupnp.spec libupnp_dsm_320.patch libupnp_ixml_FC4.patch 
	libupnp_performance.patch 
Log Message:
auto-import libupnp-1.2.1a-4 on branch devel from libupnp-1.2.1a-4.src.rpm


--- NEW FILE libupnp.spec ---
Version: 1.2.1a
Summary: Universal Plug and Play (UPnP) SDK
Name: libupnp
Release: 4%{?dist}
License: BSD
Group: System Environment/Libraries
URL: http://upnp.sourceforge.net/
Source: http://ovh.dl.sourceforge.net/sourceforge/upnp/%{name}-%{version}.tar.gz
Patch0: libupnp_dsm_320.patch 
Patch1: libupnp_ixml_FC4.patch 
Patch2: libupnp_performance.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
The Universal Plug and Play (UPnP) SDK for Linux provides 
support for building UPnP-compliant control points, devices, 
and bridges on Linux.

%package devel
Group: Development/Libraries
Summary: Include files needed for development with libupnp
Requires: libupnp = %{version}-%{release}

%description devel
The libupnp-devel package contains the files necessary for development with
the UPnP SDK libraries.

%prep
%setup -q

%patch0 -p0
%patch1 -p0
%patch2 -p1
chmod 644 {LICENSE,README}

# Fix permissions for files in debuginfo package
find . -name '*.[ch]' | xargs chmod 644

# Fix libupnp.so symlink
sed -i -e 's#ln -s \$(PREFIX)/usr/lib/libupnp\.so#ln -s libupnp.so#' upnp/makefile

# Remove -Os optflag and add RPM optflags in makefiles
# Install libraries in correct directories
find . -name '[Mm]akefile' | xargs sed -i \
	-e 's/^\([[:space:]]*CFLAGS .*\) -Os/\1/' \
	-e 's/^\([[:space:]]*DEBUG_FLAGS .*\) -Os/\1/' \
	-e 's/^[[:space:]]*CFLAGS .*/& $(RPM_OPT_FLAGS)/' \
	-e 's#/usr/lib\([/ ;]\)#%{_libdir}\1#g' \
	-e 's#/usr/lib$#%{_libdir}#g'

%build
make -C upnp STRIP="echo Not stripping" %{?_smp_mflags}

%install
rm -rf %{buildroot}

## Install libupnp.so and headers
make -C upnp PREFIX=%{buildroot} install

## Install libixml.so and headers
make -C ixml PREFIX=%{buildroot} install
install -p ixml/inc/ixml.h %{buildroot}%{_includedir}/upnp

## Install libthreadutil.so and headers
make -C threadutil PREFIX=%{buildroot} install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc LICENSE README
%{_libdir}/libixml.so*
%{_libdir}/libthreadutil.so*
%{_libdir}/libupnp.so*

%files devel
%defattr(0644,root,root,0755)
%{_includedir}/upnp/

%clean
rm -rf %{buildroot}

%changelog
* Mon Jan  9 2006 Eric Tanguy 1.2.1a-4
- Include libupnp.so symlink in package to take care of non versioning of libupnp.so.1.2.1

* Sun Jan  8 2006 Paul Howarth 1.2.1a-3
- Disable stripping of object code for sane debuginfo generation
- Edit makefiles to hnnor RPM optflags
- Install libraries in %%{_libdir} rather than hardcoded /usr/lib
- Fix libupnp.so symlink
- Own directory %%{_includedir}/upnp
- Fix permissions in -devel package

* Fri Jan 06 2006 Eric Tanguy 1.2.1a-2
- Use 'install -p' to preserve timestamps
- Devel now require full version-release of main package

* Thu Dec 22 2005 Eric Tanguy 1.2.1a-1
- Modify spec file from 
http://rpm.pbone.net/index.php3/stat/4/idpl/2378737/com/libupnp-1.2.1a_DSM320-3.i386.rpm.html

libupnp_dsm_320.patch:

--- NEW FILE libupnp_dsm_320.patch ---
diff -Naur ../libupnp-1.2.1a/upnp/inc/config.h upnp/inc/config.h
--- ../libupnp-1.2.1a/upnp/inc/config.h	2003-02-13 17:19:02.000000000 +0100
+++ upnp/inc/config.h	2005-11-05 20:42:25.000000000 +0100
@@ -56,6 +56,17 @@
 #define THREAD_IDLE_TIME 5000
 //@}
 
+/** @name X_USER_AGENT
+ *  The {\tt X_USER_AGENT} constant specifies the value of the X-User-Agent:
+ *  HTTP header. The value "redsonic" is needed for the DSM-320. See
+ *  https://sourceforge.net/forum/message.php?msg_id=3166856 for more
+ * information
+ */
+
+//@{
+#define X_USER_AGENT "redsonic"
+//@}
+
 /** @name JOBS_PER_THREAD
  *  The {\tt JOBS_PER_THREAD} constant determines when a new thread will be
  *  allocated to the thread pool inside the  SDK. The thread pool will
diff -Naur ../libupnp-1.2.1a/upnp/src/gena/gena_device.c upnp/src/gena/gena_device.c
--- ../libupnp-1.2.1a/upnp/src/gena/gena_device.c	2003-02-13 17:19:11.000000000 +0100
+++ upnp/src/gena/gena_device.c	2005-11-05 20:18:42.000000000 +0100
@@ -1164,10 +1164,16 @@
 
     membuffer_init( &response );
     response.size_inc = 30;
+/* - PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+ * added X-User-Agent header
+ */
     if( http_MakeMessage( &response, major, minor,
-                          "R" "D" "S" "ssc" "sc" "c",
+                          "R" "D" "S" "Xc" "ssc" "sc" "c",
                           HTTP_OK,
-                          "SID: ", sub->sid, timeout_str ) != 0 ) {
+                          X_USER_AGENT,
+                          "SID: ", sub->sid, timeout_str ) != 0 ) 
+/* - PATCH END --- */        
+    {
         membuffer_destroy( &response );
         error_respond( info, HTTP_INTERNAL_SERVER_ERROR, request );
         return UPNP_E_OUTOF_MEMORY;
diff -Naur ../libupnp-1.2.1a/upnp/src/genlib/net/http/httpreadwrite.c upnp/src/genlib/net/http/httpreadwrite.c
--- ../libupnp-1.2.1a/upnp/src/genlib/net/http/httpreadwrite.c	2003-02-13 17:19:13.000000000 +0100
+++ upnp/src/genlib/net/http/httpreadwrite.c	2005-11-05 20:04:51.000000000 +0100
@@ -1632,6 +1632,9 @@
 *				appends content-length, content-type and HTML body for given code
 *		'T':	arg = char * content_type; format e.g: "text/html";	
 *				 content-type header
+* --- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+*       'X':    arg = const char useragent; "redsonic" HTTP X-User-Agent: useragent
+* --- PATCH END ---
 *
 *	Return : int;
 *		0 - On Success
@@ -1800,6 +1803,24 @@
             }
         }
 
+/* --- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
+        if( c == 'X' )          // C string
+        {
+            s = ( char * )va_arg( argp, char * );
+
+            assert( s );
+
+            if( membuffer_append_str( buf, "X-User-Agent: ") != 0 ) {
+                goto error_handler;
+            }
+            if( membuffer_append( buf, s, strlen( s ) ) != 0 ) {
+                goto error_handler;
+            }
+        }
+        
+/* --- PATCH END --- */
+    
+
         else if( c == 'R' ) {
             // response start line
             //   e.g.: 'HTTP/1.1 200 OK'
diff -Naur ../libupnp-1.2.1a/upnp/src/genlib/net/http/webserver.c upnp/src/genlib/net/http/webserver.c
--- ../libupnp-1.2.1a/upnp/src/genlib/net/http/webserver.c	2003-02-13 17:19:14.000000000 +0100
+++ upnp/src/genlib/net/http/webserver.c	2005-11-05 20:53:56.000000000 +0100
@@ -1368,16 +1368,22 @@
     }
 
     if( RespInstr->IsRangeActive && RespInstr->IsChunkActive ) {
+
+/* - PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+ * added X-User-Agent header
+ */
+        
         //Content-Range: bytes 222-3333/4000  HTTP_PARTIAL_CONTENT
         //Transfer-Encoding: chunked
         // K means add chunky header ang G means range header.
-        if( http_MakeMessage( headers, resp_major, resp_minor, "RTGKDstcSCc", HTTP_PARTIAL_CONTENT, // status code
+        if( http_MakeMessage( headers, resp_major, resp_minor, "RTGKDstcSXcCc", HTTP_PARTIAL_CONTENT, // status code
                               // RespInstr->ReadSendSize,// content length
                               finfo.content_type,
                               //     content_type.buf,            // content type
                               RespInstr,    // Range
                               "LAST-MODIFIED: ",
-                              &finfo.last_modified ) != 0 ) {
+                              &finfo.last_modified,
+                              X_USER_AGENT) != 0 ) {
             goto error_handler;
         }
     } else if( RespInstr->IsRangeActive && !RespInstr->IsChunkActive ) {
@@ -1385,13 +1391,14 @@
         //Content-Range: bytes 222-3333/4000  HTTP_PARTIAL_CONTENT
         //Transfer-Encoding: chunked
         // K means add chunky header ang G means range header.
-        if( http_MakeMessage( headers, resp_major, resp_minor, "RNTGDstcSCc", HTTP_PARTIAL_CONTENT, // status code
+        if( http_MakeMessage( headers, resp_major, resp_minor, "RNTGDstcSXcCc", HTTP_PARTIAL_CONTENT, // status code
                               RespInstr->ReadSendSize,  // content length
                               finfo.content_type,
                               //content_type.buf,            // content type
                               RespInstr,    //Range Info
                               "LAST-MODIFIED: ",
-                              &finfo.last_modified ) != 0 ) {
+                              &finfo.last_modified,
+                              X_USER_AGENT) != 0 ) {
             goto error_handler;
         }
 
@@ -1400,12 +1407,13 @@
         //Content-Range: bytes 222-3333/4000  HTTP_PARTIAL_CONTENT
         //Transfer-Encoding: chunked
         // K means add chunky header ang G means range header.
-        if( http_MakeMessage( headers, resp_major, resp_minor, "RKTDstcSCc", HTTP_OK,   // status code
+        if( http_MakeMessage( headers, resp_major, resp_minor, "RKTDstcSXcCc", HTTP_OK,   // status code
                               //RespInstr->ReadSendSize,// content length
                               finfo.content_type,
                               // content_type.buf,            // content type
                               "LAST-MODIFIED: ",
-                              &finfo.last_modified ) != 0 ) {
+                              &finfo.last_modified,
+                              X_USER_AGENT) != 0 ) {
             goto error_handler;
         }
 
@@ -1414,28 +1422,31 @@
             //Content-Range: bytes 222-3333/4000  HTTP_PARTIAL_CONTENT
             //Transfer-Encoding: chunked
             // K means add chunky header ang G means range header.
-            if( http_MakeMessage( headers, resp_major, resp_minor, "RNTDstcSCc", HTTP_OK,   // status code
+            if( http_MakeMessage( headers, resp_major, resp_minor, "RNTDstcSXcCc", HTTP_OK,   // status code
                                   RespInstr->ReadSendSize,  // content length
                                   finfo.content_type,
                                   //content_type.buf,          // content type
                                   "LAST-MODIFIED: ",
-                                  &finfo.last_modified ) != 0 ) {
+                                  &finfo.last_modified,
+                                  X_USER_AGENT) != 0 ) {
                 goto error_handler;
             }
         } else {
             //Content-Range: bytes 222-3333/4000  HTTP_PARTIAL_CONTENT
             //Transfer-Encoding: chunked
             // K means add chunky header ang G means range header.
-            if( http_MakeMessage( headers, resp_major, resp_minor, "RTDstcSCc", HTTP_OK,    // status code
+            if( http_MakeMessage( headers, resp_major, resp_minor, "RTDstcSXcCc", HTTP_OK,    // status code
                                   //RespInstr->ReadSendSize,// content length
                                   finfo.content_type,
                                   //content_type.buf,          // content type
                                   "LAST-MODIFIED: ",
-                                  &finfo.last_modified ) != 0 ) {
+                                  &finfo.last_modified,
+                                  X_USER_AGENT) != 0 ) {
                 goto error_handler;
             }
         }
     }
+/* -- PATCH END -- */
 
     if( req->method == HTTPMETHOD_HEAD ) {
         *rtype = RESP_HEADERS;
@@ -1717,8 +1728,14 @@
                     http_RecvPostMessage( parser, info, filename.buf,
                                           &RespInstr );
                 //Send response.
-                http_MakeMessage( &headers, 1, 1, "RTDSCc", ret,
-                                  "text/html" );
+
+/* - PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+ * added X-User-Agent header
+ */
+                http_MakeMessage( &headers, 1, 1, "RTDSXcCc", ret,
+                                  "text/html", X_USER_AGENT );
+/* - PATCH END --- */
+
                 http_SendMessage( info, &timeout, "b", headers.buf,
                                   headers.length );
                 break;
diff -Naur ../libupnp-1.2.1a/upnp/src/soap/soap_device.c upnp/src/soap/soap_device.c
--- ../libupnp-1.2.1a/upnp/src/soap/soap_device.c	2003-02-13 17:19:20.000000000 +0100
+++ upnp/src/soap/soap_device.c	2005-11-05 20:44:41.000000000 +0100
@@ -221,17 +221,20 @@
 
     // make headers
     membuffer_init( &headers );
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */    
     if( http_MakeMessage( &headers, major, minor,
-                          "RNsDsSc" "sssss",
+                          "RNsDsSXc" "sssss",
                           500,
                           content_length,
                           ContentTypeHeader,
                           "EXT:\r\n",
+                          X_USER_AGENT,
                           start_body, err_code_str, mid_body, err_msg,
                           end_body ) != 0 ) {
         membuffer_destroy( &headers );
         return;                 // out of mem
     }
+/*-- PATCH END - */
     // send err msg
     http_SendMessage( info, &timeout_secs, "b",
                       headers.buf, headers.length );
@@ -285,16 +288,21 @@
 
     // make headers
     membuffer_init( &response );
+    
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
     if( http_MakeMessage( &response, major, minor,
-                          "RNsDsSc" "sss",
+                          "RNsDsSXcc" "sss",
                           HTTP_OK,
                           content_length,
                           ContentTypeHeader,
                           "EXT:\r\n",
+                          X_USER_AGENT,
                           start_body, var_value, end_body ) != 0 ) {
         membuffer_destroy( &response );
         return;                 // out of mem
     }
+/* -- PATCH END - */
+    
     // send msg
     http_SendMessage( info, &timeout_secs, "b",
                       response.buf, response.length );
@@ -704,11 +712,14 @@
         strlen( end_body );
 
     // make headers
-    if( http_MakeMessage( &headers, major, minor, "RNsDsSc", HTTP_OK,   // status code
-                          content_length, ContentTypeHeader, "EXT:\r\n" // EXT header
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */    
+    if( http_MakeMessage( &headers, major, minor, "RNsDsSXcc", HTTP_OK,   // status code
+                          content_length, ContentTypeHeader, "EXT:\r\n", X_USER_AGENT // EXT header
          ) != 0 ) {
         goto error_handler;
     }
+/* -- PATCH END - */
+
     // send whole msg
     ret_code = http_SendMessage( info, &timeout_secs, "bbbb",
                                  headers.buf, headers.length,
diff -Naur ../libupnp-1.2.1a/upnp/src/ssdp/ssdp_device.c upnp/src/ssdp/ssdp_device.c
--- ../libupnp-1.2.1a/upnp/src/ssdp/ssdp_device.c	2003-02-13 17:19:21.000000000 +0100
+++ upnp/src/ssdp/ssdp_device.c	2005-11-05 21:04:52.000000000 +0100
@@ -290,12 +290,16 @@
     *packet = NULL;
 
     if( msg_type == MSGTYPE_REPLY ) {
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
         ret_code = http_MakeMessage( &buf, 1, 1,
-                                     "R" "sdc" "D" "s" "ssc" "S" "ssc"
+                                     "R" "sdc" "D" "s" "ssc" "S" "Xc" "ssc"
                                      "ssc" "c", HTTP_OK,
                                      "CACHE-CONTROL: max-age=", duration,
                                      "EXT:\r\n", "LOCATION: ", location,
+                                     X_USER_AGENT,
                                      "ST: ", nt, "USN: ", usn );
+/* -- PATCH END - */
+        
         if( ret_code != 0 ) {
             return;
         }
@@ -310,14 +314,16 @@
 
         // NOTE: The CACHE-CONTROL and LOCATION headers are not present in
         //  a shutdown msg, but are present here for MS WinMe interop.
-
+        
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
         ret_code = http_MakeMessage( &buf, 1, 1,
                                      "Q" "sssdc" "sdc" "ssc" "ssc" "ssc"
-                                     "S" "ssc" "c", HTTPMETHOD_NOTIFY, "*",
+                                     "S" "Xc" "ssc" "c", HTTPMETHOD_NOTIFY, "*",
                                      1, "HOST: ", SSDP_IP, ":", SSDP_PORT,
                                      "CACHE-CONTROL: max-age=", duration,
                                      "LOCATION: ", location, "NT: ", nt,
-                                     "NTS: ", nts, "USN: ", usn );
+                                     "NTS: ", nts, X_USER_AGENT, "USN: ", usn );
+/* -- PATCH END - */        
         if( ret_code != 0 ) {
             return;
         }

libupnp_ixml_FC4.patch:

--- NEW FILE libupnp_ixml_FC4.patch ---
--- ../libupnp-1.2.1a/ixml/src/element.c	2003-02-13 17:18:51.000000000 +0100
+++ ixml/src/element.c	2005-11-05 20:47:25.000000000 +0100
@@ -454,9 +454,12 @@
             element->n.firstAttr = nextSib;
         }
 
-        ( IXML_Attr * ) attrNode->parentNode = NULL;
-        ( IXML_Attr * ) attrNode->prevSibling = NULL;
-        ( IXML_Attr * ) attrNode->nextSibling = NULL;
+        // removed the casts, else it did not compile on FC4
+        // Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+        attrNode->parentNode = NULL;
+        attrNode->prevSibling = NULL;
+        attrNode->nextSibling = NULL;
+        
         *rtAttr = ( IXML_Attr * ) attrNode;
         return IXML_SUCCESS;
 

libupnp_performance.patch:

--- NEW FILE libupnp_performance.patch ---
--- libupnp-1.2.1a/upnp/inc/config.h	2003-02-13 17:19:02.000000000 +0100
+++ libupnp-1.2.1a/upnp/inc/config.h	2005-03-08 21:26:25.000000000 +0100
@@ -65,7 +65,7 @@
  */
 
 //@{
-#define JOBS_PER_THREAD 10
+#define JOBS_PER_THREAD 1
 //@}
 
 /** @name MIN_THREADS
@@ -78,7 +78,7 @@
  */
 
 //@{
-#define MIN_THREADS 2 
+#define MIN_THREADS 4 
 //@}
 
 /** @name MAX_THREADS


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/libupnp/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	20 Jan 2006 08:38:46 -0000	1.1
+++ .cvsignore	20 Jan 2006 08:40:11 -0000	1.2
@@ -0,0 +1 @@
+libupnp-1.2.1a.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/libupnp/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	20 Jan 2006 08:38:46 -0000	1.1
+++ sources	20 Jan 2006 08:40:11 -0000	1.2
@@ -0,0 +1 @@
+e72b3550bf064eedf080f16f09688891  libupnp-1.2.1a.tar.gz




More information about the fedora-extras-commits mailing list