[PATCH] gnu: libxml2: Update to 2.11.4

  • Done
  • quality assurance status badge
Details
3 participants
  • Andreas Enge
  • Andy Tai
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Andy Tai
Severity
normal
A
A
Andy Tai wrote on 12 Jun 2023 10:03
(address . guix-patches@gnu.org)(name . Andy Tai)(address . atai@atai.org)
6996b9b078528ad04b159a83f29ecd8adf7f79c4.1686556929.git.atai@atai.org
* gnu/packages/xml.scm (libxml2): Update to 2.11.4
* gnu/packages/patches/python-libxml2-utf8.patch: Remove as
patch no longer necessary; original issue fixed upstream
* gnu/local.mk: Remove reference to deleted patch
---
gnu/local.mk | 1 -
.../patches/python-libxml2-utf8.patch | 40 -------------------
gnu/packages/xml.scm | 11 ++---
3 files changed, 4 insertions(+), 48 deletions(-)
delete mode 100644 gnu/packages/patches/python-libxml2-utf8.patch

Toggle diff (105 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ce16d37e2b..6f0fee2d34 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1803,7 +1803,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-pyfakefs-remove-bad-test.patch \
%D%/packages/patches/python-pyflakes-test-location.patch \
%D%/packages/patches/python-flint-includes.patch \
- %D%/packages/patches/python-libxml2-utf8.patch \
%D%/packages/patches/python-memcached-syntax-warnings.patch \
%D%/packages/patches/python-mox3-python3.6-compat.patch \
%D%/packages/patches/python-parso-unit-tests-in-3.10.patch \
diff --git a/gnu/packages/patches/python-libxml2-utf8.patch b/gnu/packages/patches/python-libxml2-utf8.patch
deleted file mode 100644
index e39672faa1..0000000000
--- a/gnu/packages/patches/python-libxml2-utf8.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-This patch fixes a crash in the libxml2 bindings for Python 3.x
-that 'itstool' stumbles upon when processing UTF-8 data:
-
- https://issues.guix.gnu.org/issue/37468
-
-Patch by Jan Matejek
-from <https://bugzilla.opensuse.org/show_bug.cgi?id=1065270>.
-
---- libxml2-2.9.5.orig/python/libxml.c
-+++ libxml2-2.9.5/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/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 8d9974b825..bbb91fbe6b 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -182,7 +182,7 @@ (define-public libebml
(define-public libxml2
(package
(name "libxml2")
- (version "2.9.14")
+ (version "2.11.4")
(source (origin
(method url-fetch)
(uri (string-append "https://download.gnome.org/sources/libxml2/"
@@ -190,7 +190,7 @@ (define-public libxml2
version ".tar.xz"))
(sha256
(base32
- "1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0"))))
+ "1xspgyswllk26g7jg95pnkfk1gqpzna28fm1kir3kwdki9ziszkk"))))
(build-system gnu-build-system)
(outputs '("out" "static" "doc"))
(arguments
@@ -221,7 +221,7 @@ (define-public libxml2
(synopsis "C parser for XML")
(inputs (list xz))
(propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
- (native-inputs (list perl))
+ (native-inputs (list perl python-minimal-wrapper pkg-config))
;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
;; sub-directory of any given package.
(native-search-paths (list (search-path-specification
@@ -253,10 +253,7 @@ (define-public python-libxml2
(package/inherit libxml2
(name "python-libxml2")
(source (origin
- (inherit (package-source libxml2))
- (patches
- (append (search-patches "python-libxml2-utf8.patch")
- (origin-patches (package-source libxml2))))))
+ (inherit (package-source libxml2))))
(build-system python-build-system)
(outputs '("out"))
(arguments

base-commit: 6fe9a004dba2d4ddf69ff6f1714af15ffaa7e62a
--
2.40.1
A
A
Andy Tai wrote on 12 Jun 2023 10:47
[PATCH v2] gnu: libxml2: Update to 2.11.4
(address . 64012@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
47194cb3bb60df88f4fb1ef727fe52031671a31b.1686559603.git.atai@atai.org
* gnu/packages/xml.scm (libxml2): Update to 2.11.4
(python-libxml2) [arguments] phase: (configure): Invoke
autoge.sh explicitly first as now setup.py is generated
from autotools configure step
[inputs]: Add autotools so autotools configure step can run
* gnu/packages/patches/python-libxml2-utf8.patch: Remove as
patch no longer necessary; original issue fixed upstream
* gnu/local.mk: Remove reference to deleted patch
---
gnu/local.mk | 1 -
.../patches/python-libxml2-utf8.patch | 40 -------------------
gnu/packages/xml.scm | 20 ++++++----
3 files changed, 13 insertions(+), 48 deletions(-)
delete mode 100644 gnu/packages/patches/python-libxml2-utf8.patch

Toggle diff (124 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ce16d37e2b..6f0fee2d34 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1803,7 +1803,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-pyfakefs-remove-bad-test.patch \
%D%/packages/patches/python-pyflakes-test-location.patch \
%D%/packages/patches/python-flint-includes.patch \
- %D%/packages/patches/python-libxml2-utf8.patch \
%D%/packages/patches/python-memcached-syntax-warnings.patch \
%D%/packages/patches/python-mox3-python3.6-compat.patch \
%D%/packages/patches/python-parso-unit-tests-in-3.10.patch \
diff --git a/gnu/packages/patches/python-libxml2-utf8.patch b/gnu/packages/patches/python-libxml2-utf8.patch
deleted file mode 100644
index e39672faa1..0000000000
--- a/gnu/packages/patches/python-libxml2-utf8.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-This patch fixes a crash in the libxml2 bindings for Python 3.x
-that 'itstool' stumbles upon when processing UTF-8 data:
-
- https://issues.guix.gnu.org/issue/37468
-
-Patch by Jan Matejek
-from <https://bugzilla.opensuse.org/show_bug.cgi?id=1065270>.
-
---- libxml2-2.9.5.orig/python/libxml.c
-+++ libxml2-2.9.5/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/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 8d9974b825..314efbfb28 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -182,7 +182,7 @@ (define-public libebml
(define-public libxml2
(package
(name "libxml2")
- (version "2.9.14")
+ (version "2.11.4")
(source (origin
(method url-fetch)
(uri (string-append "https://download.gnome.org/sources/libxml2/"
@@ -190,7 +190,7 @@ (define-public libxml2
version ".tar.xz"))
(sha256
(base32
- "1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0"))))
+ "1xspgyswllk26g7jg95pnkfk1gqpzna28fm1kir3kwdki9ziszkk"))))
(build-system gnu-build-system)
(outputs '("out" "static" "doc"))
(arguments
@@ -221,7 +221,7 @@ (define-public libxml2
(synopsis "C parser for XML")
(inputs (list xz))
(propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
- (native-inputs (list perl))
+ (native-inputs (list perl python-minimal-wrapper pkg-config))
;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
;; sub-directory of any given package.
(native-search-paths (list (search-path-specification
@@ -253,20 +253,26 @@ (define-public python-libxml2
(package/inherit libxml2
(name "python-libxml2")
(source (origin
- (inherit (package-source libxml2))
- (patches
- (append (search-patches "python-libxml2-utf8.patch")
- (origin-patches (package-source libxml2))))))
+ (inherit (package-source libxml2))))
(build-system python-build-system)
(outputs '("out"))
+
+ (native-inputs (list pkg-config autoconf-wrapper automake libtool perl python-minimal-wrapper))
+ ; needed to generate setup.py
+
(arguments
(list
;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
#:tests? #f
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'set-env
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ #t))
(add-before 'build 'configure
(lambda* (#:key inputs #:allow-other-keys)
+ (invoke "sh" "autogen.sh")
(chdir "python")
(let ((libxml2-headers (search-input-directory
inputs "include/libxml2")))

base-commit: 6fe9a004dba2d4ddf69ff6f1714af15ffaa7e62a
--
2.40.1
L
L
Liliana Marie Prikler wrote on 12 Jun 2023 20:40
f4155bbd7e95078024aa221072b941be6d01b86f.camel@gmail.com
Hi Andy,

Am Montag, dem 12.06.2023 um 01:47 -0700 schrieb Andy Tai:
Toggle quote (1 lines)
> * gnu/packages/xml.scm (libxml2): Update to 2.11.4
That's a world rebuild. Use a graft instead.

Toggle quote (3 lines)
>   (python-libxml2) [arguments] phase: (configure): Invoke
>   autoge.sh explicitly first as now setup.py is generated
>   from autotools configure step
Use a pre-configure bootstrap phase instead to invoke autogen.sh.
Proper ChangeLog would be (python-libxml2)[#:phases]: Add ‘bootstrap’
or (python-libxml2)[arguments]<#:phases>: Add ‘bootstrap’.

Toggle quote (1 lines)
>   [inputs]: Add autotools so autotools configure step can run
You don't need to justify the obvious. When something about the patch
is not obvious, it ought to be explained before the ChangeLog.

Toggle quote (5 lines)
> * gnu/packages/patches/python-libxml2-utf8.patch: Remove as
>   patch no longer necessary; original issue fixed upstream
>   (see
> https://gitlab.gnome.org/GNOME/libxml2/-/commit/76c6da420923f2721a2e16adfcef8707a2454a1b
> )
Removed file is enough.

Toggle quote (1 lines)
> * gnu/local.mk: Remove reference to deleted patch
It's always nice to mention dist_patch_DATA :)


Cheers
A
A
Andy Tai wrote on 12 Jun 2023 20:52
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 64012@debbugs.gnu.org)
CAJsg1E-PkjwfGYqcQo4d0MoB1z1vt9PGLKb3afqyC8TREyxGMg@mail.gmail.com
On Mon, Jun 12, 2023 at 11:40?AM Liliana Marie Prikler <
liliana.prikler@gmail.com> wrote:

Toggle quote (5 lines)
> Am Montag, dem 12.06.2023 um 01:47 -0700 schrieb Andy Tai:
> > * gnu/packages/xml.scm (libxml2): Update to 2.11.4
> That's a world rebuild. Use a graft instead.
>

Liliana, thanks for the review. Can you give more hints on how to use a
graft? I do not know how that is done, Thanks
Attachment: file
L
L
Liliana Marie Prikler wrote on 12 Jun 2023 21:38
(name . Andy Tai)(address . atai@atai.org)(address . 64012@debbugs.gnu.org)
01e873fc4557187d83ef0318cb6f143b44c91c59.camel@gmail.com
Am Montag, dem 12.06.2023 um 11:52 -0700 schrieb Andy Tai:
Toggle quote (10 lines)
>
>
> On Mon, Jun 12, 2023 at 11:40?AM Liliana Marie Prikler
> <liliana.prikler@gmail.com> wrote:
> > Am Montag, dem 12.06.2023 um 01:47 -0700 schrieb Andy Tai:
> > > * gnu/packages/xml.scm (libxml2): Update to 2.11.4
> > That's a world rebuild.  Use a graft instead.
>
> Liliana, thanks for the review.  Can you give more hints on how to
> use a graft?  I do not know how that is done, Thanks
You add a (replacement some-other-variable) field to the existing
record and then 
(define some-other-variable 
(package (inherit existing)
...))

Cheers
A
A
Andy Tai wrote on 13 Jun 2023 07:01
[PATCH v3] gnu: libxml2: Add version 2.11.4
(name . Andy Tai)(address . atai@atai.org)
536cd0b0eb1ac6f618f1b03ea722432e267b7bbd.1686632370.git.atai@atai.org
* gnu/packages/xml.scm (libxml2-next): Version 2.11.4 as new variable
(python-libxml2-next): Version 2.11.4 as new variable

* gnu/packages/glib.scm (itstool) [inputs]: Switch to libxml2-next
and python-libxml2-next
---
gnu/packages/glib.scm | 5 +++-
gnu/packages/xml.scm | 64 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 1 deletion(-)

Toggle diff (109 lines)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index e988e8dc87..40dbd8f951 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -674,7 +674,10 @@ (define itstool
"1jl7gsr7aclb9nvqazr039m86y7f7ivfhl2pixcrbfqjkb97r6kb"))))
(build-system gnu-build-system)
(inputs
- (list libxml2 python-libxml2 python))
+ (list libxml2-next python-libxml2-next python))
+ ;; libxml2-next contains upstream fix for crash on UTF-8 data
+ ;; https://gitlab.gnome.org/GNOME/libxml2/-/commit/76c6da420923f2721a2e16adfcef8707a2454a1b
+ ;; so we change dependency to the new libxml2 version
(arguments
(list
#:phases
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 8d9974b825..74976f7402 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -191,6 +191,9 @@ (define-public libxml2
(sha256
(base32
"1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0"))))
+ ;; TODO: remove once migrated to libxml2-next as upstream has
+ ;; proper fix in libxml2 2.11.4
+ ;; defined as libxml2-next below for now
(build-system gnu-build-system)
(outputs '("out" "static" "doc"))
(arguments
@@ -249,6 +252,25 @@ (define-public libxml2-xpath0
provides an @code{--xpath0} option to @command{xmllint} that enables it
to output XPath results with a null delimiter.")))
+
+;; libxml2-next contains upstream fix for itstool crash on UTF-8 data
+;; https://gitlab.gnome.org/GNOME/libxml2/-/commit/76c6da420923f2721a2e16adfcef8707a2454a1b
+;; so we need to being in the new libxml2 version
+;; for itstool to depend on to avoid crash
+(define-public libxml2-next
+ (package/inherit libxml2
+ (version "2.11.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.gnome.org/sources/libxml2/"
+ (version-major+minor version) "/libxml2-" version
+ ".tar.xz"))
+ (sha256 (base32
+ "1xspgyswllk26g7jg95pnkfk1gqpzna28fm1kir3kwdki9ziszkk"))))
+ (native-inputs (list perl python-minimal-wrapper pkg-config))))
+
+
(define-public python-libxml2
(package/inherit libxml2
(name "python-libxml2")
@@ -278,6 +300,48 @@ (define-public python-libxml2
(inputs (list libxml2))
(synopsis "Python bindings for the libxml2 library")))
+(define-public python-libxml2-next
+ (package/inherit python-libxml2
+ (version "2.11.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.gnome.org/sources/libxml2/"
+ (version-major+minor version) "/libxml2-" version
+ ".tar.xz"))
+ (sha256 (base32
+ "1xspgyswllk26g7jg95pnkfk1gqpzna28fm1kir3kwdki9ziszkk"))))
+
+ (native-inputs (list pkg-config
+ autoconf-wrapper
+ automake
+ libtool
+ perl
+ python-minimal-wrapper))
+ ;; needed to generate setup.py
+
+ (arguments (list
+ ;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-env
+ (lambda _
+ (setenv "CONFIG_SHELL"
+ (which "sh")) #t))
+ (add-before 'build 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "sh" "autogen.sh")
+ (chdir "python")
+ (let ((libxml2-headers (search-input-directory
+ inputs
+ "include/libxml2")))
+ (substitute* "setup.py"
+ ;; The build system ignores C_INCLUDE_PATH & co, so
+ ;; provide the absolute directory name.
+ (("/opt/include")
+ (dirname libxml2-headers)))))))))
+ (inputs (list libxml2-next))))
+
(define-public libxlsxwriter
(package
(name "libxlsxwriter")

base-commit: 6fe9a004dba2d4ddf69ff6f1714af15ffaa7e62a
--
2.40.1
L
L
Liliana Marie Prikler wrote on 13 Jun 2023 20:26
1111d26e2adb44bfed9c4264568afa3d337e10c1.camel@gmail.com
Am Montag, dem 12.06.2023 um 22:01 -0700 schrieb Andy Tai:
Toggle quote (2 lines)
> * gnu/packages/xml.scm (libxml2-next): Version 2.11.4 as new variable
>   (python-libxml2-next): Version 2.11.4 as new variable
One patch per package, please :)

Toggle quote (2 lines)
> * gnu/packages/glib.scm (itstool) [inputs]: Switch to libxml2-next
>   and python-libxml2-next
Still a world rebuild as far as I can see. Use grafts :)


Cheers
A
A
Andy Tai wrote on 14 Jun 2023 08:04
[PATCH v4 1/3] gnu: libxml2: Add version 2.11.4
(address . 64012@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
3afe9802dd9c7006c4164c28169feb983c43be42.1686722470.git.atai@atai.org
* gnu/packages/xml.scm (libxml2-next): Version 2.11.4 as new variable
---
gnu/packages/xml.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 8d9974b825..eaaa93fe14 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -191,6 +191,9 @@ (define-public libxml2
(sha256
(base32
"1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0"))))
+ ;; TODO: remove once migrated to libxml2-next as upstream has
+ ;; proper fix in libxml2 2.11.4
+ ;; defined as libxml2-next below for now
(build-system gnu-build-system)
(outputs '("out" "static" "doc"))
(arguments
@@ -249,6 +252,25 @@ (define-public libxml2-xpath0
provides an @code{--xpath0} option to @command{xmllint} that enables it
to output XPath results with a null delimiter.")))
+
+;; libxml2-next contains upstream fix for itstool crash on UTF-8 data
+;; https://gitlab.gnome.org/GNOME/libxml2/-/commit/76c6da420923f2721a2e16adfcef8707a2454a1b
+;; so we need to being in the new libxml2 version
+;; for itstool to depend on to avoid crash
+(define-public libxml2-next
+ (package/inherit libxml2
+ (version "2.11.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.gnome.org/sources/libxml2/"
+ (version-major+minor version) "/libxml2-" version
+ ".tar.xz"))
+ (sha256 (base32
+ "1xspgyswllk26g7jg95pnkfk1gqpzna28fm1kir3kwdki9ziszkk"))))
+ (native-inputs (list perl python-minimal-wrapper pkg-config))))
+
+
(define-public python-libxml2
(package/inherit libxml2
(name "python-libxml2")

base-commit: 6fe9a004dba2d4ddf69ff6f1714af15ffaa7e62a
--
2.40.1
A
A
Andy Tai wrote on 14 Jun 2023 08:04
[PATCH v4 2/3] Ignu: python-libxml2: Add version 2.11.4
(address . 64012@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
b3589769e9915cac46e0aaee5a885745cfd11f14.1686722470.git.atai@atai.org
* gnu/packages/xml.scm (python-libxml2-next): Version 2.11.4 as new variable
---
gnu/packages/xml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index eaaa93fe14..74976f7402 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -300,6 +300,48 @@ (define-public python-libxml2
(inputs (list libxml2))
(synopsis "Python bindings for the libxml2 library")))
+(define-public python-libxml2-next
+ (package/inherit python-libxml2
+ (version "2.11.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.gnome.org/sources/libxml2/"
+ (version-major+minor version) "/libxml2-" version
+ ".tar.xz"))
+ (sha256 (base32
+ "1xspgyswllk26g7jg95pnkfk1gqpzna28fm1kir3kwdki9ziszkk"))))
+
+ (native-inputs (list pkg-config
+ autoconf-wrapper
+ automake
+ libtool
+ perl
+ python-minimal-wrapper))
+ ;; needed to generate setup.py
+
+ (arguments (list
+ ;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-env
+ (lambda _
+ (setenv "CONFIG_SHELL"
+ (which "sh")) #t))
+ (add-before 'build 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "sh" "autogen.sh")
+ (chdir "python")
+ (let ((libxml2-headers (search-input-directory
+ inputs
+ "include/libxml2")))
+ (substitute* "setup.py"
+ ;; The build system ignores C_INCLUDE_PATH & co, so
+ ;; provide the absolute directory name.
+ (("/opt/include")
+ (dirname libxml2-headers)))))))))
+ (inputs (list libxml2-next))))
+
(define-public libxlsxwriter
(package
(name "libxlsxwriter")
--
2.40.1
A
A
Andy Tai wrote on 14 Jun 2023 08:04
[PATCH v4 3/3] gnu: itstool: Add version depending on needed fix
(address . 64012@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
97f8a6028983576e26d877f0793c3b3c46d627a4.1686722470.git.atai@atai.org
* gnu/packages/glib.scm (itstool-with-utf8-fix): New variable
[inputs]: Switch to libxml2-next and python-libxml2-next
---
gnu/packages/glib.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (25 lines)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index e988e8dc87..c0df750b9b 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -705,6 +705,18 @@ (define itstool
translated.")
(license license:gpl3+)))
+
+;; libxml2-next contains upstream fix for itstool crash on UTF-8 data
+;; https://gitlab.gnome.org/GNOME/libxml2/-/commit/76c6da420923f2721a2e16adfcef8707a2454a1b
+;; so we need to have an itstool based the new libxml2 version
+;; for itstool to avoid crash
+(define-public itstool-with-utf8-fix
+ (package/inherit itstool
+ (name "itstool-with-utf8-fix")
+ (inputs
+ (list libxml2-next python-libxml2-next python))))
+
+
(define dbus-glib
(package
(name "dbus-glib")
--
2.40.1
A
A
Andy Tai wrote on 15 Jun 2023 19:39
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
CAJsg1E_AYjGvuNAGVitU4s0RfkH1bRRCZ-jPW6GO22FNmZ-4QQ@mail.gmail.com
block 64084 by 64001, 64012

Thanks

Mate desktop 1.26 needs
itzdata-next, libxml2-next, python-libxml2-next, itstool-with-utf8-fix
A
A
Andy Tai wrote on 15 Jun 2023 20:31
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 64012@debbugs.gnu.org)
CAJsg1E-MnE7-z6NZF6L6g4VjvJGO1KxFD3LiaWA0=gSSKr4JoQ@mail.gmail.com
Liliana, in patch v4 I create three new variables including a new itstool
which shall have nothing depending on them. Guix QA still shows it will
cause rebuilding of more than 8000 packages. I cannot make sense of this.

On Tue, Jun 13, 2023 at 2:33?PM Liliana Marie Prikler <
liliana.prikler@gmail.com> wrote:

Toggle quote (7 lines)
> > * gnu/packages/glib.scm (itstool) [inputs]: Switch to libxml2-next
> > and python-libxml2-next
> Still a world rebuild as far as I can see. Use grafts :)
>
>
> Cheers
>
Attachment: file
A
A
Andreas Enge wrote on 24 Jul 2023 18:36
Re: pending mate upgrade patches to 1.26
(name . Andy Tai)(address . atai@atai.org)
ZL6ocM8zJy9XlsTd@jurong
Am Mon, Jul 24, 2023 at 09:28:38AM -0700 schrieb Andy Tai:
Toggle quote (3 lines)
> Hi, these patches have been merged by Mr. Song (iyzsong@envs.net) . He worked
> to get these built without the two extra patches. Thanks

So closing the bugs
if this was a misunderstanding, please feel free to reopen them or to
submit new patches.

Andreas
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64012@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64012
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch