From 655205d52a785bf10f10f3ab3ccd748630684095 Mon Sep 17 00:00:00 2001 From: jorton Date: Jul 03 2007 10:16:20 +0000 Subject: - add fix for attribute namespace handling in apr_xml (PR 41908) --- diff --git a/apr-util-1.2.8-xmlns.patch b/apr-util-1.2.8-xmlns.patch new file mode 100644 index 0000000..f7b1757 --- /dev/null +++ b/apr-util-1.2.8-xmlns.patch @@ -0,0 +1,37 @@ + +Author: jorton +Date: Mon Mar 26 14:19:44 2007 +New Revision: 522630 + +URL: http://svn.apache.org/viewvc?view=rev&rev=522630 +Log: +* xml/apr_xml.c (elem_size, write_elem): Fix attribute namespace +handling; where applicable, use the mapped namespace index. + +PR: 41908 + +--- apr-util-1.2.8/xml/apr_xml.c.xmlns ++++ apr-util-1.2.8/xml/apr_xml.c +@@ -666,7 +666,8 @@ + } + else { + /* compute size of: ' ns%d:%s="%s"' */ +- size += 3 + APR_XML_NS_LEN(attr->ns) + 1 + strlen(attr->name) + 2 + strlen(attr->value) + 1; ++ int ns = ns_map ? ns_map[attr->ns] : attr->ns; ++ size += 3 + APR_XML_NS_LEN(ns) + 1 + strlen(attr->name) + 2 + strlen(attr->value) + 1; + } + } + +@@ -736,8 +737,10 @@ + for (attr = elem->attr; attr; attr = attr->next) { + if (attr->ns == APR_XML_NS_NONE) + len = sprintf(s, " %s=\"%s\"", attr->name, attr->value); +- else +- len = sprintf(s, " ns%d:%s=\"%s\"", attr->ns, attr->name, attr->value); ++ else { ++ ns = ns_map ? ns_map[attr->ns] : attr->ns; ++ len = sprintf(s, " ns%d:%s=\"%s\"", ns, attr->name, attr->value); ++ } + s += len; + } + diff --git a/apr-util.spec b/apr-util.spec index 3e1e3d2..d1fa2b3 100644 --- a/apr-util.spec +++ b/apr-util.spec @@ -4,7 +4,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util Version: 1.2.8 -Release: 7 +Release: 8 License: Apache Software License 2.0 Group: System Environment/Libraries URL: http://apr.apache.org/ @@ -13,6 +13,7 @@ Source1: http://apache.webthing.com/svn/apache/apr/apr_dbd_mysql.c Patch0: apr-util-1.2.2-exports.patch Patch2: apr-util-1.2.7-pkgconf.patch Patch3: apr-util-1.2.8-dbddso.patch +Patch4: apr-util-1.2.8-xmlns.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: autoconf, apr-devel >= 1.2.0 BuildRequires: openldap-devel, db4-devel, expat-devel @@ -61,6 +62,7 @@ This package provides the MySQL driver for the apr-util DBD %patch0 -p1 -b .exports %patch2 -p1 -b .pkgconf %patch3 -p1 -b .dbddso +%patch4 -p1 -b .xmlns cp $RPM_SOURCE_DIR/apr_dbd_mysql.c dbd %build @@ -136,6 +138,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/*.pc %changelog +* Tue Jul 3 2007 Joe Orton 1.2.8-8 +- add fix for attribute namespace handling in apr_xml (PR 41908) + * Thu Apr 5 2007 Joe Orton 1.2.8-7 - remove old Conflicts, doxygen BR (#225254)