Dirk Mueller
2888ef8f38
- add expat-2.1.1-avoid_relying_on_undef_behaviour.patch to avoid relying on undefined behavior in CVE-2015-1283 fix [bnc#980391], [CVE-2015-1283] - add expat-2.1.1-parser_crashes_on_malformed_input.patch to fix Expat XML parser that mishandles certain kinds of malformed input documents [bnc#979441], [CVE-2016-0718] - use spec-cleaner to clean specfile OBS-URL: https://build.opensuse.org/request/show/396618 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/expat?expand=0&rev=47
117 lines
3.5 KiB
RPMSpec
117 lines
3.5 KiB
RPMSpec
#
|
||
# spec file for package expat
|
||
#
|
||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||
#
|
||
# All modifications and additions to the file contributed by third parties
|
||
# remain the property of their copyright owners, unless otherwise agreed
|
||
# upon. The license for this file, and modifications and additions to the
|
||
# file, is the same license as for the pristine package itself (unless the
|
||
# license for the pristine package is not an Open Source License, in which
|
||
# case the license is the MIT License). An "Open Source License" is a
|
||
# license that conforms to the Open Source Definition (Version 1.9)
|
||
# published by the Open Source Initiative.
|
||
|
||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
#
|
||
|
||
|
||
Name: expat
|
||
Version: 2.1.1
|
||
Release: 0
|
||
Summary: XML Parser Toolkit
|
||
License: MIT
|
||
Group: Development/Libraries/C and C++
|
||
Url: http://expat.sourceforge.net/
|
||
Source0: http://downloads.sourceforge.net/project/expat/expat/%{version}/expat-%{version}.tar.bz2
|
||
Source1: %{name}faq.html
|
||
Source2: baselibs.conf
|
||
Patch1: expat-visibility.patch
|
||
Patch2: expat-alloc-size.patch
|
||
# PATCH-FIX-UPSTREAM bnc#980391 CVE-2015-1283 kstreitova@suse.com -- Avoid relying on undefined behavior in CVE-2015-1283 fix
|
||
Patch3: expat-2.1.1-avoid_relying_on_undef_behaviour.patch
|
||
# PATCH-FIX-UPSTREAM bnc#979441 CVE-2016-0718 kstreitova@suse.com -- XML parser crashes on malformed input
|
||
Patch4: expat-2.1.1-parser_crashes_on_malformed_input.patch
|
||
BuildRequires: autoconf >= 2.58
|
||
BuildRequires: automake
|
||
BuildRequires: gcc-c++
|
||
BuildRequires: libtool
|
||
BuildRequires: pkg-config
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
||
%description
|
||
Expat is an XML parser library written in C. It is a stream-oriented
|
||
parser in which an application registers handlers for things the
|
||
parser might find in the XML document (like start tags).
|
||
|
||
%package -n libexpat1
|
||
Summary: XML Parser Toolkit
|
||
Group: Development/Libraries/C and C++
|
||
|
||
%description -n libexpat1
|
||
Expat is an XML parser library written in C. It is a stream-oriented
|
||
parser in which an application registers handlers for things the
|
||
parser might find in the XML document (like start tags).
|
||
|
||
%package -n libexpat-devel
|
||
Summary: XML Parser Toolkit
|
||
Group: Development/Libraries/C and C++
|
||
Requires: glibc-devel
|
||
Requires: libexpat1 = %{version}
|
||
|
||
%description -n libexpat-devel
|
||
Expat is an XML parser library written in C. It is a stream-oriented
|
||
parser in which an application registers handlers for things the
|
||
parser might find in the XML document (like start tags).
|
||
|
||
This package contains the development headers for the library found
|
||
in libexpat.
|
||
|
||
%prep
|
||
%setup -q
|
||
%patch1 -p1
|
||
%patch2 -p1
|
||
%patch3 -p1
|
||
%patch4 -p1
|
||
|
||
cp %{SOURCE1} .
|
||
rm -f examples/*.dsp
|
||
|
||
%build
|
||
export CFLAGS="%{optflags} -fvisibility=hidden"
|
||
%configure --disable-static \
|
||
--with-pic
|
||
make %{?_smp_mflags}
|
||
|
||
%install
|
||
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
||
rm doc/xmlwf.1
|
||
|
||
# remove .la file
|
||
rm -f %{buildroot}%{_libdir}/libexpat.la
|
||
|
||
%check
|
||
make %{?_smp_mflags} check
|
||
|
||
%post -n libexpat1 -p /sbin/ldconfig
|
||
%postun -n libexpat1 -p /sbin/ldconfig
|
||
|
||
%files
|
||
%defattr(-, root, root)
|
||
%doc COPYING Changes README examples expatfaq.html
|
||
%doc doc/expat.png doc/reference.html doc/style.css doc/valid-xhtml10.png
|
||
%{_mandir}/man?/*
|
||
%{_bindir}/xmlwf
|
||
|
||
%files -n libexpat1
|
||
%defattr(-, root, root)
|
||
%{_libdir}/libexpat.so.*
|
||
|
||
%files -n libexpat-devel
|
||
%defattr(-, root, root)
|
||
%{_includedir}/*
|
||
%{_libdir}/libexpat.so
|
||
%{_libdir}/pkgconfig/expat.pc
|
||
|
||
%changelog
|