Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Update libxml2 and cleanup python2 cruft
@ 2021-05-13 19:04 ericonr
  2021-05-13 19:12 ` [PR PATCH] [Updated] " ericonr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ericonr @ 2021-05-13 19:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages libxml2
https://github.com/void-linux/void-packages/pull/30833

Update libxml2 and cleanup python2 cruft
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-30833.patch --]
[-- Type: text/x-diff, Size: 14759 bytes --]

From 48695530e26c7fbab6d15ef7cf84a84c26b8b84f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:44:03 -0300
Subject: [PATCH 1/4] libxml2: update to 2.9.11.

- fixes a bunch of CVEs and arbitrary issues
- don't run autoreconf anymore. Was added in
  66d6f3ef819d1c3fd4a3d772dcd21846f9467001, but isn't necessary anymore.
- the sed command was also outdated
- can build with just gettext and pkg-config in host now
---
 srcpkgs/libxml2/patches/CVE-2019-20388.patch | 32 --------------------
 srcpkgs/libxml2/template                     | 13 +++-----
 2 files changed, 4 insertions(+), 41 deletions(-)
 delete mode 100644 srcpkgs/libxml2/patches/CVE-2019-20388.patch

diff --git a/srcpkgs/libxml2/patches/CVE-2019-20388.patch b/srcpkgs/libxml2/patches/CVE-2019-20388.patch
deleted file mode 100644
index e1582f299de3..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 <xiezhipeng1@huawei.com>
-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 <xiezhipeng1@huawei.com>
----
- xmlschemas.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/xmlschemas.c b/xmlschemas.c
-index 301c8449..39d92182 100644
---- xmlschemas.c
-+++ 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/template b/srcpkgs/libxml2/template
index c334f505ed0c..b26af1d9dd45 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -3,23 +3,18 @@
 # Please keep this in sync with "srcpkgs/libxml2-python"
 #
 pkgname=libxml2
-version=2.9.10
-revision=4
+version=2.9.11
+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 <gottox@voidlinux.org>"
 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
-}
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
 
 post_install() {
 	vlicense COPYING

From f05b220b0848530826c3c64bb08610e05f969e0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:58:44 -0300
Subject: [PATCH 2/4] bamf: update to 0.5.5.

Also remove outdated python2 dependencies.
---
 srcpkgs/bamf/template | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/bamf/template b/srcpkgs/bamf/template
index e71e50d826f2..a61f25f88ed0 100644
--- a/srcpkgs/bamf/template
+++ b/srcpkgs/bamf/template
@@ -1,18 +1,18 @@
 # Template file for 'bamf'
 pkgname=bamf
-version=0.5.4
-revision=4
+version=0.5.5
+revision=1
 build_style=gnu-configure
 build_helper="gir"
-hostmakedepends="glib-devel gtk-doc pkg-config python-lxml libxslt-python libxml2-python
- $(vopt_if vala vala)"
+hostmakedepends="glib-devel gtk-doc pkg-config $(vopt_if vala vala)
+ gnome-common which automake libtool gettext"
 makedepends="libglib-devel libgtop-devel libwnck-devel"
 short_desc="Application matching framework"
 maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="LGPL-3.0-only, LGPL-2.1-only, GPL-3.0-or-later"
 homepage="https://launchpad.net/bamf"
-distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.gz"
-checksum=5bb87a5bf46ab1fc9a229a851c0ee4f610d943716a7c83d318f6a8f50d76beb3
+distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.xz"
+checksum=10e642adf5169d46e32b113346bebdad437cddd1ddbd45d16c640cf60cabf5da
 
 CFLAGS="-Wno-cpp -Wno-deprecated-declarations"
 
@@ -20,8 +20,7 @@ build_options="gir vala"
 build_options_default="gir vala"
 
 pre_configure() {
-	sed -i configure -e 's;if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null);if false;'
-	sed -i configure -e '/CFLAGS=/s/ \-Werror / /'
+	NOCONFIGURE=1 ./autogen.sh
 }
 
 bamf-devel_package() {
@@ -31,7 +30,6 @@ bamf-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/*.so
-		vmove usr/share/gtk-doc
 		if [ "$build_option_gir" ]; then
 			vmove usr/share/gir-1.0
 		fi

From b91001a873e448f0037be1823163983941fc7f25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:59:41 -0300
Subject: [PATCH 3/4] libxslt: remove python module.

Only supports python2 at the moment, isn't used by any other package.
---
 srcpkgs/libxslt-python   |  1 -
 srcpkgs/libxslt/template | 24 +++++-------------------
 2 files changed, 5 insertions(+), 20 deletions(-)
 delete mode 120000 srcpkgs/libxslt-python

diff --git a/srcpkgs/libxslt-python b/srcpkgs/libxslt-python
deleted file mode 120000
index fbcaa3cb7ad9..000000000000
--- a/srcpkgs/libxslt-python
+++ /dev/null
@@ -1 +0,0 @@
-libxslt
\ No newline at end of file
diff --git a/srcpkgs/libxslt/template b/srcpkgs/libxslt/template
index 42d80f08ac98..31b395b3ca5b 100644
--- a/srcpkgs/libxslt/template
+++ b/srcpkgs/libxslt/template
@@ -1,11 +1,11 @@
 # Template file for 'libxslt'
 pkgname=libxslt
 version=1.1.34
-revision=4
+revision=5
 build_style=gnu-configure
-configure_args="--disable-static --disable-dependency-tracking"
-hostmakedepends="libtool python-devel libxml2-python pkg-config"
-makedepends="python-devel libxml2-devel libxml2-python libgcrypt-devel"
+configure_args="--disable-static --disable-dependency-tracking --without-python"
+hostmakedepends="libtool pkg-config"
+makedepends="libxml2-devel libgcrypt-devel"
 short_desc="XSLT parser library from the GNOME project"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
@@ -20,12 +20,7 @@ post_configure() {
 	# on don't know how to make target, needed
 	# by Usage:
 	# Makefile is created after configure so fix here
-	find ${wrksrc} -type f -name Makefile | xargs sed -i '/Usage/,/--version/d'
-	if [ "$CROSS_BUILD" ]; then
-		sed -e "s|/usr/include/python2.7|$XBPS_CROSS_BASE/&|g" \
-			-e "s|/usr/lib/python2.7/site-packages|$XBPS_CROSS_BASE/&|g" \
-			-i python/Makefile
-	fi
+	find ${wrksrc} -type f -name Makefile -exec sed -i '/Usage/,/--version/d' '{}' +
 }
 
 post_install() {
@@ -53,12 +48,3 @@ libxslt-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
-
-libxslt-python_package() {
-	lib32disabled=yes
-	short_desc+=" - python extension"
-	pkg_install() {
-		vmove "usr/lib/python*"
-		vmove usr/share/doc/${sourcepkg}-python-${version}
-	}
-}

From 4cc13481dbfa27cb9ce343fd44af25d8cea79ff3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:02:04 -0300
Subject: [PATCH 4/4] libxml2-python: turn into libxml2-python3.

No package is using the python2 bindings anymore.
---
 .../libxml2-python/patches/py39compat.patch   | 68 -------------------
 .../libxml2-python/patches/python3-utf8.patch | 37 ----------
 srcpkgs/libxml2-python/template               | 34 ----------
 srcpkgs/libxml2-python3                       |  1 -
 srcpkgs/libxml2-python3/template              | 26 +++++++
 5 files changed, 26 insertions(+), 140 deletions(-)
 delete mode 100644 srcpkgs/libxml2-python/patches/py39compat.patch
 delete mode 100644 srcpkgs/libxml2-python/patches/python3-utf8.patch
 delete mode 100644 srcpkgs/libxml2-python/template
 delete mode 120000 srcpkgs/libxml2-python3
 create mode 100644 srcpkgs/libxml2-python3/template

diff --git a/srcpkgs/libxml2-python/patches/py39compat.patch b/srcpkgs/libxml2-python/patches/py39compat.patch
deleted file mode 100644
index c5dbfabbaa4e..000000000000
--- a/srcpkgs/libxml2-python/patches/py39compat.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- python/libxml.c.orig	2020-10-07 14:41:45.226029584 -0400
-+++ 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;
---- python/types.c.orig	2020-10-07 14:41:49.393034304 -0400
-+++ 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-python/patches/python3-utf8.patch b/srcpkgs/libxml2-python/patches/python3-utf8.patch
deleted file mode 100644
index 46a834b6fa45..000000000000
--- a/srcpkgs/libxml2-python/patches/python3-utf8.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Description: work around libxml2 python3 handling of UTF-8 encoded messages
-Author: Jan Matejek
-Source: https://bugzilla.opensuse.org/show_bug.cgi?id=1065270
-
---- python/libxml.c
-+++ python/libxml.c
-@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
-     PyObject *message;
-     PyObject *result;
-     char str[1000];
-+    unsigned char *ptr = (unsigned char *)str;
- 
- #ifdef DEBUG_ERROR
-     printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
-@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
- 	    str[999] = 0;
-         va_end(ap);
- 
-+#if PY_MAJOR_VERSION >= 3
-+        /* Ensure the error string doesn't start at UTF8 continuation. */
-+        while (*ptr && (*ptr & 0xc0) == 0x80)
-+            ptr++;
-+#endif
-+
-         list = PyTuple_New(2);
-         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
-         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
--        message = libxml_charPtrConstWrap(str);
-+        message = libxml_charPtrConstWrap(ptr);
-         PyTuple_SetItem(list, 1, message);
-         result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
-+        /* Forget any errors caused in the error handler. */
-+        PyErr_Clear();
-         Py_XDECREF(list);
-         Py_XDECREF(result);
-     }
-
diff --git a/srcpkgs/libxml2-python/template b/srcpkgs/libxml2-python/template
deleted file mode 100644
index 4208519dac3e..000000000000
--- a/srcpkgs/libxml2-python/template
+++ /dev/null
@@ -1,34 +0,0 @@
-# Template file for 'libxml2-python'
-pkgname=libxml2-python
-version=2.9.10
-revision=3
-wrksrc="${pkgname%-python}-${version}"
-build_wrksrc=python
-build_style=python-module
-hostmakedepends="python-devel python3-devel"
-makedepends="libxml2-devel python-devel python3-devel"
-depends="python python3"
-short_desc="Library providing XML and HTML support - Python2 bindings"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="MIT"
-homepage="http://www.xmlsoft.org/"
-distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
-checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
-
-post_patch() {
-	if [ "${CROSS_BUILD}" ]; then
-		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
-	fi
-}
-
-post_install() {
-	vlicense ../COPYING
-}
-
-libxml2-python3_package() {
-	short_desc="${short_desc/Python2/Python3}"
-	pkg_install() {
-		vmove "usr/lib/python3*"
-		vlicense ../COPYING
-	}
-}
diff --git a/srcpkgs/libxml2-python3 b/srcpkgs/libxml2-python3
deleted file mode 120000
index 7ba590df8660..000000000000
--- a/srcpkgs/libxml2-python3
+++ /dev/null
@@ -1 +0,0 @@
-libxml2-python
\ No newline at end of file
diff --git a/srcpkgs/libxml2-python3/template b/srcpkgs/libxml2-python3/template
new file mode 100644
index 000000000000..4a4c6649434a
--- /dev/null
+++ b/srcpkgs/libxml2-python3/template
@@ -0,0 +1,26 @@
+# Template file for 'libxml2-python3'
+pkgname=libxml2-python3
+version=2.9.11
+revision=1
+wrksrc="${pkgname%-python3}-${version}"
+build_wrksrc=python
+build_style=python3-module
+hostmakedepends="python3-devel"
+makedepends="libxml2-devel python3-devel"
+depends="python3"
+short_desc="Library providing XML and HTML support - Python3 bindings"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="MIT"
+homepage="http://www.xmlsoft.org/"
+distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
+checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
+
+post_patch() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
+	fi
+}
+
+post_install() {
+	vlicense ../COPYING
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
@ 2021-05-13 19:12 ` ericonr
  2021-05-13 19:16 ` ericonr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-05-13 19:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages libxml2
https://github.com/void-linux/void-packages/pull/30833

Update libxml2 and cleanup python2 cruft
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-30833.patch --]
[-- Type: text/x-diff, Size: 15944 bytes --]

From 143a58f9a6f2626fa79b241c520b716c6f56ed5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:44:03 -0300
Subject: [PATCH 1/5] libxml2: update to 2.9.11.

- fixes a bunch of CVEs and arbitrary issues
- don't run autoreconf anymore. Was added in
  66d6f3ef819d1c3fd4a3d772dcd21846f9467001, but isn't necessary anymore.
- the sed command was also outdated
- can build with just gettext and pkg-config in host now
---
 srcpkgs/libxml2/patches/CVE-2019-20388.patch | 32 --------------------
 srcpkgs/libxml2/template                     | 15 ++++-----
 2 files changed, 6 insertions(+), 41 deletions(-)
 delete mode 100644 srcpkgs/libxml2/patches/CVE-2019-20388.patch

diff --git a/srcpkgs/libxml2/patches/CVE-2019-20388.patch b/srcpkgs/libxml2/patches/CVE-2019-20388.patch
deleted file mode 100644
index e1582f299de3..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 <xiezhipeng1@huawei.com>
-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 <xiezhipeng1@huawei.com>
----
- xmlschemas.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/xmlschemas.c b/xmlschemas.c
-index 301c8449..39d92182 100644
---- xmlschemas.c
-+++ 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/template b/srcpkgs/libxml2/template
index c334f505ed0c..5d4815ffc70b 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -3,23 +3,20 @@
 # Please keep this in sync with "srcpkgs/libxml2-python"
 #
 pkgname=libxml2
-version=2.9.10
-revision=4
+version=2.9.11
+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 <gottox@voidlinux.org>"
 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
-}
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
+# tries to run fuzz tests unconditionally and can't find headers for it
+make_check=no
 
 post_install() {
 	vlicense COPYING

From 0ae68f7cc4ccd0c76feb46df965a092134d994e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:58:44 -0300
Subject: [PATCH 2/5] bamf: update to 0.5.5.

Also remove outdated python2 dependencies.
---
 srcpkgs/bamf/template | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/bamf/template b/srcpkgs/bamf/template
index e71e50d826f2..a61f25f88ed0 100644
--- a/srcpkgs/bamf/template
+++ b/srcpkgs/bamf/template
@@ -1,18 +1,18 @@
 # Template file for 'bamf'
 pkgname=bamf
-version=0.5.4
-revision=4
+version=0.5.5
+revision=1
 build_style=gnu-configure
 build_helper="gir"
-hostmakedepends="glib-devel gtk-doc pkg-config python-lxml libxslt-python libxml2-python
- $(vopt_if vala vala)"
+hostmakedepends="glib-devel gtk-doc pkg-config $(vopt_if vala vala)
+ gnome-common which automake libtool gettext"
 makedepends="libglib-devel libgtop-devel libwnck-devel"
 short_desc="Application matching framework"
 maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="LGPL-3.0-only, LGPL-2.1-only, GPL-3.0-or-later"
 homepage="https://launchpad.net/bamf"
-distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.gz"
-checksum=5bb87a5bf46ab1fc9a229a851c0ee4f610d943716a7c83d318f6a8f50d76beb3
+distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.xz"
+checksum=10e642adf5169d46e32b113346bebdad437cddd1ddbd45d16c640cf60cabf5da
 
 CFLAGS="-Wno-cpp -Wno-deprecated-declarations"
 
@@ -20,8 +20,7 @@ build_options="gir vala"
 build_options_default="gir vala"
 
 pre_configure() {
-	sed -i configure -e 's;if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null);if false;'
-	sed -i configure -e '/CFLAGS=/s/ \-Werror / /'
+	NOCONFIGURE=1 ./autogen.sh
 }
 
 bamf-devel_package() {
@@ -31,7 +30,6 @@ bamf-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/*.so
-		vmove usr/share/gtk-doc
 		if [ "$build_option_gir" ]; then
 			vmove usr/share/gir-1.0
 		fi

From ccb9a064d2c8024d755d5f3bac09c5eb7e85262a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:59:41 -0300
Subject: [PATCH 3/5] libxslt: remove python module.

Only supports python2 at the moment, isn't used by any other package.
---
 srcpkgs/libxslt-python   |  1 -
 srcpkgs/libxslt/template | 24 +++++-------------------
 2 files changed, 5 insertions(+), 20 deletions(-)
 delete mode 120000 srcpkgs/libxslt-python

diff --git a/srcpkgs/libxslt-python b/srcpkgs/libxslt-python
deleted file mode 120000
index fbcaa3cb7ad9..000000000000
--- a/srcpkgs/libxslt-python
+++ /dev/null
@@ -1 +0,0 @@
-libxslt
\ No newline at end of file
diff --git a/srcpkgs/libxslt/template b/srcpkgs/libxslt/template
index 42d80f08ac98..31b395b3ca5b 100644
--- a/srcpkgs/libxslt/template
+++ b/srcpkgs/libxslt/template
@@ -1,11 +1,11 @@
 # Template file for 'libxslt'
 pkgname=libxslt
 version=1.1.34
-revision=4
+revision=5
 build_style=gnu-configure
-configure_args="--disable-static --disable-dependency-tracking"
-hostmakedepends="libtool python-devel libxml2-python pkg-config"
-makedepends="python-devel libxml2-devel libxml2-python libgcrypt-devel"
+configure_args="--disable-static --disable-dependency-tracking --without-python"
+hostmakedepends="libtool pkg-config"
+makedepends="libxml2-devel libgcrypt-devel"
 short_desc="XSLT parser library from the GNOME project"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
@@ -20,12 +20,7 @@ post_configure() {
 	# on don't know how to make target, needed
 	# by Usage:
 	# Makefile is created after configure so fix here
-	find ${wrksrc} -type f -name Makefile | xargs sed -i '/Usage/,/--version/d'
-	if [ "$CROSS_BUILD" ]; then
-		sed -e "s|/usr/include/python2.7|$XBPS_CROSS_BASE/&|g" \
-			-e "s|/usr/lib/python2.7/site-packages|$XBPS_CROSS_BASE/&|g" \
-			-i python/Makefile
-	fi
+	find ${wrksrc} -type f -name Makefile -exec sed -i '/Usage/,/--version/d' '{}' +
 }
 
 post_install() {
@@ -53,12 +48,3 @@ libxslt-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
-
-libxslt-python_package() {
-	lib32disabled=yes
-	short_desc+=" - python extension"
-	pkg_install() {
-		vmove "usr/lib/python*"
-		vmove usr/share/doc/${sourcepkg}-python-${version}
-	}
-}

From 4bda22b01cabb5a17af309cdec80169011e78b8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:02:04 -0300
Subject: [PATCH 4/5] libxml2-python: turn into libxml2-python3.

No package is using the python2 bindings anymore.
---
 .../libxml2-python/patches/py39compat.patch   | 68 -------------------
 .../libxml2-python/patches/python3-utf8.patch | 37 ----------
 srcpkgs/libxml2-python/template               | 34 ----------
 srcpkgs/libxml2-python3                       |  1 -
 srcpkgs/libxml2-python3/template              | 26 +++++++
 5 files changed, 26 insertions(+), 140 deletions(-)
 delete mode 100644 srcpkgs/libxml2-python/patches/py39compat.patch
 delete mode 100644 srcpkgs/libxml2-python/patches/python3-utf8.patch
 delete mode 100644 srcpkgs/libxml2-python/template
 delete mode 120000 srcpkgs/libxml2-python3
 create mode 100644 srcpkgs/libxml2-python3/template

diff --git a/srcpkgs/libxml2-python/patches/py39compat.patch b/srcpkgs/libxml2-python/patches/py39compat.patch
deleted file mode 100644
index c5dbfabbaa4e..000000000000
--- a/srcpkgs/libxml2-python/patches/py39compat.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- python/libxml.c.orig	2020-10-07 14:41:45.226029584 -0400
-+++ 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;
---- python/types.c.orig	2020-10-07 14:41:49.393034304 -0400
-+++ 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-python/patches/python3-utf8.patch b/srcpkgs/libxml2-python/patches/python3-utf8.patch
deleted file mode 100644
index 46a834b6fa45..000000000000
--- a/srcpkgs/libxml2-python/patches/python3-utf8.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Description: work around libxml2 python3 handling of UTF-8 encoded messages
-Author: Jan Matejek
-Source: https://bugzilla.opensuse.org/show_bug.cgi?id=1065270
-
---- python/libxml.c
-+++ python/libxml.c
-@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
-     PyObject *message;
-     PyObject *result;
-     char str[1000];
-+    unsigned char *ptr = (unsigned char *)str;
- 
- #ifdef DEBUG_ERROR
-     printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
-@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
- 	    str[999] = 0;
-         va_end(ap);
- 
-+#if PY_MAJOR_VERSION >= 3
-+        /* Ensure the error string doesn't start at UTF8 continuation. */
-+        while (*ptr && (*ptr & 0xc0) == 0x80)
-+            ptr++;
-+#endif
-+
-         list = PyTuple_New(2);
-         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
-         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
--        message = libxml_charPtrConstWrap(str);
-+        message = libxml_charPtrConstWrap(ptr);
-         PyTuple_SetItem(list, 1, message);
-         result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
-+        /* Forget any errors caused in the error handler. */
-+        PyErr_Clear();
-         Py_XDECREF(list);
-         Py_XDECREF(result);
-     }
-
diff --git a/srcpkgs/libxml2-python/template b/srcpkgs/libxml2-python/template
deleted file mode 100644
index 4208519dac3e..000000000000
--- a/srcpkgs/libxml2-python/template
+++ /dev/null
@@ -1,34 +0,0 @@
-# Template file for 'libxml2-python'
-pkgname=libxml2-python
-version=2.9.10
-revision=3
-wrksrc="${pkgname%-python}-${version}"
-build_wrksrc=python
-build_style=python-module
-hostmakedepends="python-devel python3-devel"
-makedepends="libxml2-devel python-devel python3-devel"
-depends="python python3"
-short_desc="Library providing XML and HTML support - Python2 bindings"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="MIT"
-homepage="http://www.xmlsoft.org/"
-distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
-checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
-
-post_patch() {
-	if [ "${CROSS_BUILD}" ]; then
-		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
-	fi
-}
-
-post_install() {
-	vlicense ../COPYING
-}
-
-libxml2-python3_package() {
-	short_desc="${short_desc/Python2/Python3}"
-	pkg_install() {
-		vmove "usr/lib/python3*"
-		vlicense ../COPYING
-	}
-}
diff --git a/srcpkgs/libxml2-python3 b/srcpkgs/libxml2-python3
deleted file mode 120000
index 7ba590df8660..000000000000
--- a/srcpkgs/libxml2-python3
+++ /dev/null
@@ -1 +0,0 @@
-libxml2-python
\ No newline at end of file
diff --git a/srcpkgs/libxml2-python3/template b/srcpkgs/libxml2-python3/template
new file mode 100644
index 000000000000..b2fa503b0c92
--- /dev/null
+++ b/srcpkgs/libxml2-python3/template
@@ -0,0 +1,26 @@
+# Template file for 'libxml2-python3'
+pkgname=libxml2-python3
+version=2.9.11
+revision=1
+wrksrc="${pkgname%-python3}-${version}"
+build_wrksrc=python
+build_style=python3-module
+hostmakedepends="python3-devel"
+makedepends="libxml2-devel python3-devel"
+depends="python3"
+short_desc="Library providing XML and HTML support - Python3 bindings"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="MIT"
+homepage="http://www.xmlsoft.org/"
+distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
+
+post_patch() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
+	fi
+}
+
+post_install() {
+	vlicense ../COPYING
+}

From 727051b077a4d0ffc4a8aac2e07992ab7fce22a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:07:48 -0300
Subject: [PATCH 5/5] removed-packages: add libxml2-python and libxslt-python

Outdated python2 bindings for the respective libraries.
---
 srcpkgs/removed-packages/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 2232f209ad38..414a80c7a672 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=44
+revision=45
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -300,7 +300,9 @@ replaces="
  vte290<=0.36.5_5
  wireguard-go<=0.0.20181222_2
  wireshark-gtk<=3.0.7_1
+ libxml2-python<=2.9.10
  libxnoise<=0.2.21_4
+ libxslt-python<=1.1.34<=4
  xlennart<=1.1.1_1
  xnoise<=0.2.21_4
  xnoise-devel<=0.2.21_4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
  2021-05-13 19:12 ` [PR PATCH] [Updated] " ericonr
@ 2021-05-13 19:16 ` ericonr
  2021-05-13 20:02 ` ericonr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-05-13 19:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages libxml2
https://github.com/void-linux/void-packages/pull/30833

Update libxml2 and cleanup python2 cruft
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-30833.patch --]
[-- Type: text/x-diff, Size: 16338 bytes --]

From 143a58f9a6f2626fa79b241c520b716c6f56ed5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:44:03 -0300
Subject: [PATCH 1/5] libxml2: update to 2.9.11.

- fixes a bunch of CVEs and arbitrary issues
- don't run autoreconf anymore. Was added in
  66d6f3ef819d1c3fd4a3d772dcd21846f9467001, but isn't necessary anymore.
- the sed command was also outdated
- can build with just gettext and pkg-config in host now
---
 srcpkgs/libxml2/patches/CVE-2019-20388.patch | 32 --------------------
 srcpkgs/libxml2/template                     | 15 ++++-----
 2 files changed, 6 insertions(+), 41 deletions(-)
 delete mode 100644 srcpkgs/libxml2/patches/CVE-2019-20388.patch

diff --git a/srcpkgs/libxml2/patches/CVE-2019-20388.patch b/srcpkgs/libxml2/patches/CVE-2019-20388.patch
deleted file mode 100644
index e1582f299de3..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 <xiezhipeng1@huawei.com>
-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 <xiezhipeng1@huawei.com>
----
- xmlschemas.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/xmlschemas.c b/xmlschemas.c
-index 301c8449..39d92182 100644
---- xmlschemas.c
-+++ 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/template b/srcpkgs/libxml2/template
index c334f505ed0c..5d4815ffc70b 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -3,23 +3,20 @@
 # Please keep this in sync with "srcpkgs/libxml2-python"
 #
 pkgname=libxml2
-version=2.9.10
-revision=4
+version=2.9.11
+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 <gottox@voidlinux.org>"
 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
-}
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
+# tries to run fuzz tests unconditionally and can't find headers for it
+make_check=no
 
 post_install() {
 	vlicense COPYING

From 0ae68f7cc4ccd0c76feb46df965a092134d994e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:58:44 -0300
Subject: [PATCH 2/5] bamf: update to 0.5.5.

Also remove outdated python2 dependencies.
---
 srcpkgs/bamf/template | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/bamf/template b/srcpkgs/bamf/template
index e71e50d826f2..a61f25f88ed0 100644
--- a/srcpkgs/bamf/template
+++ b/srcpkgs/bamf/template
@@ -1,18 +1,18 @@
 # Template file for 'bamf'
 pkgname=bamf
-version=0.5.4
-revision=4
+version=0.5.5
+revision=1
 build_style=gnu-configure
 build_helper="gir"
-hostmakedepends="glib-devel gtk-doc pkg-config python-lxml libxslt-python libxml2-python
- $(vopt_if vala vala)"
+hostmakedepends="glib-devel gtk-doc pkg-config $(vopt_if vala vala)
+ gnome-common which automake libtool gettext"
 makedepends="libglib-devel libgtop-devel libwnck-devel"
 short_desc="Application matching framework"
 maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="LGPL-3.0-only, LGPL-2.1-only, GPL-3.0-or-later"
 homepage="https://launchpad.net/bamf"
-distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.gz"
-checksum=5bb87a5bf46ab1fc9a229a851c0ee4f610d943716a7c83d318f6a8f50d76beb3
+distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.xz"
+checksum=10e642adf5169d46e32b113346bebdad437cddd1ddbd45d16c640cf60cabf5da
 
 CFLAGS="-Wno-cpp -Wno-deprecated-declarations"
 
@@ -20,8 +20,7 @@ build_options="gir vala"
 build_options_default="gir vala"
 
 pre_configure() {
-	sed -i configure -e 's;if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null);if false;'
-	sed -i configure -e '/CFLAGS=/s/ \-Werror / /'
+	NOCONFIGURE=1 ./autogen.sh
 }
 
 bamf-devel_package() {
@@ -31,7 +30,6 @@ bamf-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/*.so
-		vmove usr/share/gtk-doc
 		if [ "$build_option_gir" ]; then
 			vmove usr/share/gir-1.0
 		fi

From 39bfa97b58678ce1a794cacc72f3b9292032aa2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:59:41 -0300
Subject: [PATCH 3/5] libxslt: remove python module.

Only supports python2 at the moment, isn't used by any other package.
---
 srcpkgs/libxslt-python   |  1 -
 srcpkgs/libxslt/template | 26 +++++++-------------------
 2 files changed, 7 insertions(+), 20 deletions(-)
 delete mode 120000 srcpkgs/libxslt-python

diff --git a/srcpkgs/libxslt-python b/srcpkgs/libxslt-python
deleted file mode 120000
index fbcaa3cb7ad9..000000000000
--- a/srcpkgs/libxslt-python
+++ /dev/null
@@ -1 +0,0 @@
-libxslt
\ No newline at end of file
diff --git a/srcpkgs/libxslt/template b/srcpkgs/libxslt/template
index 42d80f08ac98..94ef40759936 100644
--- a/srcpkgs/libxslt/template
+++ b/srcpkgs/libxslt/template
@@ -1,11 +1,11 @@
 # Template file for 'libxslt'
 pkgname=libxslt
 version=1.1.34
-revision=4
+revision=5
 build_style=gnu-configure
-configure_args="--disable-static --disable-dependency-tracking"
-hostmakedepends="libtool python-devel libxml2-python pkg-config"
-makedepends="python-devel libxml2-devel libxml2-python libgcrypt-devel"
+configure_args="--disable-static --disable-dependency-tracking --without-python"
+hostmakedepends="libtool pkg-config"
+makedepends="libxml2-devel libgcrypt-devel"
 short_desc="XSLT parser library from the GNOME project"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
@@ -14,18 +14,15 @@ distfiles="http://xmlsoft.org/sources/libxslt-${version}.tar.gz
 	ftp://xmlsoft.org/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum="98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
  98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f"
+# tests try to access non-existing fields of libxml2 structs
+make_check=no
 
 post_configure() {
 	# Remove missing seperators and errors
 	# on don't know how to make target, needed
 	# by Usage:
 	# Makefile is created after configure so fix here
-	find ${wrksrc} -type f -name Makefile | xargs sed -i '/Usage/,/--version/d'
-	if [ "$CROSS_BUILD" ]; then
-		sed -e "s|/usr/include/python2.7|$XBPS_CROSS_BASE/&|g" \
-			-e "s|/usr/lib/python2.7/site-packages|$XBPS_CROSS_BASE/&|g" \
-			-i python/Makefile
-	fi
+	find ${wrksrc} -type f -name Makefile -exec sed -i '/Usage/,/--version/d' '{}' +
 }
 
 post_install() {
@@ -53,12 +50,3 @@ libxslt-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
-
-libxslt-python_package() {
-	lib32disabled=yes
-	short_desc+=" - python extension"
-	pkg_install() {
-		vmove "usr/lib/python*"
-		vmove usr/share/doc/${sourcepkg}-python-${version}
-	}
-}

From b1e579f79d240911aac1746bf7cea7b322383c3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:02:04 -0300
Subject: [PATCH 4/5] libxml2-python: turn into libxml2-python3.

No package is using the python2 bindings anymore.
---
 .../libxml2-python/patches/py39compat.patch   | 68 -------------------
 .../libxml2-python/patches/python3-utf8.patch | 37 ----------
 srcpkgs/libxml2-python/template               | 34 ----------
 srcpkgs/libxml2-python3                       |  1 -
 srcpkgs/libxml2-python3/template              | 26 +++++++
 5 files changed, 26 insertions(+), 140 deletions(-)
 delete mode 100644 srcpkgs/libxml2-python/patches/py39compat.patch
 delete mode 100644 srcpkgs/libxml2-python/patches/python3-utf8.patch
 delete mode 100644 srcpkgs/libxml2-python/template
 delete mode 120000 srcpkgs/libxml2-python3
 create mode 100644 srcpkgs/libxml2-python3/template

diff --git a/srcpkgs/libxml2-python/patches/py39compat.patch b/srcpkgs/libxml2-python/patches/py39compat.patch
deleted file mode 100644
index c5dbfabbaa4e..000000000000
--- a/srcpkgs/libxml2-python/patches/py39compat.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- python/libxml.c.orig	2020-10-07 14:41:45.226029584 -0400
-+++ 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;
---- python/types.c.orig	2020-10-07 14:41:49.393034304 -0400
-+++ 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-python/patches/python3-utf8.patch b/srcpkgs/libxml2-python/patches/python3-utf8.patch
deleted file mode 100644
index 46a834b6fa45..000000000000
--- a/srcpkgs/libxml2-python/patches/python3-utf8.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Description: work around libxml2 python3 handling of UTF-8 encoded messages
-Author: Jan Matejek
-Source: https://bugzilla.opensuse.org/show_bug.cgi?id=1065270
-
---- python/libxml.c
-+++ python/libxml.c
-@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
-     PyObject *message;
-     PyObject *result;
-     char str[1000];
-+    unsigned char *ptr = (unsigned char *)str;
- 
- #ifdef DEBUG_ERROR
-     printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
-@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
- 	    str[999] = 0;
-         va_end(ap);
- 
-+#if PY_MAJOR_VERSION >= 3
-+        /* Ensure the error string doesn't start at UTF8 continuation. */
-+        while (*ptr && (*ptr & 0xc0) == 0x80)
-+            ptr++;
-+#endif
-+
-         list = PyTuple_New(2);
-         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
-         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
--        message = libxml_charPtrConstWrap(str);
-+        message = libxml_charPtrConstWrap(ptr);
-         PyTuple_SetItem(list, 1, message);
-         result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
-+        /* Forget any errors caused in the error handler. */
-+        PyErr_Clear();
-         Py_XDECREF(list);
-         Py_XDECREF(result);
-     }
-
diff --git a/srcpkgs/libxml2-python/template b/srcpkgs/libxml2-python/template
deleted file mode 100644
index 4208519dac3e..000000000000
--- a/srcpkgs/libxml2-python/template
+++ /dev/null
@@ -1,34 +0,0 @@
-# Template file for 'libxml2-python'
-pkgname=libxml2-python
-version=2.9.10
-revision=3
-wrksrc="${pkgname%-python}-${version}"
-build_wrksrc=python
-build_style=python-module
-hostmakedepends="python-devel python3-devel"
-makedepends="libxml2-devel python-devel python3-devel"
-depends="python python3"
-short_desc="Library providing XML and HTML support - Python2 bindings"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="MIT"
-homepage="http://www.xmlsoft.org/"
-distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
-checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
-
-post_patch() {
-	if [ "${CROSS_BUILD}" ]; then
-		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
-	fi
-}
-
-post_install() {
-	vlicense ../COPYING
-}
-
-libxml2-python3_package() {
-	short_desc="${short_desc/Python2/Python3}"
-	pkg_install() {
-		vmove "usr/lib/python3*"
-		vlicense ../COPYING
-	}
-}
diff --git a/srcpkgs/libxml2-python3 b/srcpkgs/libxml2-python3
deleted file mode 120000
index 7ba590df8660..000000000000
--- a/srcpkgs/libxml2-python3
+++ /dev/null
@@ -1 +0,0 @@
-libxml2-python
\ No newline at end of file
diff --git a/srcpkgs/libxml2-python3/template b/srcpkgs/libxml2-python3/template
new file mode 100644
index 000000000000..b2fa503b0c92
--- /dev/null
+++ b/srcpkgs/libxml2-python3/template
@@ -0,0 +1,26 @@
+# Template file for 'libxml2-python3'
+pkgname=libxml2-python3
+version=2.9.11
+revision=1
+wrksrc="${pkgname%-python3}-${version}"
+build_wrksrc=python
+build_style=python3-module
+hostmakedepends="python3-devel"
+makedepends="libxml2-devel python3-devel"
+depends="python3"
+short_desc="Library providing XML and HTML support - Python3 bindings"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="MIT"
+homepage="http://www.xmlsoft.org/"
+distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
+
+post_patch() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
+	fi
+}
+
+post_install() {
+	vlicense ../COPYING
+}

From d0faaeb0059f3cf2b65bf5601e542814fd6ad86b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:07:48 -0300
Subject: [PATCH 5/5] removed-packages: add libxml2-python and libxslt-python

Outdated python2 bindings for the respective libraries.
---
 srcpkgs/removed-packages/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 2232f209ad38..e0c1fa22d4bc 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=44
+revision=45
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -300,7 +300,9 @@ replaces="
  vte290<=0.36.5_5
  wireguard-go<=0.0.20181222_2
  wireshark-gtk<=3.0.7_1
+ libxml2-python<=2.9.10_3
  libxnoise<=0.2.21_4
+ libxslt-python<=1.1.34_4
  xlennart<=1.1.1_1
  xnoise<=0.2.21_4
  xnoise-devel<=0.2.21_4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
  2021-05-13 19:12 ` [PR PATCH] [Updated] " ericonr
  2021-05-13 19:16 ` ericonr
@ 2021-05-13 20:02 ` ericonr
  2021-05-14 15:15 ` [PR PATCH] [Updated] " ericonr
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-05-13 20:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/30833#issuecomment-840799987

Comment:
Need to update to .12 (just released) and also re-instate the utf8 patch.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
                   ` (2 preceding siblings ...)
  2021-05-13 20:02 ` ericonr
@ 2021-05-14 15:15 ` ericonr
  2021-05-28  3:57 ` ericonr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-05-14 15:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages libxml2
https://github.com/void-linux/void-packages/pull/30833

Update libxml2 and cleanup python2 cruft
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-30833.patch --]
[-- Type: text/x-diff, Size: 15038 bytes --]

From 143a58f9a6f2626fa79b241c520b716c6f56ed5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:44:03 -0300
Subject: [PATCH 1/5] libxml2: update to 2.9.11.

- fixes a bunch of CVEs and arbitrary issues
- don't run autoreconf anymore. Was added in
  66d6f3ef819d1c3fd4a3d772dcd21846f9467001, but isn't necessary anymore.
- the sed command was also outdated
- can build with just gettext and pkg-config in host now
---
 srcpkgs/libxml2/patches/CVE-2019-20388.patch | 32 --------------------
 srcpkgs/libxml2/template                     | 15 ++++-----
 2 files changed, 6 insertions(+), 41 deletions(-)
 delete mode 100644 srcpkgs/libxml2/patches/CVE-2019-20388.patch

diff --git a/srcpkgs/libxml2/patches/CVE-2019-20388.patch b/srcpkgs/libxml2/patches/CVE-2019-20388.patch
deleted file mode 100644
index e1582f299de3..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 <xiezhipeng1@huawei.com>
-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 <xiezhipeng1@huawei.com>
----
- xmlschemas.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/xmlschemas.c b/xmlschemas.c
-index 301c8449..39d92182 100644
---- xmlschemas.c
-+++ 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/template b/srcpkgs/libxml2/template
index c334f505ed0c..5d4815ffc70b 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -3,23 +3,20 @@
 # Please keep this in sync with "srcpkgs/libxml2-python"
 #
 pkgname=libxml2
-version=2.9.10
-revision=4
+version=2.9.11
+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 <gottox@voidlinux.org>"
 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
-}
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
+# tries to run fuzz tests unconditionally and can't find headers for it
+make_check=no
 
 post_install() {
 	vlicense COPYING

From 2027b7a75dfbc8afa6045bab4677a3e48e0a1940 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:58:44 -0300
Subject: [PATCH 2/5] bamf: update to 0.5.5.

Also remove outdated python2 dependencies.
---
 srcpkgs/bamf/template | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/bamf/template b/srcpkgs/bamf/template
index e71e50d826f2..f71add6dedff 100644
--- a/srcpkgs/bamf/template
+++ b/srcpkgs/bamf/template
@@ -1,18 +1,18 @@
 # Template file for 'bamf'
 pkgname=bamf
-version=0.5.4
-revision=4
+version=0.5.5
+revision=1
 build_style=gnu-configure
 build_helper="gir"
-hostmakedepends="glib-devel gtk-doc pkg-config python-lxml libxslt-python libxml2-python
- $(vopt_if vala vala)"
+hostmakedepends="glib-devel gtk-doc pkg-config $(vopt_if vala vala)
+ gnome-common gtk+3-devel which automake libtool gettext"
 makedepends="libglib-devel libgtop-devel libwnck-devel"
 short_desc="Application matching framework"
 maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="LGPL-3.0-only, LGPL-2.1-only, GPL-3.0-or-later"
 homepage="https://launchpad.net/bamf"
-distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.gz"
-checksum=5bb87a5bf46ab1fc9a229a851c0ee4f610d943716a7c83d318f6a8f50d76beb3
+distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.xz"
+checksum=10e642adf5169d46e32b113346bebdad437cddd1ddbd45d16c640cf60cabf5da
 
 CFLAGS="-Wno-cpp -Wno-deprecated-declarations"
 
@@ -20,8 +20,7 @@ build_options="gir vala"
 build_options_default="gir vala"
 
 pre_configure() {
-	sed -i configure -e 's;if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null);if false;'
-	sed -i configure -e '/CFLAGS=/s/ \-Werror / /'
+	NOCONFIGURE=1 ./autogen.sh
 }
 
 bamf-devel_package() {
@@ -31,7 +30,6 @@ bamf-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/*.so
-		vmove usr/share/gtk-doc
 		if [ "$build_option_gir" ]; then
 			vmove usr/share/gir-1.0
 		fi

From f80e17d9b2cc4f4a1b01c17c2e6d8b3cae2e7799 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:59:41 -0300
Subject: [PATCH 3/5] libxslt: remove python module.

Only supports python2 at the moment, isn't used by any other package.
---
 srcpkgs/libxslt-python   |  1 -
 srcpkgs/libxslt/template | 26 +++++++-------------------
 2 files changed, 7 insertions(+), 20 deletions(-)
 delete mode 120000 srcpkgs/libxslt-python

diff --git a/srcpkgs/libxslt-python b/srcpkgs/libxslt-python
deleted file mode 120000
index fbcaa3cb7ad9..000000000000
--- a/srcpkgs/libxslt-python
+++ /dev/null
@@ -1 +0,0 @@
-libxslt
\ No newline at end of file
diff --git a/srcpkgs/libxslt/template b/srcpkgs/libxslt/template
index 42d80f08ac98..94ef40759936 100644
--- a/srcpkgs/libxslt/template
+++ b/srcpkgs/libxslt/template
@@ -1,11 +1,11 @@
 # Template file for 'libxslt'
 pkgname=libxslt
 version=1.1.34
-revision=4
+revision=5
 build_style=gnu-configure
-configure_args="--disable-static --disable-dependency-tracking"
-hostmakedepends="libtool python-devel libxml2-python pkg-config"
-makedepends="python-devel libxml2-devel libxml2-python libgcrypt-devel"
+configure_args="--disable-static --disable-dependency-tracking --without-python"
+hostmakedepends="libtool pkg-config"
+makedepends="libxml2-devel libgcrypt-devel"
 short_desc="XSLT parser library from the GNOME project"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
@@ -14,18 +14,15 @@ distfiles="http://xmlsoft.org/sources/libxslt-${version}.tar.gz
 	ftp://xmlsoft.org/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum="98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
  98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f"
+# tests try to access non-existing fields of libxml2 structs
+make_check=no
 
 post_configure() {
 	# Remove missing seperators and errors
 	# on don't know how to make target, needed
 	# by Usage:
 	# Makefile is created after configure so fix here
-	find ${wrksrc} -type f -name Makefile | xargs sed -i '/Usage/,/--version/d'
-	if [ "$CROSS_BUILD" ]; then
-		sed -e "s|/usr/include/python2.7|$XBPS_CROSS_BASE/&|g" \
-			-e "s|/usr/lib/python2.7/site-packages|$XBPS_CROSS_BASE/&|g" \
-			-i python/Makefile
-	fi
+	find ${wrksrc} -type f -name Makefile -exec sed -i '/Usage/,/--version/d' '{}' +
 }
 
 post_install() {
@@ -53,12 +50,3 @@ libxslt-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
-
-libxslt-python_package() {
-	lib32disabled=yes
-	short_desc+=" - python extension"
-	pkg_install() {
-		vmove "usr/lib/python*"
-		vmove usr/share/doc/${sourcepkg}-python-${version}
-	}
-}

From 11d166899ea13882ffaff983b681ea67a8682669 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:02:04 -0300
Subject: [PATCH 4/5] libxml2-python: turn into libxml2-python3.

No package is using the python2 bindings anymore.
---
 .../libxml2-python/patches/py39compat.patch   | 68 -------------------
 srcpkgs/libxml2-python/template               | 34 ----------
 srcpkgs/libxml2-python3                       |  1 -
 .../patches/python3-utf8.patch                |  0
 srcpkgs/libxml2-python3/template              | 26 +++++++
 5 files changed, 26 insertions(+), 103 deletions(-)
 delete mode 100644 srcpkgs/libxml2-python/patches/py39compat.patch
 delete mode 100644 srcpkgs/libxml2-python/template
 delete mode 120000 srcpkgs/libxml2-python3
 rename srcpkgs/{libxml2-python => libxml2-python3}/patches/python3-utf8.patch (100%)
 create mode 100644 srcpkgs/libxml2-python3/template

diff --git a/srcpkgs/libxml2-python/patches/py39compat.patch b/srcpkgs/libxml2-python/patches/py39compat.patch
deleted file mode 100644
index c5dbfabbaa4e..000000000000
--- a/srcpkgs/libxml2-python/patches/py39compat.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- python/libxml.c.orig	2020-10-07 14:41:45.226029584 -0400
-+++ 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;
---- python/types.c.orig	2020-10-07 14:41:49.393034304 -0400
-+++ 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-python/template b/srcpkgs/libxml2-python/template
deleted file mode 100644
index 4208519dac3e..000000000000
--- a/srcpkgs/libxml2-python/template
+++ /dev/null
@@ -1,34 +0,0 @@
-# Template file for 'libxml2-python'
-pkgname=libxml2-python
-version=2.9.10
-revision=3
-wrksrc="${pkgname%-python}-${version}"
-build_wrksrc=python
-build_style=python-module
-hostmakedepends="python-devel python3-devel"
-makedepends="libxml2-devel python-devel python3-devel"
-depends="python python3"
-short_desc="Library providing XML and HTML support - Python2 bindings"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="MIT"
-homepage="http://www.xmlsoft.org/"
-distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
-checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
-
-post_patch() {
-	if [ "${CROSS_BUILD}" ]; then
-		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
-	fi
-}
-
-post_install() {
-	vlicense ../COPYING
-}
-
-libxml2-python3_package() {
-	short_desc="${short_desc/Python2/Python3}"
-	pkg_install() {
-		vmove "usr/lib/python3*"
-		vlicense ../COPYING
-	}
-}
diff --git a/srcpkgs/libxml2-python3 b/srcpkgs/libxml2-python3
deleted file mode 120000
index 7ba590df8660..000000000000
--- a/srcpkgs/libxml2-python3
+++ /dev/null
@@ -1 +0,0 @@
-libxml2-python
\ No newline at end of file
diff --git a/srcpkgs/libxml2-python/patches/python3-utf8.patch b/srcpkgs/libxml2-python3/patches/python3-utf8.patch
similarity index 100%
rename from srcpkgs/libxml2-python/patches/python3-utf8.patch
rename to srcpkgs/libxml2-python3/patches/python3-utf8.patch
diff --git a/srcpkgs/libxml2-python3/template b/srcpkgs/libxml2-python3/template
new file mode 100644
index 000000000000..b2fa503b0c92
--- /dev/null
+++ b/srcpkgs/libxml2-python3/template
@@ -0,0 +1,26 @@
+# Template file for 'libxml2-python3'
+pkgname=libxml2-python3
+version=2.9.11
+revision=1
+wrksrc="${pkgname%-python3}-${version}"
+build_wrksrc=python
+build_style=python3-module
+hostmakedepends="python3-devel"
+makedepends="libxml2-devel python3-devel"
+depends="python3"
+short_desc="Library providing XML and HTML support - Python3 bindings"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="MIT"
+homepage="http://www.xmlsoft.org/"
+distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
+
+post_patch() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
+	fi
+}
+
+post_install() {
+	vlicense ../COPYING
+}

From 7c8069bc784e6a895a6440eda6ed31479d0b6e79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:07:48 -0300
Subject: [PATCH 5/5] removed-packages: add libxml2-python and libxslt-python

Outdated python2 bindings for the respective libraries.
---
 srcpkgs/removed-packages/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 2232f209ad38..e0c1fa22d4bc 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=44
+revision=45
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -300,7 +300,9 @@ replaces="
  vte290<=0.36.5_5
  wireguard-go<=0.0.20181222_2
  wireshark-gtk<=3.0.7_1
+ libxml2-python<=2.9.10_3
  libxnoise<=0.2.21_4
+ libxslt-python<=1.1.34_4
  xlennart<=1.1.1_1
  xnoise<=0.2.21_4
  xnoise-devel<=0.2.21_4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
                   ` (3 preceding siblings ...)
  2021-05-14 15:15 ` [PR PATCH] [Updated] " ericonr
@ 2021-05-28  3:57 ` ericonr
  2021-06-07 18:28 ` ericonr
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-05-28  3:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages libxml2
https://github.com/void-linux/void-packages/pull/30833

Update libxml2 and cleanup python2 cruft
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-30833.patch --]
[-- Type: text/x-diff, Size: 14949 bytes --]

From 22014e4df6681cca80b007898357471569e961d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:44:03 -0300
Subject: [PATCH 1/5] libxml2: update to 2.9.12.

- fixes a bunch of CVEs and arbitrary issues
- don't run autoreconf anymore. Was added in
  66d6f3ef819d1c3fd4a3d772dcd21846f9467001, but isn't necessary anymore.
- the sed command was also outdated
- can build with just gettext and pkg-config in host now
---
 srcpkgs/libxml2/patches/CVE-2019-20388.patch | 32 --------------------
 srcpkgs/libxml2/template                     | 13 +++-----
 2 files changed, 4 insertions(+), 41 deletions(-)
 delete mode 100644 srcpkgs/libxml2/patches/CVE-2019-20388.patch

diff --git a/srcpkgs/libxml2/patches/CVE-2019-20388.patch b/srcpkgs/libxml2/patches/CVE-2019-20388.patch
deleted file mode 100644
index e1582f299de3..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 <xiezhipeng1@huawei.com>
-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 <xiezhipeng1@huawei.com>
----
- xmlschemas.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/xmlschemas.c b/xmlschemas.c
-index 301c8449..39d92182 100644
---- xmlschemas.c
-+++ 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/template b/srcpkgs/libxml2/template
index c334f505ed0c..81660e01df3c 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -3,23 +3,18 @@
 # Please keep this in sync with "srcpkgs/libxml2-python"
 #
 pkgname=libxml2
-version=2.9.10
-revision=4
+version=2.9.12
+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 <gottox@voidlinux.org>"
 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
-}
+checksum=c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92
 
 post_install() {
 	vlicense COPYING

From 962268ee3d3e2e957b8583b0ccd48d2b87ff6334 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:58:44 -0300
Subject: [PATCH 2/5] bamf: update to 0.5.5.

Also remove outdated python2 dependencies.
---
 srcpkgs/bamf/template | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/bamf/template b/srcpkgs/bamf/template
index e71e50d826f2..f71add6dedff 100644
--- a/srcpkgs/bamf/template
+++ b/srcpkgs/bamf/template
@@ -1,18 +1,18 @@
 # Template file for 'bamf'
 pkgname=bamf
-version=0.5.4
-revision=4
+version=0.5.5
+revision=1
 build_style=gnu-configure
 build_helper="gir"
-hostmakedepends="glib-devel gtk-doc pkg-config python-lxml libxslt-python libxml2-python
- $(vopt_if vala vala)"
+hostmakedepends="glib-devel gtk-doc pkg-config $(vopt_if vala vala)
+ gnome-common gtk+3-devel which automake libtool gettext"
 makedepends="libglib-devel libgtop-devel libwnck-devel"
 short_desc="Application matching framework"
 maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="LGPL-3.0-only, LGPL-2.1-only, GPL-3.0-or-later"
 homepage="https://launchpad.net/bamf"
-distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.gz"
-checksum=5bb87a5bf46ab1fc9a229a851c0ee4f610d943716a7c83d318f6a8f50d76beb3
+distfiles="https://launchpad.net/bamf/${version%.*}/${version}/+download/${pkgname}-${version}.tar.xz"
+checksum=10e642adf5169d46e32b113346bebdad437cddd1ddbd45d16c640cf60cabf5da
 
 CFLAGS="-Wno-cpp -Wno-deprecated-declarations"
 
@@ -20,8 +20,7 @@ build_options="gir vala"
 build_options_default="gir vala"
 
 pre_configure() {
-	sed -i configure -e 's;if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null);if false;'
-	sed -i configure -e '/CFLAGS=/s/ \-Werror / /'
+	NOCONFIGURE=1 ./autogen.sh
 }
 
 bamf-devel_package() {
@@ -31,7 +30,6 @@ bamf-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/*.so
-		vmove usr/share/gtk-doc
 		if [ "$build_option_gir" ]; then
 			vmove usr/share/gir-1.0
 		fi

From 72b8381a7d450e4a4bcd816f8d286dcdbb83d875 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 15:59:41 -0300
Subject: [PATCH 3/5] libxslt: remove python module.

Only supports python2 at the moment, isn't used by any other package.
---
 srcpkgs/libxslt-python   |  1 -
 srcpkgs/libxslt/template | 26 +++++++-------------------
 2 files changed, 7 insertions(+), 20 deletions(-)
 delete mode 120000 srcpkgs/libxslt-python

diff --git a/srcpkgs/libxslt-python b/srcpkgs/libxslt-python
deleted file mode 120000
index fbcaa3cb7ad9..000000000000
--- a/srcpkgs/libxslt-python
+++ /dev/null
@@ -1 +0,0 @@
-libxslt
\ No newline at end of file
diff --git a/srcpkgs/libxslt/template b/srcpkgs/libxslt/template
index 42d80f08ac98..94ef40759936 100644
--- a/srcpkgs/libxslt/template
+++ b/srcpkgs/libxslt/template
@@ -1,11 +1,11 @@
 # Template file for 'libxslt'
 pkgname=libxslt
 version=1.1.34
-revision=4
+revision=5
 build_style=gnu-configure
-configure_args="--disable-static --disable-dependency-tracking"
-hostmakedepends="libtool python-devel libxml2-python pkg-config"
-makedepends="python-devel libxml2-devel libxml2-python libgcrypt-devel"
+configure_args="--disable-static --disable-dependency-tracking --without-python"
+hostmakedepends="libtool pkg-config"
+makedepends="libxml2-devel libgcrypt-devel"
 short_desc="XSLT parser library from the GNOME project"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
@@ -14,18 +14,15 @@ distfiles="http://xmlsoft.org/sources/libxslt-${version}.tar.gz
 	ftp://xmlsoft.org/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum="98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
  98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f"
+# tests try to access non-existing fields of libxml2 structs
+make_check=no
 
 post_configure() {
 	# Remove missing seperators and errors
 	# on don't know how to make target, needed
 	# by Usage:
 	# Makefile is created after configure so fix here
-	find ${wrksrc} -type f -name Makefile | xargs sed -i '/Usage/,/--version/d'
-	if [ "$CROSS_BUILD" ]; then
-		sed -e "s|/usr/include/python2.7|$XBPS_CROSS_BASE/&|g" \
-			-e "s|/usr/lib/python2.7/site-packages|$XBPS_CROSS_BASE/&|g" \
-			-i python/Makefile
-	fi
+	find ${wrksrc} -type f -name Makefile -exec sed -i '/Usage/,/--version/d' '{}' +
 }
 
 post_install() {
@@ -53,12 +50,3 @@ libxslt-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
-
-libxslt-python_package() {
-	lib32disabled=yes
-	short_desc+=" - python extension"
-	pkg_install() {
-		vmove "usr/lib/python*"
-		vmove usr/share/doc/${sourcepkg}-python-${version}
-	}
-}

From d1cc73e3a38810b3d57ab377c19f7e091020ca80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:02:04 -0300
Subject: [PATCH 4/5] libxml2-python: turn into libxml2-python3.

No package is using the python2 bindings anymore.
---
 .../libxml2-python/patches/py39compat.patch   | 68 -------------------
 srcpkgs/libxml2-python/template               | 34 ----------
 srcpkgs/libxml2-python3                       |  1 -
 .../patches/python3-utf8.patch                |  0
 srcpkgs/libxml2-python3/template              | 26 +++++++
 5 files changed, 26 insertions(+), 103 deletions(-)
 delete mode 100644 srcpkgs/libxml2-python/patches/py39compat.patch
 delete mode 100644 srcpkgs/libxml2-python/template
 delete mode 120000 srcpkgs/libxml2-python3
 rename srcpkgs/{libxml2-python => libxml2-python3}/patches/python3-utf8.patch (100%)
 create mode 100644 srcpkgs/libxml2-python3/template

diff --git a/srcpkgs/libxml2-python/patches/py39compat.patch b/srcpkgs/libxml2-python/patches/py39compat.patch
deleted file mode 100644
index c5dbfabbaa4e..000000000000
--- a/srcpkgs/libxml2-python/patches/py39compat.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- python/libxml.c.orig	2020-10-07 14:41:45.226029584 -0400
-+++ 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;
---- python/types.c.orig	2020-10-07 14:41:49.393034304 -0400
-+++ 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-python/template b/srcpkgs/libxml2-python/template
deleted file mode 100644
index 4208519dac3e..000000000000
--- a/srcpkgs/libxml2-python/template
+++ /dev/null
@@ -1,34 +0,0 @@
-# Template file for 'libxml2-python'
-pkgname=libxml2-python
-version=2.9.10
-revision=3
-wrksrc="${pkgname%-python}-${version}"
-build_wrksrc=python
-build_style=python-module
-hostmakedepends="python-devel python3-devel"
-makedepends="libxml2-devel python-devel python3-devel"
-depends="python python3"
-short_desc="Library providing XML and HTML support - Python2 bindings"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="MIT"
-homepage="http://www.xmlsoft.org/"
-distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
-checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
-
-post_patch() {
-	if [ "${CROSS_BUILD}" ]; then
-		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
-	fi
-}
-
-post_install() {
-	vlicense ../COPYING
-}
-
-libxml2-python3_package() {
-	short_desc="${short_desc/Python2/Python3}"
-	pkg_install() {
-		vmove "usr/lib/python3*"
-		vlicense ../COPYING
-	}
-}
diff --git a/srcpkgs/libxml2-python3 b/srcpkgs/libxml2-python3
deleted file mode 120000
index 7ba590df8660..000000000000
--- a/srcpkgs/libxml2-python3
+++ /dev/null
@@ -1 +0,0 @@
-libxml2-python
\ No newline at end of file
diff --git a/srcpkgs/libxml2-python/patches/python3-utf8.patch b/srcpkgs/libxml2-python3/patches/python3-utf8.patch
similarity index 100%
rename from srcpkgs/libxml2-python/patches/python3-utf8.patch
rename to srcpkgs/libxml2-python3/patches/python3-utf8.patch
diff --git a/srcpkgs/libxml2-python3/template b/srcpkgs/libxml2-python3/template
new file mode 100644
index 000000000000..b2fa503b0c92
--- /dev/null
+++ b/srcpkgs/libxml2-python3/template
@@ -0,0 +1,26 @@
+# Template file for 'libxml2-python3'
+pkgname=libxml2-python3
+version=2.9.11
+revision=1
+wrksrc="${pkgname%-python3}-${version}"
+build_wrksrc=python
+build_style=python3-module
+hostmakedepends="python3-devel"
+makedepends="libxml2-devel python3-devel"
+depends="python3"
+short_desc="Library providing XML and HTML support - Python3 bindings"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="MIT"
+homepage="http://www.xmlsoft.org/"
+distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
+checksum=886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331
+
+post_patch() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
+	fi
+}
+
+post_install() {
+	vlicense ../COPYING
+}

From 117aac08eb73d15ee71bc724021a86bc55e55212 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Thu, 13 May 2021 16:07:48 -0300
Subject: [PATCH 5/5] removed-packages: add libxml2-python and libxslt-python

Outdated python2 bindings for the respective libraries.
---
 srcpkgs/removed-packages/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 09bd3a3ab01d..7c09ad2b3aa6 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=44
+revision=45
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -302,7 +302,9 @@ replaces="
  vte290<=0.36.5_5
  wireguard-go<=0.0.20181222_2
  wireshark-gtk<=3.0.7_1
+ libxml2-python<=2.9.10_3
  libxnoise<=0.2.21_4
+ libxslt-python<=1.1.34_4
  xlennart<=1.1.1_1
  xnoise<=0.2.21_4
  xnoise-devel<=0.2.21_4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
                   ` (4 preceding siblings ...)
  2021-05-28  3:57 ` ericonr
@ 2021-06-07 18:28 ` ericonr
  2022-02-22  1:26 ` tibequadorian
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-06-07 18:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/30833#issuecomment-856164266

Comment:
I'm allowing arch to stress test for us, see https://bugs.archlinux.org/task/71161 for example. (fix has landed upstream, no release yet).

There are probably a bunch of other breakages, this update will have to wait.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
                   ` (5 preceding siblings ...)
  2021-06-07 18:28 ` ericonr
@ 2022-02-22  1:26 ` tibequadorian
  2022-02-23 17:48 ` [PR PATCH] [Closed]: " leahneukirchen
  2022-02-23 17:48 ` leahneukirchen
  8 siblings, 0 replies; 10+ messages in thread
From: tibequadorian @ 2022-02-22  1:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

New comment by tibequadorian on void-packages repository

https://github.com/void-linux/void-packages/pull/30833#issuecomment-1047342130

Comment:
New release: https://gitlab.gnome.org/GNOME/libxml2/-/releases#v2.9.13

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
                   ` (7 preceding siblings ...)
  2022-02-23 17:48 ` [PR PATCH] [Closed]: " leahneukirchen
@ 2022-02-23 17:48 ` leahneukirchen
  8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2022-02-23 17:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 159 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/30833#issuecomment-1049047143

Comment:
Obsoleted.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Closed]: Update libxml2 and cleanup python2 cruft
  2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
                   ` (6 preceding siblings ...)
  2022-02-22  1:26 ` tibequadorian
@ 2022-02-23 17:48 ` leahneukirchen
  2022-02-23 17:48 ` leahneukirchen
  8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2022-02-23 17:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

There's a closed pull request on the void-packages repository

Update libxml2 and cleanup python2 cruft
https://github.com/void-linux/void-packages/pull/30833

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-02-23 17:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 19:04 [PR PATCH] Update libxml2 and cleanup python2 cruft ericonr
2021-05-13 19:12 ` [PR PATCH] [Updated] " ericonr
2021-05-13 19:16 ` ericonr
2021-05-13 20:02 ` ericonr
2021-05-14 15:15 ` [PR PATCH] [Updated] " ericonr
2021-05-28  3:57 ` ericonr
2021-06-07 18:28 ` ericonr
2022-02-22  1:26 ` tibequadorian
2022-02-23 17:48 ` [PR PATCH] [Closed]: " leahneukirchen
2022-02-23 17:48 ` leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).