SHA256
3
0
forked from pool/expat

Accepting request 108241 from devel:libraries:c_c++

- update to 2.1.0 beta
  * refreshed expat-visibility.patch
  * removed obsolete expat-CVE-2009-3560.patch
  * removed obsolete expat-CVE-2009-2625.patch
  - hash table DOS attack fix
  - accumulated bug fixes and some changes to the build system
  - new conditional feature to make byte offsets for attributes
    and attribute names available

OBS-URL: https://build.opensuse.org/request/show/108241
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/expat?expand=0&rev=30
This commit is contained in:
Stephan Kulow 2012-03-07 19:08:58 +00:00 committed by Git OBS Bridge
commit 40980a7c0a
7 changed files with 66 additions and 82 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5ac9dc3bc284deacf64394cac8c908c5c4ada7eedefaae758d19dec43269f91
size 362355

3
expat-2.1.0-beta.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:756671b162c24022316bbfa00d3aaa2f30b0709f17969e7a87ba79bda09ad136
size 451157

View File

@ -1,15 +0,0 @@
http://expat.cvs.sourceforge.net/viewvc/expat/expat/lib/xmltok_impl.c?r1=1.13&r2=1.15
Index: lib/xmltok_impl.c
===================================================================
--- lib/xmltok_impl.c.orig
+++ lib/xmltok_impl.c
@@ -1744,7 +1744,7 @@ PREFIX(updatePosition)(const ENCODING *e
const char *end,
POSITION *pos)
{
- while (ptr != end) {
+ while (ptr < end) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \

View File

@ -1,16 +0,0 @@
http://expat.cvs.sourceforge.net/viewvc/expat/expat/lib/xmlparse.c?r1=1.164&r2=1.166&view=patch
Index: lib/xmlparse.c
===================================================================
--- lib/xmlparse.c.orig
+++ lib/xmlparse.c
@@ -3703,6 +3703,9 @@ doProlog(XML_Parser parser,
return XML_ERROR_UNCLOSED_TOKEN;
case XML_TOK_PARTIAL_CHAR:
return XML_ERROR_PARTIAL_CHAR;
+ case -XML_TOK_PROLOG_S:
+ tok = -tok;
+ break;
case XML_TOK_NONE:
#ifdef XML_DTD
/* for internal PE NOT referenced between declarations */

View File

@ -1,5 +1,32 @@
--- /dev/null
+++ conftools/visibility.m4
diff -aurN expat-2.1.0.orig/configure.in expat-2.1.0/configure.in
--- expat-2.1.0.orig/configure.in 2012-03-03 18:45:53.000000000 -0500
+++ expat-2.1.0/configure.in 2012-03-05 21:40:43.578897695 -0500
@@ -53,15 +53,19 @@
sinclude(conftools/ac_c_bigendian_cross.m4)
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+sinclude(conftools/visibility.m4)
AC_SUBST(LIBCURRENT)
AC_SUBST(LIBREVISION)
AC_SUBST(LIBAGE)
dnl Checks for programs.
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+gl_VISIBILITY
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_INSTALL
diff -aurN expat-2.1.0.orig/conftools/visibility.m4 expat-2.1.0/conftools/visibility.m4
--- expat-2.1.0.orig/conftools/visibility.m4 1969-12-31 19:00:00.000000000 -0500
+++ expat-2.1.0/conftools/visibility.m4 2012-03-05 21:41:48.625084505 -0500
@@ -0,0 +1,77 @@
+# visibility.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc.
@ -78,58 +105,33 @@
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
--- configure.in.orig
+++ configure.in
@@ -52,17 +52,20 @@ AC_CONFIG_HEADER(expat_config.h)
sinclude(conftools/libtool.m4)
sinclude(conftools/ac_c_bigendian_cross.m4)
-
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+sinclude(conftools/visibility.m4)
AC_SUBST(LIBCURRENT)
AC_SUBST(LIBREVISION)
AC_SUBST(LIBAGE)
dnl Checks for programs.
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
AC_PROG_INSTALL
+gl_VISIBILITY
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
if test "$GCC" = yes ; then
dnl
--- lib/expat_external.h.orig
+++ lib/expat_external.h
diff -aurN expat-2.1.0.orig/lib/expat_external.h expat-2.1.0/lib/expat_external.h
--- expat-2.1.0.orig/lib/expat_external.h 2006-06-02 08:17:36.000000000 -0400
+++ expat-2.1.0/lib/expat_external.h 2012-03-05 21:36:49.429824958 -0500
@@ -65,6 +65,9 @@
#endif
#endif /* not defined XML_STATIC */
+#if HAVE_VISIBILITY
+#if HAVE_VISIBILTY
+#define XMLIMPORT __attribute__ ((visibility ("default")))
+#endif
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
--- Makefile.in.orig
+++ Makefile.in
@@ -110,11 +110,11 @@ CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFI
diff -aurN expat-2.1.0.orig/Makefile.in expat-2.1.0/Makefile.in
--- expat-2.1.0.orig/Makefile.in 2012-03-03 13:35:27.000000000 -0500
+++ expat-2.1.0/Makefile.in 2012-03-05 21:35:09.923068964 -0500
@@ -114,11 +114,12 @@
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
-
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
+CFLAG_VISIBILITY=@CFLAG_VISIBILITY@
### autoconf this?
LTFLAGS = --silent
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
+COMPILE = $(CC) $(CFLAG_VISIBILITY) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
+COMPILE = $(CC) $(CLFAG_VISIBILITY) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Mar 6 03:01:08 UTC 2012 - tabraham@novell.com
- update to 2.1.0 beta
* refreshed expat-visibility.patch
* removed obsolete expat-CVE-2009-3560.patch
* removed obsolete expat-CVE-2009-2625.patch
- hash table DOS attack fix
- accumulated bug fixes and some changes to the build system
- new conditional feature to make byte offsets for attributes
and attribute names available
-------------------------------------------------------------------
Sun Feb 12 14:42:34 UTC 2012 - crrodriguez@opensuse.org

View File

@ -17,7 +17,7 @@
Name: expat
Version: 2.0.1
Version: 2.1.0beta
Release: 0
Url: http://expat.sourceforge.net/
# bug437293
@ -28,16 +28,16 @@ Obsoletes: expat-64bit
Summary: XML Parser Toolkit
License: MIT
Group: Development/Libraries/C and C++
Source0: %{name}-%{version}.tar.bz2
#Source0: %{name}-%{version}.tar.bz2
Source0: expat-2.1.0-beta.tar.bz2
Source1: %{name}faq.html
Source2: baselibs.conf
Patch0: %{name}-CVE-2009-2625.patch
Patch1: %{name}-CVE-2009-3560.patch
Patch2: expat-visibility.patch
Patch3: expat-alloc-size.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
%description
Expat is an XML 1.0 parser written in C. It aims to be fully
@ -97,7 +97,8 @@ declaration).
%package -n libexpat-devel
Summary: XML Parser Toolkit
Group: Development/Libraries/C and C++
Requires: libexpat1 = %{version} glibc-devel
Requires: glibc-devel
Requires: libexpat1 = %{version}
%description -n libexpat-devel
Expat is an XML 1.0 parser written in C. It aims to be fully
@ -123,16 +124,14 @@ internal subset or it is declared as stand-alone in the XML
declaration).
%prep
%setup -q
%patch0
%patch1
%patch2
%setup -q -n expat-2.1.0
%patch2 -p1
%patch3
cp %{S:1} .
rm -f examples/*.dsp
%build
autoreconf
autoreconf -fi
%configure --disable-static --with-pic
make %{?_smp_mflags}
@ -164,5 +163,6 @@ make check
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/libexpat.so
%{_libdir}/pkgconfig/expat.pc
%changelog