forked from pool/libxml2
Accepting request 124738 from home:computersalat:devel:libs
update to 2.8.0 OBS-URL: https://build.opensuse.org/request/show/124738 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxml2?expand=0&rev=65
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
--- xzlib.c.xx 2012-03-01 17:23:54.000000000 +0000
|
||||
+++ xzlib.c 2012-03-01 17:24:48.000000000 +0000
|
||||
@@ -228,9 +228,14 @@
|
||||
if (state->err != LZMA_OK)
|
||||
return -1;
|
||||
if (state->eof == 0) {
|
||||
+ /* avail_in is size_t, which is not necessary sizeof(unsigned) */
|
||||
+ unsigned tmp = strm->avail_in;
|
||||
if (xz_load(state, state->in, state->size,
|
||||
- (unsigned *) &(strm->avail_in)) == -1)
|
||||
+ &tmp) == -1) {
|
||||
+ strm->avail_in = tmp;
|
||||
return -1;
|
||||
+ }
|
||||
+ strm->avail_in = tmp;
|
||||
strm->next_in = state->in;
|
||||
}
|
||||
return 0;
|
||||
201
fix-perl.diff
201
fix-perl.diff
@@ -9,141 +9,128 @@ Date: Thu Jan 26 19:11:02 2012 +0800
|
||||
Also fix 3 cases in the regression tests where the prefix: was
|
||||
erroneously dropped in such case
|
||||
|
||||
diff --git a/SAX2.c b/SAX2.c
|
||||
index c0482c0..0c48d65 100644
|
||||
--- a/SAX2.c
|
||||
+++ b/SAX2.c
|
||||
@@ -2163,6 +2163,7 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
Index: SAX2.c
|
||||
===================================================================
|
||||
--- SAX2.c.orig
|
||||
+++ SAX2.c
|
||||
@@ -2162,7 +2162,6 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
xmlNodePtr parent;
|
||||
xmlNsPtr last = NULL, ns;
|
||||
const xmlChar *uri, *pref;
|
||||
+ xmlChar *lname = NULL;
|
||||
- xmlChar *lname = NULL;
|
||||
int i, j;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
@@ -2182,6 +2183,20 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
@@ -2182,20 +2181,6 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Take care of the rare case of an undefined namespace prefix
|
||||
+ */
|
||||
+ if ((prefix != NULL) && (URI == NULL)) {
|
||||
+ if (ctxt->dictNames) {
|
||||
+ const xmlChar *fullname;
|
||||
+
|
||||
+ fullname = xmlDictQLookup(ctxt->dict, prefix, localname);
|
||||
+ if (fullname != NULL)
|
||||
+ localname = fullname;
|
||||
+ } else {
|
||||
+ lname = xmlBuildQName(localname, prefix, NULL, 0);
|
||||
+ }
|
||||
+ }
|
||||
+ /*
|
||||
- * Take care of the rare case of an undefined namespace prefix
|
||||
- */
|
||||
- if ((prefix != NULL) && (URI == NULL)) {
|
||||
- if (ctxt->dictNames) {
|
||||
- const xmlChar *fullname;
|
||||
-
|
||||
- fullname = xmlDictQLookup(ctxt->dict, prefix, localname);
|
||||
- if (fullname != NULL)
|
||||
- localname = fullname;
|
||||
- } else {
|
||||
- lname = xmlBuildQName(localname, prefix, NULL, 0);
|
||||
- }
|
||||
- }
|
||||
- /*
|
||||
* allocate the node
|
||||
*/
|
||||
if (ctxt->freeElems != NULL) {
|
||||
@@ -2194,7 +2209,10 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
@@ -2208,10 +2193,7 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
if (ctxt->dictNames)
|
||||
ret->name = localname;
|
||||
else {
|
||||
- ret->name = xmlStrdup(localname);
|
||||
+ if (lname == NULL)
|
||||
+ ret->name = xmlStrdup(localname);
|
||||
+ else
|
||||
+ ret->name = lname;
|
||||
- if (lname == NULL)
|
||||
- ret->name = xmlStrdup(localname);
|
||||
- else
|
||||
- ret->name = lname;
|
||||
+ ret->name = xmlStrdup(localname);
|
||||
if (ret->name == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||
return;
|
||||
@@ -2206,8 +2224,11 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
@@ -2223,11 +2205,8 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
if (ctxt->dictNames)
|
||||
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
|
||||
(xmlChar *) localname, NULL);
|
||||
- else
|
||||
+ else if (lname == NULL)
|
||||
ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL);
|
||||
+ else
|
||||
+ ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
|
||||
+ (xmlChar *) lname, NULL);
|
||||
- else if (lname == NULL)
|
||||
- ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL);
|
||||
else
|
||||
- ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
|
||||
- (xmlChar *) lname, NULL);
|
||||
+ ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL);
|
||||
if (ret == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||
return;
|
||||
diff --git a/result/namespaces/err_7.xml b/result/namespaces/err_7.xml
|
||||
index f4e5164..4b4c662 100644
|
||||
--- a/result/namespaces/err_7.xml
|
||||
+++ b/result/namespaces/err_7.xml
|
||||
@@ -1,2 +1,2 @@
|
||||
<?xml version="1.0"?>
|
||||
-<foo/>
|
||||
+<f:foo/>
|
||||
diff --git a/result/xmlid/id_tst2.xml b/result/xmlid/id_tst2.xml
|
||||
index 33ee896..856a320 100644
|
||||
--- a/result/xmlid/id_tst2.xml
|
||||
+++ b/result/xmlid/id_tst2.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
-1 ELEMENT foo
|
||||
+1 ELEMENT n:foo
|
||||
ATTRIBUTE id
|
||||
TEXT
|
||||
content=bar
|
||||
diff --git a/result/xmlid/id_tst3.xml b/result/xmlid/id_tst3.xml
|
||||
index e2f8228..6d8865c 100644
|
||||
--- a/result/xmlid/id_tst3.xml
|
||||
+++ b/result/xmlid/id_tst3.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
-1 ELEMENT o:o
|
||||
+1 ELEMENT f:o:o
|
||||
ATTRIBUTE id
|
||||
TEXT
|
||||
content=bar
|
||||
commit 1c989278d9650daafc79e55750bec5a5a224a553
|
||||
Author: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Thu Jan 26 19:43:06 2012 +0800
|
||||
|
||||
Fix SAX2 builder in case of undefined attributes namespace
|
||||
|
||||
To follow the early XML-1.0 REC, the new localname is "prefix:localname"
|
||||
and there is obviously now namespace.
|
||||
|
||||
diff --git a/SAX2.c b/SAX2.c
|
||||
index 0c48d65..e230cea 100644
|
||||
--- a/SAX2.c
|
||||
+++ b/SAX2.c
|
||||
@@ -2335,8 +2335,33 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
@@ -2334,33 +2313,8 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
*/
|
||||
if (nb_attributes > 0) {
|
||||
for (j = 0,i = 0;i < nb_attributes;i++,j+=5) {
|
||||
+ /*
|
||||
+ * Handle the rare case of an undefined atribute prefix
|
||||
+ */
|
||||
+ if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) {
|
||||
+ if (ctxt->dictNames) {
|
||||
+ const xmlChar *fullname;
|
||||
+
|
||||
+ fullname = xmlDictQLookup(ctxt->dict, attributes[j+1],
|
||||
+ attributes[j]);
|
||||
+ if (fullname != NULL) {
|
||||
+ xmlSAX2AttributeNs(ctxt, fullname, NULL,
|
||||
+ attributes[j+3], attributes[j+4]);
|
||||
+ continue;
|
||||
+ }
|
||||
+ } else {
|
||||
+ lname = xmlBuildQName(attributes[j], attributes[j+1],
|
||||
+ NULL, 0);
|
||||
+ if (lname != NULL) {
|
||||
+ xmlSAX2AttributeNs(ctxt, lname, NULL,
|
||||
+ attributes[j+3], attributes[j+4]);
|
||||
+ xmlFree(lname);
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
- /*
|
||||
- * Handle the rare case of an undefined atribute prefix
|
||||
- */
|
||||
- if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) {
|
||||
- if (ctxt->dictNames) {
|
||||
- const xmlChar *fullname;
|
||||
-
|
||||
- fullname = xmlDictQLookup(ctxt->dict, attributes[j+1],
|
||||
- attributes[j]);
|
||||
- if (fullname != NULL) {
|
||||
- xmlSAX2AttributeNs(ctxt, fullname, NULL,
|
||||
- attributes[j+3], attributes[j+4]);
|
||||
- continue;
|
||||
- }
|
||||
- } else {
|
||||
- lname = xmlBuildQName(attributes[j], attributes[j+1],
|
||||
- NULL, 0);
|
||||
- if (lname != NULL) {
|
||||
- xmlSAX2AttributeNs(ctxt, lname, NULL,
|
||||
- attributes[j+3], attributes[j+4]);
|
||||
- xmlFree(lname);
|
||||
- continue;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1],
|
||||
- attributes[j+3], attributes[j+4]);
|
||||
+ attributes[j+3], attributes[j+4]);
|
||||
- attributes[j+3], attributes[j+4]);
|
||||
+ attributes[j+3], attributes[j+4]);
|
||||
}
|
||||
}
|
||||
|
||||
Index: result/namespaces/err_7.xml
|
||||
===================================================================
|
||||
--- result/namespaces/err_7.xml.orig
|
||||
+++ result/namespaces/err_7.xml
|
||||
@@ -1,2 +1,2 @@
|
||||
<?xml version="1.0"?>
|
||||
-<f:foo/>
|
||||
+<foo/>
|
||||
Index: result/xmlid/id_tst2.xml
|
||||
===================================================================
|
||||
--- result/xmlid/id_tst2.xml.orig
|
||||
+++ result/xmlid/id_tst2.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
-1 ELEMENT n:foo
|
||||
+1 ELEMENT foo
|
||||
ATTRIBUTE id
|
||||
TEXT
|
||||
content=bar
|
||||
Index: result/xmlid/id_tst3.xml
|
||||
===================================================================
|
||||
--- result/xmlid/id_tst3.xml.orig
|
||||
+++ result/xmlid/id_tst3.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
-1 ELEMENT f:o:o
|
||||
+1 ELEMENT o:o
|
||||
ATTRIBUTE id
|
||||
TEXT
|
||||
content=bar
|
||||
|
||||
3
libxml2-2.8.0.tar.gz
Normal file
3
libxml2-2.8.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f2e2d0e322685193d1affec83b21dc05d599e17a7306d7b90de95bb5b9ac622a
|
||||
size 4915203
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f23cb7ebe6f24e2b2948d68f29a64224ec5f65fd565a2fe77dd4f12c6c4a5702
|
||||
size 4889614
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 12 18:10:07 UTC 2012 - chris@computersalat.de
|
||||
|
||||
- update to 2.8.0
|
||||
* please se ChangeLog for more info
|
||||
- remove obsolete bigendian64 patch
|
||||
- rebase fix-perl patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 11 21:00:19 UTC 2012 - jengelh@medozas.de
|
||||
|
||||
|
||||
21
libxml2.spec
21
libxml2.spec
@@ -15,25 +15,25 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define lname libxml2-2
|
||||
|
||||
Name: libxml2
|
||||
Version: 2.7.8+git20120223
|
||||
Version: 2.8.0
|
||||
Release: 0
|
||||
Summary: A Library to Manipulate XML Files
|
||||
License: MIT
|
||||
Group: System/Libraries
|
||||
Url: http://xmlsoft.org
|
||||
# Source ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz changes every day
|
||||
Source: libxml2-git-snapshot.tar.gz
|
||||
Source: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
|
||||
Source2: baselibs.conf
|
||||
Patch0: bigendian64.patch
|
||||
Patch1: fix-perl.diff
|
||||
Patch0: fix-perl.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
The XML C library was initially developed for the GNOME project. It is
|
||||
@@ -74,8 +74,8 @@ progress.
|
||||
%package tools
|
||||
Summary: Tools using libxml
|
||||
Group: System/Libraries
|
||||
Provides: %name = %version-%release
|
||||
Obsoletes: %name < 2.7.8+git20120223
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
Obsoletes: %{name} < %{version}-%{release}
|
||||
|
||||
%description tools
|
||||
This package contains xmllint, a very useful tool proving libxml's power.
|
||||
@@ -83,8 +83,8 @@ This package contains xmllint, a very useful tool proving libxml's power.
|
||||
%package devel
|
||||
Summary: Include Files and Libraries mandatory for Development
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %name-tools = %{version}
|
||||
Requires: %{lname} = %{version}
|
||||
Requires: %{name}-tools = %{version}
|
||||
Requires: glibc-devel
|
||||
Requires: readline-devel
|
||||
Requires: xz-devel
|
||||
@@ -123,9 +123,8 @@ The library also supports RelaxNG. Support for W3C XML Schemas is in
|
||||
progress.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-2.7.8
|
||||
%patch0 -p0
|
||||
%patch1 -p1 -R
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0
|
||||
|
||||
%build
|
||||
%configure --disable-static \
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 12 18:10:07 UTC 2012 - chris@computersalat.de
|
||||
|
||||
- update to 2.8.0
|
||||
* please se ChangeLog for more info
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 25 08:47:58 UTC 2012 - coolo@suse.com
|
||||
|
||||
|
||||
@@ -15,23 +15,24 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: python-libxml2
|
||||
Version: 2.7.8+git20120223
|
||||
Version: 2.8.0
|
||||
Release: 0
|
||||
Summary: Python Bindings for libxml2
|
||||
License: MIT
|
||||
Group: Development/Libraries/Python
|
||||
Url: http://xmlsoft.org
|
||||
Source: libxml2-git-snapshot.tar.gz
|
||||
Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-xml
|
||||
Requires: libxml2-2 = %{version}
|
||||
# Uncomment to save space:
|
||||
#NoSource: 0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Obsoletes: libxml2-python < %{version}
|
||||
Provides: libxml2-python = %{version}
|
||||
Obsoletes: libxml2-python < 2.7.8+git20110223
|
||||
|
||||
%description
|
||||
The libxml2-python package contains a module that permits applications
|
||||
@@ -44,7 +45,7 @@ support that includes parsing and validation even with complex DTDs,
|
||||
either at parse time or later once the document has been modified.
|
||||
|
||||
%prep
|
||||
%setup -q -n libxml2-2.7.8
|
||||
%setup -q -n libxml2-%{version}
|
||||
|
||||
%build
|
||||
# workaround for bnc#310196
|
||||
|
||||
Reference in New Issue
Block a user