From d1852ff635c5ed868a0b71c0f102e197ae2b73c0 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 22 Feb 2022 16:41:17 +0100 Subject: [PATCH 1/3] libxml2: update to 2.9.13. --- srcpkgs/libxml2/patches/CVE-2019-20388.patch | 32 -------------------- srcpkgs/libxml2/patches/icu-68.patch | 25 --------------- srcpkgs/libxml2/template | 17 ++++------- srcpkgs/libxml2/update | 2 ++ 4 files changed, 8 insertions(+), 68 deletions(-) delete mode 100644 srcpkgs/libxml2/patches/CVE-2019-20388.patch delete mode 100644 srcpkgs/libxml2/patches/icu-68.patch create mode 100644 srcpkgs/libxml2/update diff --git a/srcpkgs/libxml2/patches/CVE-2019-20388.patch b/srcpkgs/libxml2/patches/CVE-2019-20388.patch deleted file mode 100644 index b0fee2ef010e..000000000000 --- a/srcpkgs/libxml2/patches/CVE-2019-20388.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6088a74bcf7d0c42e24cff4594d804e1d3c9fbca Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie -Date: Tue, 20 Aug 2019 16:33:06 +0800 -Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream - -When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun -alloc a new schema for ctxt->schema and set vctxt->xsiAssemble -to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize -vctxt->xsiAssemble to 0 again which cause the alloced schema -can not be freed anymore. - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie ---- - xmlschemas.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/xmlschemas.c b/xmlschemas.c -index 301c8449..39d92182 100644 ---- a/xmlschemas.c -+++ b/xmlschemas.c -@@ -28090,7 +28090,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { - vctxt->nberrors = 0; - vctxt->depth = -1; - vctxt->skipDepth = -1; -- vctxt->xsiAssemble = 0; - vctxt->hasKeyrefs = 0; - #ifdef ENABLE_IDC_NODE_TABLES_TEST - vctxt->createIDCNodeTables = 1; --- -2.24.1 diff --git a/srcpkgs/libxml2/patches/icu-68.patch b/srcpkgs/libxml2/patches/icu-68.patch deleted file mode 100644 index b11c57daf9e7..000000000000 --- a/srcpkgs/libxml2/patches/icu-68.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b516ed189eb440e909f36baca1557b98e4d9ffd7 Mon Sep 17 00:00:00 2001 -From: Frederik Seiffert -Date: Thu, 12 Nov 2020 12:53:43 +0100 -Subject: [PATCH] Fix building with ICU 68. - -ICU 68 no longer defines the TRUE macro. - -Closes #204. ---- - encoding.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/encoding.c b/encoding.c -index c34aca446..264f60bb4 100644 ---- a/encoding.c -+++ b/encoding.c -@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out, - #ifdef LIBXML_ICU_ENABLED - else if (handler->uconv_out != NULL) { - ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen, -- TRUE); -+ 1); - } - #endif /* LIBXML_ICU_ENABLED */ - else { diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template index 229b60e79d96..e2d76ceec885 100644 --- a/srcpkgs/libxml2/template +++ b/srcpkgs/libxml2/template @@ -3,23 +3,18 @@ # Please keep this in sync with "srcpkgs/libxml2-python3" # pkgname=libxml2 -version=2.9.10 -revision=6 +version=2.9.13 +revision=1 build_style=gnu-configure configure_args="--with-threads --with-history --with-icu --without-python" -hostmakedepends="automake libtool gettext-devel pkg-config" +hostmakedepends="gettext pkg-config" makedepends="zlib-devel ncurses-devel readline-devel liblzma-devel icu-devel" short_desc="Library providing XML and HTML support" maintainer="Enno Boland " license="MIT" homepage="http://www.xmlsoft.org/" -distfiles="http://xmlsoft.org/sources/${pkgname}-${version}.tar.gz" -checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f - -pre_configure() { - autoreconf -fi - sed '/PROGRAMS =/s,$(noinst_PROGRAMS),,' -i Makefile.in -} +distfiles="https://download.gnome.org/sources/libxml2/${version%.*}/libxml2-${version}.tar.xz" +checksum=276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e post_install() { vlicense COPYING @@ -36,7 +31,7 @@ libxml2-devel_package() { vmove usr/lib/cmake vmove usr/share/aclocal vmove usr/share/gtk-doc - vmove usr/share/doc/${sourcepkg}-${version} + vmove usr/share/doc vmove "usr/share/man/man1/xml2-config*" vmove usr/share/man/man3 vmove "usr/lib/*.a" diff --git a/srcpkgs/libxml2/update b/srcpkgs/libxml2/update new file mode 100644 index 000000000000..9922cafaf3db --- /dev/null +++ b/srcpkgs/libxml2/update @@ -0,0 +1,2 @@ +site='https://gitlab.gnome.org/GNOME/libxml2/-/tags' +pattern='v\d+.[\d.]+\d' From 6c0569d8e9d90a76a1e23776f0fb6561451879f7 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 22 Feb 2022 16:42:09 +0100 Subject: [PATCH 2/3] libxml2-python3: update to 2.9.13. --- .../libxml2-python3/patches/py39compat.patch | 68 ------------------- srcpkgs/libxml2-python3/template | 8 +-- 2 files changed, 4 insertions(+), 72 deletions(-) delete mode 100644 srcpkgs/libxml2-python3/patches/py39compat.patch diff --git a/srcpkgs/libxml2-python3/patches/py39compat.patch b/srcpkgs/libxml2-python3/patches/py39compat.patch deleted file mode 100644 index 56130471793e..000000000000 --- a/srcpkgs/libxml2-python3/patches/py39compat.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/python/libxml.c 2020-10-07 14:41:45.226029584 -0400 -+++ b/python/libxml.c 2020-10-07 14:42:58.965113111 -0400 -@@ -294,7 +294,7 @@ - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -@@ -359,7 +359,7 @@ - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; ---- a/python/types.c 2020-10-07 14:41:49.393034304 -0400 -+++ b/python/types.c 2020-10-07 14:42:23.496072934 -0400 -@@ -602,16 +602,16 @@ - if (obj == NULL) { - return (NULL); - } -- if PyFloat_Check (obj) { -+ if (PyFloat_Check (obj)) { - ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj)); -- } else if PyLong_Check(obj) { -+ } else if (PyLong_Check(obj)) { - #ifdef PyLong_AS_LONG - ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj)); - #else - ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj)); - #endif - #ifdef PyBool_Check -- } else if PyBool_Check (obj) { -+ } else if (PyBool_Check (obj)) { - - if (obj == Py_True) { - ret = xmlXPathNewBoolean(1); -@@ -620,14 +620,14 @@ - ret = xmlXPathNewBoolean(0); - } - #endif -- } else if PyBytes_Check (obj) { -+ } else if (PyBytes_Check (obj)) { - xmlChar *str; - - str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj), - PyBytes_GET_SIZE(obj)); - ret = xmlXPathWrapString(str); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (obj) { -+ } else if (PyUnicode_Check (obj)) { - #if PY_VERSION_HEX >= 0x03030000 - xmlChar *str; - const char *tmp; -@@ -650,7 +650,7 @@ - ret = xmlXPathWrapString(str); - #endif - #endif -- } else if PyList_Check (obj) { -+ } else if (PyList_Check (obj)) { - int i; - PyObject *node; - xmlNodePtr cur; diff --git a/srcpkgs/libxml2-python3/template b/srcpkgs/libxml2-python3/template index 46dfd05a0bcf..4db662975d2a 100644 --- a/srcpkgs/libxml2-python3/template +++ b/srcpkgs/libxml2-python3/template @@ -1,7 +1,7 @@ # Template file for 'libxml2-python3' pkgname=libxml2-python3 -version=2.9.10 -revision=5 +version=2.9.13 +revision=1 wrksrc="libxml2-${version}" build_wrksrc=python build_style=python3-module @@ -12,8 +12,8 @@ short_desc="Library providing XML and HTML support - Python3 bindings" maintainer="Enno Boland " license="MIT" homepage="http://www.xmlsoft.org/" -distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz" -checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f +distfiles="https://download.gnome.org/sources/libxml2/${version%.*}/libxml2-${version}.tar.xz" +checksum=276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e post_patch() { if [ "${CROSS_BUILD}" ]; then From e847a499fe67a7a3ef3193b9c9e74bf998a3aad6 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 22 Feb 2022 16:58:50 +0100 Subject: [PATCH 3/3] libxslt: update to 1.1.35. --- srcpkgs/libxslt/patches/fix-manpage.patch | 13 ------------- srcpkgs/libxslt/template | 13 ++++++------- srcpkgs/libxslt/update | 2 ++ 3 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 srcpkgs/libxslt/patches/fix-manpage.patch create mode 100644 srcpkgs/libxslt/update diff --git a/srcpkgs/libxslt/patches/fix-manpage.patch b/srcpkgs/libxslt/patches/fix-manpage.patch deleted file mode 100644 index 881338aca482..000000000000 --- a/srcpkgs/libxslt/patches/fix-manpage.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/doc/xsltproc.xml 2019-10-30 21:02:14.000000000 +0100 -+++ b/doc/xsltproc.xml 2021-09-24 21:00:52.628526237 +0200 -@@ -1,8 +1,8 @@ - - -+ href="/usr/share/xsl/docbook/manpages/docbook.xsl"?> - xsltproc"> - ]> diff --git a/srcpkgs/libxslt/template b/srcpkgs/libxslt/template index 0a18a2e3fc61..fbede2817bf5 100644 --- a/srcpkgs/libxslt/template +++ b/srcpkgs/libxslt/template @@ -1,7 +1,7 @@ # Template file for 'libxslt' pkgname=libxslt -version=1.1.34 -revision=5 +version=1.1.35 +revision=1 build_style=gnu-configure configure_args="--disable-static --disable-dependency-tracking" hostmakedepends="docbook-xml docbook-xsl libtool pkg-config" @@ -10,10 +10,9 @@ short_desc="XSLT parser library from the GNOME project" maintainer="Orphaned " license="MIT" homepage="http://xmlsoft.org/XSLT/" -distfiles="http://xmlsoft.org/sources/libxslt-${version}.tar.gz - ftp://xmlsoft.org/${pkgname}/${pkgname}-${version}.tar.gz" -checksum="98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f - 98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f" +distfiles="https://download.gnome.org/sources/libxslt/${version%.*}/libxslt-${version}.tar.xz" +checksum=8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79 +python_version=3 if [ "$CROSS_BUILD" ]; then hostmakedepends+=" libxslt" @@ -57,7 +56,7 @@ libxslt-devel_package() { vmove usr/lib/pkgconfig vmove "usr/lib/*.so" vmove usr/share/aclocal - vmove usr/share/doc/${sourcepkg}-${version} + vmove usr/share/doc vmove usr/share/man/man3 } } diff --git a/srcpkgs/libxslt/update b/srcpkgs/libxslt/update new file mode 100644 index 000000000000..f85b09e1abd6 --- /dev/null +++ b/srcpkgs/libxslt/update @@ -0,0 +1,2 @@ +site='https://gitlab.gnome.org/GNOME/libxslt/-/tags' +pattern='v\d+.[\d.]+\d'