| |
@@ -1,186 +1,139 @@
|
| |
- %global with_python3 1
|
| |
-
|
| |
- Summary: Library providing XML and HTML support
|
| |
- Name: libxml2
|
| |
- Version: 2.9.5
|
| |
- Release: 2%{?dist}%{?extra_release}
|
| |
- License: MIT
|
| |
- Group: Development/Libraries
|
| |
- Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
|
| |
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
| |
- BuildRequires: python-devel
|
| |
- %if 0%{?with_python3}
|
| |
- BuildRequires: python3-devel
|
| |
- %endif # with_python3
|
| |
- BuildRequires: zlib-devel
|
| |
- BuildRequires: pkgconfig
|
| |
- BuildRequires: xz-devel
|
| |
- URL: http://xmlsoft.org/
|
| |
- Patch0: libxml2-multilib.patch
|
| |
- Patch1: libxml2-2.9.0-do-not-check-crc.patch
|
| |
+ %bcond_without python3 # enable build python3 subpackage
|
| |
+
|
| |
+ Summary: Library providing XML and HTML support
|
| |
+ Name: libxml2
|
| |
+ Version: 2.9.7
|
| |
+ Release: 1%{?dist}%{?extra_release}
|
| |
+ License: MIT
|
| |
+ URL: http://xmlsoft.org/
|
| |
+ Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
|
| |
+ BuildRequires: python-devel
|
| |
+ %if %{with python3}
|
| |
+ BuildRequires: python3-devel
|
| |
+ %endif
|
| |
+ BuildRequires: pkgconfig
|
| |
+ BuildRequires: xz-devel
|
| |
+ BuildRequires: zlib-devel
|
| |
+ Patch0: %{name}-multilib.patch
|
| |
+ Patch1: %{name}-2.9.0-do-not-check-crc.patch
|
| |
# In python3.6 _PyVerify_fd is no more
|
| |
# http://bugs.python.org/issue23524
|
| |
- Patch2: libxml2-2.9.4-remove-pyverify_fd.patch
|
| |
- # Fix reporting error about undefined XPath variables, bug #1493613,
|
| |
- # Gnome bug #787941, fixed in upstream after 2.9.5
|
| |
- Patch3: libxml2-2.9.5-Report-undefined-XPath-variable-error-message.patch
|
| |
+ Patch2: %{name}-2.9.4-remove-pyverify_fd.patch
|
| |
+ Patch3: %{name}-CVE-2016-9597.patch
|
| |
+ Obsoletes: libxml2-static
|
| |
|
| |
%description
|
| |
- This library allows to manipulate XML files. It includes support
|
| |
- to read, modify and write XML and HTML files. There is DTDs support
|
| |
- this includes parsing and validation even with complex DtDs, either
|
| |
- at parse time or later once the document has been modified. The output
|
| |
- can be a simple SAX stream or and in-memory DOM like representations.
|
| |
- In this case one can use the built-in XPath and XPointer implementation
|
| |
- to select sub nodes or ranges. A flexible Input/Output mechanism is
|
| |
- available, with existing HTTP and FTP modules and combined to an
|
| |
- URI library.
|
| |
+ This library allows to manipulate XML files. It includes support to read,
|
| |
+ modify and write XML and HTML files. There is DTDs support this includes
|
| |
+ parsing and validation even with complex DtDs, either at parse time or
|
| |
+ later once the document has been modified. The output can be a simple SAX
|
| |
+ stream or and in-memory DOM like representations. In this case one can
|
| |
+ use the built-in XPath and XPointer implementation to select sub nodes or
|
| |
+ ranges. A flexible Input/Output mechanism is available, with existing
|
| |
+ HTTP and FTP modules and combined to an URI library.
|
| |
|
| |
%package devel
|
| |
- Summary: Libraries, includes, etc. to develop XML and HTML applications
|
| |
- Group: Development/Libraries
|
| |
- Requires: libxml2 = %{version}-%{release}
|
| |
- Requires: zlib-devel
|
| |
- Requires: xz-devel
|
| |
- Requires: pkgconfig
|
| |
+ Summary: Libraries, includes, etc. to develop XML and HTML applications
|
| |
+ Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
|
| |
%description devel
|
| |
Libraries, include files, etc you can use to develop XML applications.
|
| |
- This library allows to manipulate XML files. It includes support
|
| |
- to read, modify and write XML and HTML files. There is DTDs support
|
| |
- this includes parsing and validation even with complex DtDs, either
|
| |
- at parse time or later once the document has been modified. The output
|
| |
- can be a simple SAX stream or and in-memory DOM like representations.
|
| |
- In this case one can use the built-in XPath and XPointer implementation
|
| |
- to select sub nodes or ranges. A flexible Input/Output mechanism is
|
| |
- available, with existing HTTP and FTP modules and combined to an
|
| |
- URI library.
|
| |
-
|
| |
- %package static
|
| |
- Summary: Static library for libxml2
|
| |
- Group: Development/Libraries
|
| |
- Requires: libxml2 = %{version}-%{release}
|
| |
-
|
| |
- %description static
|
| |
- Static library for libxml2 provided for specific uses or shaving a few
|
| |
- microseconds when parsing, do not link to them for generic purpose packages.
|
| |
+ This library allows to manipulate XML files. It includes support to read,
|
| |
+ modify and write XML and HTML files. There is DTDs support this includes
|
| |
+ parsing and validation even with complex DtDs, either at parse time or
|
| |
+ later once the document has been modified. The output can be a simple SAX
|
| |
+ stream or and in-memory DOM like representations. In this case one can
|
| |
+ use the built-in XPath and XPointer implementation to select sub nodes or
|
| |
+ ranges. A flexible Input/Output mechanism is available, with existing
|
| |
+ HTTP and FTP modules and combined to an URI library.
|
| |
|
| |
%package -n python2-%{name}
|
| |
%{?python_provide:%python_provide python2-%{name}}
|
| |
- Summary: Python bindings for the libxml2 library
|
| |
- Group: Development/Libraries
|
| |
- Requires: libxml2 = %{version}-%{release}
|
| |
- Obsoletes: %{name}-python < %{version}-%{release}
|
| |
- Provides: %{name}-python = %{version}-%{release}
|
| |
+ Summary: Python bindings for the libxml2 library
|
| |
+ Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
+ Obsoletes: %{name}-python < %{version}-%{release}
|
| |
+ Provides: %{name}-python = %{version}-%{release}
|
| |
|
| |
%description -n python2-%{name}
|
| |
- The libxml2-python package contains a Python 2 module that permits applications
|
| |
- written in the Python programming language, version 2, to use the interface
|
| |
- supplied by the libxml2 library to manipulate XML files.
|
| |
+ The libxml2-python package contains a Python 2 module that permits
|
| |
+ applications written in the Python programming language, version 2, to
|
| |
+ use the interface supplied by the libxml2 library to manipulate XML
|
| |
+ files.
|
| |
|
| |
- This library allows to manipulate XML files. It includes support
|
| |
- to read, modify and write XML and HTML files. There is DTDs support
|
| |
- this includes parsing and validation even with complex DTDs, either
|
| |
- at parse time or later once the document has been modified.
|
| |
+ This library allows to manipulate XML files. It includes support to read,
|
| |
+ modify and write XML and HTML files. There is DTDs support this includes
|
| |
+ parsing and validation even with complex DTDs, either at parse time or
|
| |
+ later once the document has been modified.
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
%package -n python3-%{name}
|
| |
- Summary: Python 3 bindings for the libxml2 library
|
| |
- Group: Development/Libraries
|
| |
- Requires: libxml2 = %{version}-%{release}
|
| |
- Obsoletes: %{name}-python3 < %{version}-%{release}
|
| |
- Provides: %{name}-python3 = %{version}-%{release}
|
| |
+ Summary: Python 3 bindings for the libxml2 library
|
| |
+ Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
+ Obsoletes: %{name}-python3 < %{version}-%{release}
|
| |
+ Provides: %{name}-python3 = %{version}-%{release}
|
| |
|
| |
%description -n python3-%{name}
|
| |
The libxml2-python3 package contains a Python 3 module that permits
|
| |
- applications written in the Python programming language, version 3, to use the
|
| |
- interface supplied by the libxml2 library to manipulate XML files.
|
| |
+ applications written in the Python programming language, version 3, to
|
| |
+ use the interface supplied by the libxml2 library to manipulate XML
|
| |
+ files.
|
| |
|
| |
- This library allows to manipulate XML files. It includes support
|
| |
- to read, modify and write XML and HTML files. There is DTDs support
|
| |
- this includes parsing and validation even with complex DTDs, either
|
| |
- at parse time or later once the document has been modified.
|
| |
- %endif # with_python3
|
| |
+ This library allows to manipulate XML files. It includes support to read,
|
| |
+ modify and write XML and HTML files. There is DTDs support this includes
|
| |
+ parsing and validation even with complex DTDs, either at parse time or
|
| |
+ later once the document has been modified.
|
| |
|
| |
%prep
|
| |
- %setup -q
|
| |
- %patch0 -p1
|
| |
- # workaround for #877567 - Very weird bug gzip decompression bug in "recent" libxml2 versions
|
| |
- %patch1 -p1 -b .do-not-check-crc
|
| |
- %if 0%{?fedora} > 25
|
| |
- %patch2 -p1
|
| |
- %endif
|
| |
- %patch3 -p1
|
| |
+ %autosetup -p1
|
| |
|
| |
mkdir py3doc
|
| |
cp doc/*.py py3doc
|
| |
sed -i 's|#!/usr/bin/python |#!%{__python3} |' py3doc/*.py
|
| |
|
| |
%build
|
| |
- %configure
|
| |
- make %{_smp_mflags}
|
| |
+ %configure \
|
| |
+ --disable-static
|
| |
+ %{make_build}
|
| |
|
| |
find doc -type f -exec chmod 0644 \{\} \;
|
| |
|
| |
%install
|
| |
- rm -fr %{buildroot}
|
| |
-
|
| |
- make install DESTDIR=%{buildroot}
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- make clean
|
| |
- %configure --with-python=%{__python3}
|
| |
- make install DESTDIR=%{buildroot}
|
| |
- %endif # with_python3
|
| |
+ %{make_install}
|
| |
+
|
| |
+ %if %{with python3}
|
| |
+ %{__make} clean -C python
|
| |
+ %configure \
|
| |
+ --disable-static \
|
| |
+ --with-python=%{__python3}
|
| |
+ %{make_install} -C python
|
| |
+ %endif
|
| |
|
| |
# multiarch crazyness on timestamp differences or Makefile/binaries for examples
|
| |
- touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM_BUILD_ROOT/%{_bindir}/xml2-config
|
| |
+ touch -m --reference=%{buildroot}%{_includedir}/libxml2/libxml/parser.h %{buildroot}%{_bindir}/xml2-config
|
| |
|
| |
- rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
| |
- rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
|
| |
- rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
|
| |
- rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
|
| |
- rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
|
| |
+ rm -f %{buildroot}%{_libdir}/*.la
|
| |
+ rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la
|
| |
+ rm -rf %{buildroot}%{_datadir}/doc/libxml2-%{version}/*
|
| |
+ rm -rf %{buildroot}%{_datadir}/doc/libxml2-python-%{version}/*
|
| |
(cd doc/examples ; make clean ; rm -rf .deps Makefile)
|
| |
- gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
|
| |
|
| |
%check
|
| |
- make runtests
|
| |
-
|
| |
- %clean
|
| |
- rm -fr %{buildroot}
|
| |
-
|
| |
- %post -p /sbin/ldconfig
|
| |
+ %{__make} runtests
|
| |
|
| |
+ %post -p /sbin/ldconfig
|
| |
%postun -p /sbin/ldconfig
|
| |
|
| |
%files
|
| |
- %defattr(-, root, root)
|
| |
-
|
| |
- %{!?_licensedir:%global license %%doc}
|
| |
%license Copyright
|
| |
- %doc AUTHORS NEWS README TODO
|
| |
- %doc %{_mandir}/man1/xmllint.1*
|
| |
- %doc %{_mandir}/man1/xmlcatalog.1*
|
| |
- %doc %{_mandir}/man3/libxml.3*
|
| |
-
|
| |
%{_libdir}/lib*.so.*
|
| |
%{_bindir}/xmllint
|
| |
%{_bindir}/xmlcatalog
|
| |
+ %{_mandir}/man1/xmllint.1*
|
| |
+ %{_mandir}/man1/xmlcatalog.1*
|
| |
|
| |
%files devel
|
| |
- %defattr(-, root, root)
|
| |
-
|
| |
- %doc %{_mandir}/man1/xml2-config.1*
|
| |
- %doc AUTHORS NEWS README Copyright
|
| |
- %doc doc/*.html doc/html doc/*.gif doc/*.png
|
| |
- %doc doc/tutorial doc/libxml2-api.xml.gz
|
| |
- %doc doc/examples
|
| |
- %doc %dir %{_datadir}/gtk-doc/html/libxml2
|
| |
- %doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp
|
| |
- %doc %{_datadir}/gtk-doc/html/libxml2/*.html
|
| |
- %doc %{_datadir}/gtk-doc/html/libxml2/*.png
|
| |
- %doc %{_datadir}/gtk-doc/html/libxml2/*.css
|
| |
+ %doc AUTHORS NEWS README
|
| |
+ %doc doc/{*.{html,gif,png},{examples,tutorial}}
|
| |
+ %doc %{_datadir}/gtk-doc/html/libxml2
|
| |
|
| |
%{_libdir}/lib*.so
|
| |
%{_libdir}/*.sh
|
| |
@@ -188,40 +141,54 @@
|
| |
%{_bindir}/xml2-config
|
| |
%{_datadir}/aclocal/libxml.m4
|
| |
%{_libdir}/pkgconfig/libxml-2.0.pc
|
| |
- %{_libdir}/cmake/libxml2/libxml2-config.cmake
|
| |
-
|
| |
- %files static
|
| |
- %defattr(-, root, root)
|
| |
-
|
| |
- %{_libdir}/*a
|
| |
+ %{_libdir}/cmake/libxml2
|
| |
+ %{_mandir}/man1/xml2-config.1*
|
| |
+ %{_mandir}/man3/*
|
| |
|
| |
%files -n python2-%{name}
|
| |
- %defattr(-, root, root)
|
| |
-
|
| |
+ %doc python/{TODO,libxml2class.txt} doc/{*.py,python.html}
|
| |
%{_libdir}/python2*/site-packages/libxml2.py*
|
| |
%{_libdir}/python2*/site-packages/drv_libxml2.py*
|
| |
%{_libdir}/python2*/site-packages/libxml2mod*
|
| |
- %doc python/TODO
|
| |
- %doc python/libxml2class.txt
|
| |
- %doc doc/*.py
|
| |
- %doc doc/python.html
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
+ %if %{with python3}
|
| |
%files -n python3-%{name}
|
| |
- %defattr(-, root, root)
|
| |
-
|
| |
+ %doc python/{TODO,libxml2class.txt} py3doc/*.py doc/python.html
|
| |
%{_libdir}/python3*/site-packages/libxml2.py*
|
| |
%{_libdir}/python3*/site-packages/drv_libxml2.py*
|
| |
%{_libdir}/python3*/site-packages/__pycache__/*py*
|
| |
%{_libdir}/python3*/site-packages/libxml2mod*
|
| |
- %doc python/TODO
|
| |
- %doc python/libxml2class.txt
|
| |
- %doc py3doc/*.py
|
| |
- %doc doc/python.html
|
| |
- %endif # with_python3
|
| |
-
|
| |
+ %endif
|
| |
|
| |
%changelog
|
| |
+ * Tue Dec 26 2017 Tomasz Kłoczko <kloczek@fedoraproject.org> - 2.9.7-1
|
| |
+ - removed Group fields (https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections)
|
| |
+ - remove %%defattr from %%files (no longer needed)
|
| |
+ - do not build and package libxml2 static library as none of the other packages
|
| |
+ is using static libxml2 librarys (https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries)
|
| |
+ - removed 2nd copy of the libxml2 API documentation (doc/html it is
|
| |
+ the same as in %%{_datadir}/gtk-doc/html/libxml2) and 3rd copy in source xml
|
| |
+ (devel package is now 30% smaller)
|
| |
+ - remove not needed %%ifing
|
| |
+ - man pages do not need %%doc token as those files are by definition %%doc
|
| |
+ - use %%bcond instead %%global to enable build python3 subpackage
|
| |
+ - remove BuildRoot, %%clear section and clean build root on beginning
|
| |
+ %%install as it is no longer needed
|
| |
+ - remove static zlib-devel, xz-devel and pkgconfig Requires in devel
|
| |
+ (none of the libxml2 header files is using zlib or xz headers and
|
| |
+ provide .pc file does not mean that package needs pkgconfig)
|
| |
+ - remove all <=f25 hacks (f25 is now EOS)
|
| |
+ - simplifications in %%files
|
| |
+ - add %%{_libdir}/cmake/libxml2 directory to devel %%files
|
| |
+ - add use more macros
|
| |
+ - simplify build the python3 module (to build python3 module is not necessary to
|
| |
+ rebuild the whole libxml2)
|
| |
+ - indent spec
|
| |
+ - add use %%{?_isa} macro in Requires
|
| |
+ - move man3 man pages to devel
|
| |
+ - updated to 2.9.7
|
| |
+ - added CVE-2016-9597 patch
|
| |
+
|
| |
* Fri Sep 22 2017 Petr Pisar <ppisar@redhat.com> - 2.9.5-2
|
| |
- Fix reporting error about undefined XPath variables (bug #1493613)
|
| |
|
| |
Please don't put braces around command macros, it gets confusing...