Accepting request 401584 from devel:libraries:c_c++

- Version update to 1.1.29 to match libxslt main package
- Sort out with spec-cleaner
- BuildIgnore python to avoid cycles
- Run tests and do not install them as docs

- Update to 1.1.29:
  * new release after 4 years with few bugfies all around
- Refresh patch 0009-Make-generate-id-deterministic.patch to apply
- Remove cve patch that was integrated upstream:
  libxslt-1.1.28-type_confusion_preprocess_attr.patch
- Unpack the manpage as the compression is set by buildbot not always gz

OBS-URL: https://build.opensuse.org/request/show/401584
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libxslt?expand=0&rev=48
This commit is contained in:
Dominique Leuenberger 2016-06-20 08:55:11 +00:00 committed by Git OBS Bridge
commit fbc146dca8
10 changed files with 129 additions and 150 deletions

View File

@ -5,9 +5,11 @@ Description: Make generate-id() return identifiers in a deterministic way
value in the node _private on the first invocation of generate-id().
Author: Jérémy Bobbio <lunar@debian.org>
--- libxslt-1.1.28.orig/libxslt/functions.c
+++ libxslt-1.1.28/libxslt/functions.c
@@ -660,12 +660,11 @@ xsltFormatNumberFunction(xmlXPathParserC
Index: libxslt-1.1.29/libxslt/functions.c
===================================================================
--- libxslt-1.1.29.orig/libxslt/functions.c
+++ libxslt-1.1.29/libxslt/functions.c
@@ -661,10 +661,10 @@ xsltFormatNumberFunction(xmlXPathParserC
*/
void
xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){
@ -18,38 +20,17 @@ Author: Jérémy Bobbio <lunar@debian.org>
- long val;
+ unsigned long val;
xmlChar str[30];
- xmlDocPtr doc;
if (nargs == 0) {
cur = ctxt->context->node;
@@ -698,31 +697,20 @@ xsltGenerateIdFunction(xmlXPathParserCon
ctxt->error = XPATH_INVALID_ARITY;
return;
}
- /*
- * Okay this is ugly but should work, use the NodePtr address
- * to forge the ID
- */
- if (cur->type != XML_NAMESPACE_DECL)
- doc = cur->doc;
- else {
- xmlNsPtr ns = (xmlNsPtr) cur;
-
- if (ns->context != NULL)
- doc = ns->context;
- else
- doc = ctxt->context->doc;
-
- }
@@ -702,12 +702,16 @@ xsltGenerateIdFunction(xmlXPathParserCon
if (obj)
xmlXPathFreeObject(obj);
- val = (long)((char *)cur - (char *)&base_address);
- if (val >= 0) {
- sprintf((char *)str, "idp%ld", val);
- snprintf((char *)str, sizeof(str), "idp%ld", val);
- } else {
- sprintf((char *)str, "idm%ld", -val);
- snprintf((char *)str, sizeof(str), "idm%ld", -val);
+ if (cur->_private == NULL) {
+ cur->_private = xmlMalloc(sizeof (unsigned long));
+ if (cur->_private == NULL) {

View File

@ -1,29 +0,0 @@
From 7ca19df892ca22d9314e95d59ce2abdeff46b617 Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Thu, 29 Oct 2015 19:33:23 +0800
Subject: Fix for type confusion in preprocessing attributes
CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
We need to check that the parent node is an element before dereferencing
its namespace
---
libxslt/preproc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libxslt/preproc.c b/libxslt/preproc.c
index 0eb80a0..7f69325 100644
--- a/libxslt/preproc.c
+++ b/libxslt/preproc.c
@@ -2249,7 +2249,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
} else if (IS_XSLT_NAME(inst, "attribute")) {
xmlNodePtr parent = inst->parent;
- if ((parent == NULL) || (parent->ns == NULL) ||
+ if ((parent == NULL) ||
+ (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) ||
((parent->ns != inst->ns) &&
(!xmlStrEqual(parent->ns->href, inst->ns->href))) ||
(!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) {
--
cgit v0.12

View File

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

3
libxslt-1.1.29.tar.gz Normal file
View File

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

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sat Jun 11 12:03:15 UTC 2016 - tchvatal@suse.com
- Version update to 1.1.29 to match libxslt main package
- Sort out with spec-cleaner
- BuildIgnore python to avoid cycles
- Run tests and do not install them as docs
-------------------------------------------------------------------
Fri May 20 13:55:16 UTC 2016 - kstreitova@suse.com

View File

@ -16,39 +16,30 @@
#
%define libname libxslt1
Name: libxslt-python
Version: 1.1.29
Release: 0
Summary: Python Bindings for libxslt
License: MIT
Group: Development/Libraries/Python
Version: 1.1.28
Release: 0
Url: http://xmlsoft.org/XSLT/
Source: ftp://xmlsoft.org/libxslt/libxslt-%{version}.tar.gz
# Uncomment to save space:
#NoSource: 0
Patch0: libxslt-1.1.24-linkflags.patch
# pbleser: don't build the doc subdir as it's broken and we don't install
# it anyway; neither build the xsltproc subdir (not packaged here, faster)
Patch1: libxslt-do_not_build_doc_nor_xsltproc.patch
# PATCH-FIX-UPSTREAM bnc#952474 CVE-2015-7995 kstreitova@suse.com -- fix for type confusion in preprocessing attributes
Patch2: libxslt-1.1.28-type_confusion_preprocess_attr.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{py_requires}
Url: http://xmlsoft.org/XSLT/
#BuildArch: noarch
BuildRequires: libgcrypt-devel
BuildRequires: libgpg-error-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: libxml2-python
BuildRequires: libxslt-tools
#!BuildIgnore: python
BuildRequires: python-devel
BuildRequires: python-xml
%if 0%{?suse_version} >= 1220
BuildRequires: libxslt-tools
Requires: libxslt1 = %{version}
%else
BuildRequires: libxslt1
Requires: libxslt1 = %{version}
%endif
Requires: %{libname} = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The libxslt-python package contains a module that permits applications
@ -64,31 +55,34 @@ XSLT language with XPath functions written in Python.
%setup -q -n libxslt-%{version}
%patch0
%patch1
%patch2 -p1
%build
autoreconf --force --install
%configure --with-python=%__python --with-pic --disable-static --disable-silent-rules
autoreconf -fvi
%configure \
--with-python=python \
--with-pic \
--disable-static \
--disable-silent-rules
make %{?_smp_mflags} PYTHON_SITE_PACKAGES=%{py_sitedir} pythondir=%{py_sitedir}
%install
make install PYTHON_SITE_PACKAGES=%{py_sitedir} pythondir=%{py_sitedir} DESTDIR=$RPM_BUILD_ROOT
make install PYTHON_SITE_PACKAGES=%{py_sitedir} pythondir=%{py_sitedir} DESTDIR=%{buildroot}
# Unwanted doc stuff
rm -fr $RPM_BUILD_ROOT%{_datadir}/doc
rm -fr %{buildroot}%{_datadir}/doc
# #223696
find %{buildroot} -type f -name "*.la" -print -delete
find %{buildroot} -type f -name "*.la" -delete -print
# Stuff we won't package
rm -rf %{buildroot}/%{_bindir}/* %{buildroot}/%{_libdir}/lib** %{buildroot}/%{_includedir}/*
rm -rf %{buildroot}/%{_mandir}/* %{buildroot}/%{_libdir}/pkgconfig/*
rm -rf %{buildroot}/%{_libdir}/xsltConf.sh %{buildroot}/%{_datadir}/aclocal/libxslt.m4
%check
make %{?_smp_mflags} tests -C python
%files
%defattr(-, root, root)
%{py_sitedir}/*
%doc python/libxslt-python-api.xml
%doc python/tests/*.py
%doc python/tests/*.xml
%doc python/tests/*.xsl
%changelog

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sat Jun 11 11:42:29 UTC 2016 - tchvatal@suse.com
- Update to 1.1.29:
* new release after 4 years with few bugfies all around
- Refresh patch 0009-Make-generate-id-deterministic.patch to apply
- Remove cve patch that was integrated upstream:
libxslt-1.1.28-type_confusion_preprocess_attr.patch
- Unpack the manpage as the compression is set by buildbot not always gz
-------------------------------------------------------------------
Fri May 20 13:53:45 UTC 2016 - kstreitova@suse.com

View File

@ -16,34 +16,27 @@
#
%define libname %{name}1
%define exname libexslt0
Name: libxslt
%define soname 1
%define exslt_soname 0
Version: 1.1.28
Version: 1.1.29
Release: 0
Summary: XSL Transformation Library
License: MIT and GPL-2.0+
Group: System/Libraries
#
Url: http://xmlsoft.org/XSLT/
Source: ftp://xmlsoft.org/libxslt/libxslt-%{version}.tar.gz
Source2: baselibs.conf
Source3: xslt-config.1.gz
Source3: xslt-config.1
Patch0: %{name}-1.1.24-no-net-autobuild.patch
Patch1: libxslt-config-fixes.patch
Patch2: 0009-Make-generate-id-deterministic.patch
# PATCH-FIX-UPSTREAM bnc#952474 CVE-2015-7995 kstreitova@suse.com -- fix for type confusion in preprocessing attributes
Patch3: libxslt-1.1.28-type_confusion_preprocess_attr.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libgcrypt-devel
BuildRequires: libgpg-error-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: pkg-config
# bug437293
%ifarch ppc64
Obsoletes: libxslt-64bit
%endif
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This C library allows you to transform XML files into other XML files
@ -58,17 +51,12 @@ to be a relatively fast processor. It also includes full support for
the EXSLT set of extension functions as well as some common extensions
present in other XSLT engines.
%package -n %{name}%{soname}
%package -n %{libname}
Summary: XSL Transformation Library
License: LGPL-2.1+
Group: System/Libraries
%if 0%{?suse_version} < 1220
Provides: %{name}-tools = %{version}
Obsoletes: %{name} < %version-%release
Provides: %{name} = %version-%release
%endif
%description -n %{name}%{soname}
%description -n %{libname}
This C library allows you to transform XML files into other XML files
(or HTML, text, and more) using the standard XSLT stylesheet
transformation mechanism.
@ -81,90 +69,74 @@ to be a relatively fast processor. It also includes full support for
the EXSLT set of extension functions as well as some common extensions
present in other XSLT engines.
The package comes with xsltproc, a command line interface to the XSLT
engine.
%package devel
Summary: Include Files and Libraries mandatory for Development
License: LGPL-2.1+
Group: Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes: %{name}-devel-64bit
%endif
%if 0%{?suse_version} >= 1220
Requires: %{name}-tools = %version
%endif
Requires: %{name}%{soname} = %{version}
Requires: %{libname} = %{version}
Requires: %{name}-tools = %{version}
Requires: glibc-devel
Requires: libgcrypt-devel
Requires: libgpg-error-devel
#libxml is automatically required with pkgconfig
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%if 0%{?suse_version} >= 1220
%package tools
Summary: Extended Stylesheet Language (XSL) Transformation utilities
License: MIT and GPL-2.0+
Group: Development/Tools
Provides: xsltproc = %version-%release
# O/P added during 12.2 dev:
Obsoletes: %{name} < %version-%release
Provides: %{name} = %version-%release
Group: Development/Tools/Other
Provides: %{name} = %{version}
Provides: xsltproc = %{version}
%description tools
This package contains xsltproc, a command line interface to the XSLT engine.
%endif
xtend the
%prep
%setup -q
%patch0
%patch1
%patch2 -p1
%patch3 -p1
%build
autoreconf --force --install --verbose
%configure --disable-static --with-pic --without-python --disable-silent-rules
autoreconf -fvi
%configure \
--disable-static \
--with-pic \
--without-python \
--disable-silent-rules
make %{?_smp_mflags}
%check
%if ! 0%{?qemu_user_space_build}
make check
make %{?_smp_mflags} check
%endif
%install
%makeinstall
make %{?_smp_mflags} DESTDIR=%{buildroot} install
# Unwanted doc stuff
rm -fr %{buildroot}%{_datadir}/doc
# the manual page is required
install -ma=r '-t%{buildroot}%{_mandir}/man1' '%{SOURCE3}'
install -D -m0644 %{SOURCE3} %{buildroot}%{_mandir}/man1/xslt-config.1
#kill all "la" files
find %{buildroot} -type f -name "*.la" -print -delete
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{name}%{soname} -p /sbin/ldconfig
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%postun -n %{name}%{soname} -p /sbin/ldconfig
%files -n %{name}%{soname}
%files -n %{libname}
%defattr(-, root, root)
%{_libdir}/libxslt.so.%{soname}
%{_libdir}/libxslt.so.%{soname}.*
%{_libdir}/libexslt.so.%{exslt_soname}
%{_libdir}/libexslt.so.%{exslt_soname}.*
%if 0%{?suse_version} >= 1220
%{_libdir}/libxslt.so.*
%{_libdir}/libexslt.so.*
%files tools
%defattr(-,root,root)
%endif
%doc AUTHORS NEWS README COPYING* Copyright TODO FEATURES
%{_bindir}/xsltproc
%doc %{_mandir}/man1/xsltproc.*
%{_mandir}/man1/xsltproc.1%{ext_man}
%files devel
%defattr(-, root, root)
@ -176,9 +148,8 @@ find %{buildroot} -type f -name "*.la" -print -delete
%{_includedir}/*
%{_datadir}/aclocal/*
%{_bindir}/xslt-config
%doc %{_mandir}/man1/xslt-config.*
%doc %{_mandir}/man3/*
# not available doc/*.png
%{_mandir}/man1/xslt-config.1%{ext_man}
%{_mandir}/man3/*
%doc doc/*.html doc/html doc/tutorial doc/*.gif
%changelog

47
xslt-config.1 Normal file
View File

@ -0,0 +1,47 @@
.mso www.tmac
.TH XSLT-CONFIG 1 2011-06-24 GNOME "The XSLT C library for GNOME"
.SH NAME
xslt-config \- provides compilation or linking flags for programs using libxslt
.SH SYNOPSIS
.B xslt-config --cflags
.br
.B xslt-config --libs
.SH DESCRIPTION
.B xslt-config
is a small shell script which is installed as part of
.B libxslt
usual install process which provides compilation or linking flags for programs using it.
Use
.IP
.B xslt-config --cflags
.PP
to get the compilation flags and
.IP
.B xslt-config --libs
.PP
to get the linker flags. Usually this is done directly from the Makefile as:
.IP
.B CFLAGS=`xslt-config --cflags`
.br
.B LIBS=`xslt-config --libs`
.SH NOTES
If you use the
.SM EXSLT
extensions from the program then you should prepend
.B -lexslt
to the
.B LIBS
options
.SH SEE ALSO
.URL http://xmlsoft.org/XSLT/ "The XSLT C library for GNOME"

View File

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