From patchwork Mon Jun 12 08:47:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Tai X-Patchwork-Id: 13848 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B7DEF27BBE2; Mon, 12 Jun 2023 09:49:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ED7A227BBE9 for ; Mon, 12 Jun 2023 09:49:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q8dEW-0008Qh-Eb; Mon, 12 Jun 2023 04:49:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q8dET-0008QN-VU for guix-patches@gnu.org; Mon, 12 Jun 2023 04:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q8dET-0008Qs-MU for guix-patches@gnu.org; Mon, 12 Jun 2023 04:49:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q8dET-00016Z-Iy for guix-patches@gnu.org; Mon, 12 Jun 2023 04:49:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64012] [PATCH v2] gnu: libxml2: Update to 2.11.4 References: <6996b9b078528ad04b159a83f29ecd8adf7f79c4.1686556929.git.atai@atai.org> In-Reply-To: <6996b9b078528ad04b159a83f29ecd8adf7f79c4.1686556929.git.atai@atai.org> Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Jun 2023 08:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64012 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64012@debbugs.gnu.org Cc: Andy Tai Received: via spool by 64012-submit@debbugs.gnu.org id=B64012.16865596934024 (code B ref 64012); Mon, 12 Jun 2023 08:49:01 +0000 Received: (at 64012) by debbugs.gnu.org; 12 Jun 2023 08:48:13 +0000 Received: from localhost ([127.0.0.1]:38812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8dDf-00012h-Ce for submit@debbugs.gnu.org; Mon, 12 Jun 2023 04:48:13 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:61842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8dDb-00011b-RE for 64012@debbugs.gnu.org; Mon, 12 Jun 2023 04:48:10 -0400 Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-25bf202899aso274738a91.3 for <64012@debbugs.gnu.org>; Mon, 12 Jun 2023 01:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686559681; x=1689151681; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=SOwL09iGQs4/T6FHJC8qQoz3foDpdegtwLymMeIJ6bw=; b=MZkzcEBBjZtLqF/roZGaFvF4vov35XqnpMhZNsqMg80l1GXjSxEORziyBV+c8KEIOQ tKLCsVQJgeiGlV1D61UUx5QiYR2T0N1E191toJtIacBxlN6hIkdGI+vxdmZJq5rd7Bdv 3ufWFvKqkXGEeyVGvCYbnBm0ng/x/RWNIdaYW+DahX2xvdXz5FPyf7GTwOTfbxTcV8xj bNMcgTAa9oIWP94gtIH4CGx4kFwPVHK5MvbG41W770Spv8UcNSyInzHy3ehA5sVFa3Gr yKhPiJsVuBDMv02EciqPeomcXNSY+hhRvFmXDZ81+MoEJPAkmDC/vnpLsHP4dg6h6iOE h92w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686559681; x=1689151681; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SOwL09iGQs4/T6FHJC8qQoz3foDpdegtwLymMeIJ6bw=; b=C2RBEom5kYo4/uVFdNJGXnWqxfKxlWrIX/jp5pZi/OwGr+uGSIn3L6u1uhfSWE6vN5 BzDTq6ctSUzn/OwSengRQvrKY8/1i4If1gUR/2l0PI80+1RrblVkz1CWSC/zoam0CC6g cRWuavpekllc3p17rIwPtGUfSRqxZ920Hyp4f1/SRBRbfrFzLu6LJO5huEAyKeIHtzsS cvIctpY7WqEHd4HM70yBXEwoeelU7EcB8PvDaSmw62r0+46DYxDtEy/n6vY6HYXScWEJ AO7Mk00BvsXKrE5imiqetxFgGrF3RBBtmtw0+iY8A+nKPfKZ3QC2YLkQDpnvo/6hlnbG mfew== X-Gm-Message-State: AC+VfDzN7MzbPQ0KGuKSVI4DMxgcsKLB1z/lpoEyD1ZMZhjzOapNlfEk vWIJOvOVuy40XoH+v7gYCQeq2IbSSsA= X-Google-Smtp-Source: ACHHUZ4aJqqY6R5edP5H1iy8tZj2v8O+PSRfRzWl5Fb0L6m00IQpR/KAp4AY/wXtz/zTv7oF3IUBmg== X-Received: by 2002:a17:90b:b17:b0:258:89d3:d950 with SMTP id bf23-20020a17090b0b1700b0025889d3d950mr7566124pjb.46.1686559681404; Mon, 12 Jun 2023 01:48:01 -0700 (PDT) Received: from localhost.localdomain ([98.37.226.98]) by smtp.googlemail.com with ESMTPSA id j8-20020a17090a3e0800b00258f9597e9fsm1924539pjc.45.2023.06.12.01.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:48:01 -0700 (PDT) From: Andy Tai Date: Mon, 12 Jun 2023 01:47:57 -0700 Message-Id: <47194cb3bb60df88f4fb1ef727fe52031671a31b.1686559603.git.atai@atai.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 (see https://gitlab.gnome.org/GNOME/libxml2/-/commit/76c6da420923f2721a2e16adfcef8707a2454a1b) * 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 base-commit: 6fe9a004dba2d4ddf69ff6f1714af15ffaa7e62a 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 . - ---- 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")))