package/python-pipcl: new host package
PATCH 1/2 package/python-pipcl: new host package
pipcl used to be bundled in python-pymupdf, but is now available as a separate package.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-pipcl/Config.in | 7 +++++++ package/python-pipcl/python-pipcl.hash | 5 +++++ package/python-pipcl/python-pipcl.mk | 15 +++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 package/python-pipcl/Config.in create mode 100644 package/python-pipcl/python-pipcl.hash create mode 100644 package/python-pipcl/python-pipcl.mk
DEVELOPERS +1 -0
@@ -2849,6 +2849,7 @@ F: package/mupdf/ F: package/python-boto3/ F: package/python-botocore/ F: package/python-jmespath/ +F: package/python-pipcl/ F: package/python-pymupdf/ F: package/python-rsa/ F: package/python-s3transfer/
package/Config.in +1 -0
@@ -1293,6 +1293,7 @@ menu "External python modules" source "package/python-pigpio/Config.in" source "package/python-pillow/Config.in" source "package/python-pip/Config.in" + source "package/python-pipcl/Config.in" source "package/python-platformdirs/Config.in" source "package/python-pluggy/Config.in" source "package/python-ply/Config.in"
package/python-pipcl/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PIPCL + bool "python-pipcl" + help + Python packaging operations, including PEP-517 support, for + use by a setup.py script. + + https://github.com/ArtifexSoftware/pipcl
package/python-pipcl/python-pipcl.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pipcl/json +md5 76883243610278b77725feb1813141f8 pipcl-12.tar.gz +sha256 c7545480cfa808500d8b606da73db7f89a872258bcdb293716126e2ccff1a5c6 pipcl-12.tar.gz +# Locally computed sha256 checksums +sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/python-pipcl/python-pipcl.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# python-pipcl +# +################################################################################ + +PYTHON_PIPCL_VERSION = 12 +PYTHON_PIPCL_SOURCE = pipcl-$(PYTHON_PIPCL_VERSION).tar.gz +PYTHON_PIPCL_SITE = https://files.pythonhosted.org/packages/64/1a/9ab2b272def9db9c80bf18fe8282119c2c4c074cc542030a28e4136dd13b +PYTHON_PIPCL_SETUP_TYPE = pep517 +PYTHON_PIPCL_LICENSE = AGPL-3.0+ +PYTHON_PIPCL_LICENSE_FILES = COPYING +HOST_PYTHON_PIPCL_DEPENDENCIES = host-python-packaging + +$(eval $(host-python-package))
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.html
Note that this bump fixes multiple security vulnerabilities, and at least the following ones:
- CVE-2025-46206
- CVE-2025-71382
- CVE-2026-7233
- CVE-2026-40505
With this new python-pymupdf (and mupdf) version, we can no longer build the old implementation (the 'a' implementation). We now need to build mupdf's python binding, which require host-clang (and its python bindings) to be built.
Also note that python-mupdf's version still needs to stay close to mupdf's version, they can only be updated together.
A number of mupdf patches were needed:
- To allow changing the build-time log level from an environment variable.
- To be able to provide the libclang include directories. This is needed because our default libclang include directories are not properly set.
- To be able to link against mupdf with no versioning number.
- To fix build errors when generating the python bindings for python-pymupdf with clang 22.
- To fix build errors with uClibc.
- To make it possible to build without a venv.
python-pymupdf also needed a (backported) patch to fix building with swig 4.5+.
In mupdf, setting JLIB_log_levels is not strictly necessary, but it greatly helps debugging build issues. It also only has an impact at build time anyway. To make it easier to debug potential future CI build failures, we enable it unconditionally.
brotli is also added as a new optional dependency, supported since mupdf v1.26.0.
Starting from version 1.28.1 pipcl is no longer bundled and needs to be installed separately, so add host-python-pipcl when we build the python bindings.
Starting from version 1.28.2, mupdf added the unconditional use of a venv, so disable it with MUPDF_NO_AUTOVENV.
In python-pymupdf, !BR2_STATIC_LIBS is now required by mupdf anyway, so update the comment accordingly.
pipcl (required to build python-pymupdf) used to be bundled in python-pymupdf but is now available as a separate package, so use it. This also allows us to use 'pep517' as the setup type. The test is also updated to use the new implementation.
For both packages, the patches that are now upstream are also removed.
The tarball filename for python-pymupdf has changed upstream so it is also updated accordingly.
These new versions no longer fit in the 120M rootfs configured for the runtime test, so double its size.
The mupdf builds are quite finicky on at least swig and libclang versions, so applying these changes on the Buildroot LTS branches should only be done with careful consideration (and making sure that it builds and passes the runtime test).
--- ...-incorrect-error-case-free-of-pixmap.patch | 53 -------- ...-jlib-fix-setting-filename-log-level.patch | 48 +++++++ ...y-to-provide-libclang-include-dirs-e.patch | 53 ++++++++ ...e-non-versioned-symlink-to-the-build.patch | 35 +++++ ...-log-level-through-environement-vari.patch | 53 ++++++++ ...rted-operand-type-when-setting-log-l.patch | 44 ++++++ ....py-class_add_iterator-assert-on-fin.patch | 41 ++++++ ...se.py-has_refs-recover-definition-cu.patch | 92 +++++++++++++ ...se.py-get_members-recover-definition.patch | 53 ++++++++ ...se.py-get_members-test-cursor.kind-n.patch | 78 +++++++++++ ...se.py-get_members-descend-into-anony.patch | 80 +++++++++++ ...-fitz-random.c-fix-build-with-uClibc.patch | 66 +++++++++ .../0012-scripts-make-venv-optional.patch | 52 ++++++++ package/mupdf/Config.in | 8 ++ package/mupdf/mupdf.hash | 6 +- package/mupdf/mupdf.mk | 55 ++++++-- ...w-providing-python-config-externally.patch | 125 ------------------ .../0001-src-extra-i-fix-for-swig-4-5.patch | 25 ++++ package/python-pymupdf/Config.in | 4 +- package/python-pymupdf/python-pymupdf.hash | 4 +- package/python-pymupdf/python-pymupdf.mk | 16 ++- .../tests/package/sample_python_pymupdf.py | 2 +- .../tests/package/test_python_pymupdf.py | 2 +- 23 files changed, 791 insertions(+), 204 deletions(-) delete mode 100644 package/mupdf/0001-Fix-incorrect-error-case-free-of-pixmap.patch create mode 100644 package/mupdf/0001-jlib-fix-setting-filename-log-level.patch create mode 100644 package/mupdf/0002-scripts-add-a-way-to-provide-libclang-include-dirs-e.patch create mode 100644 package/mupdf/0003-setup.py-add-the-non-versioned-symlink-to-the-build.patch create mode 100644 package/mupdf/0004-jlib-fix-setting-log-level-through-environement-vari.patch create mode 100644 package/mupdf/0005-jlib-fix-unsupported-operand-type-when-setting-log-l.patch create mode 100644 package/mupdf/0006-scripts-wrap-cpp.py-class_add_iterator-assert-on-fin.patch create mode 100644 package/mupdf/0007-scripts-wrap-parse.py-has_refs-recover-definition-cu.patch create mode 100644 package/mupdf/0008-scripts-wrap-parse.py-get_members-recover-definition.patch create mode 100644 package/mupdf/0009-scripts-wrap-parse.py-get_members-test-cursor.kind-n.patch create mode 100644 package/mupdf/0010-scripts-wrap-parse.py-get_members-descend-into-anony.patch create mode 100644 package/mupdf/0011-source-fitz-random.c-fix-build-with-uClibc.patch create mode 100644 package/mupdf/0012-scripts-make-venv-optional.patch delete mode 100644 package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch create mode 100644 package/python-pymupdf/0001-src-extra-i-fix-for-swig-4-5.patch
package/mupdf/0001-Fix-incorrect-error-case-free-of-pixmap.patch deleted +0 -53
@@ -1,53 +0,0 @@ -From d4743b6092d513321c23c6f7fe5cff87cde043c1 Mon Sep 17 00:00:00 2001 -From: Robin Watts <[email protected]> -Date: Mon, 12 Jan 2026 19:08:56 +0000 -Subject: Bug 709029: Fix incorrect error-case free of pixmap. - -Don't free a pixmap we don't own! - -CVE: CVE-2026-25556 -Upstream: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=d4743b6092d513321c23c6f7fe5cff87cde043c1 -Signed-off-by: Thomas Perale <[email protected]> ---- - source/fitz/util.c | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/source/fitz/util.c b/source/fitz/util.c -index 7710124cc..90226a5c1 100644 ---- a/source/fitz/util.c -+++ b/source/fitz/util.c -@@ -119,7 +119,15 @@ fz_new_pixmap_from_display_list_with_separations(fz_context *ctx, fz_display_lis - else - fz_clear_pixmap_with_value(ctx, pix, 0xFF); - -- return fz_fill_pixmap_from_display_list(ctx, list, ctm, pix); -+ fz_try(ctx) -+ fz_fill_pixmap_from_display_list(ctx, list, ctm, pix); -+ fz_catch(ctx) -+ { -+ fz_drop_pixmap(ctx, pix); -+ fz_rethrow(ctx); -+ } -+ -+ return pix; - } - - fz_pixmap * -@@ -136,14 +144,9 @@ fz_fill_pixmap_from_display_list(fz_context *ctx, fz_display_list *list, fz_matr - fz_close_device(ctx, dev); - } - fz_always(ctx) -- { - fz_drop_device(ctx, dev); -- } - fz_catch(ctx) -- { -- fz_drop_pixmap(ctx, pix); - fz_rethrow(ctx); -- } - - return pix; - } --- -cgit v1.2.3 -
package/mupdf/0001-jlib-fix-setting-filename-log-level.patch new file +48 -0
48 lines not on this page · raw message
package/mupdf/0002-scripts-add-a-way-to-provide-libclang-include-dirs-e.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0003-setup.py-add-the-non-versioned-symlink-to-the-build.patch new file +35 -0
@@ -0,0 +1,35 @@ +From b8efb551ba65f6f0d737ca3760fe5e2dbac5743c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]> +Date: Tue, 3 Sep 2024 15:35:33 +0200 +Subject: [PATCH] setup.py: add the non-versioned symlink to the build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Starting from bf1c28cc4f2dd4bd17e35783fa3c1f98ded22296, the generated +mupdf libraries are versioned. This means that if we want to link +against them without knowing their version number (i.e. using +'-lmupdf'), we also need to install the symlink to the wheel. + +Upstream: https://github.com/ArtifexSoftware/mupdf/pull/59 +Signed-off-by: Raphaël Mélotte <[email protected]> +--- + setup.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/setup.py b/setup.py +index 49199f5..3252412 100755 +--- a/setup.py ++++ b/setup.py +@@ -357,6 +357,8 @@ def build(): + names = [ + pipcl.get_soname(f'{build_dir()}/libmupdf.so'), # C. + pipcl.get_soname(f'{build_dir()}/libmupdfcpp.so'), # C++. ++ f'{build_dir()}/libmupdf.so', # C symlink. ++ f'{build_dir()}/libmupdfcpp.so', # C++ symlink. + f'{build_dir()}/_mupdf.so', # Python internals. + f'{build_dir()}/mupdf.py', # Python. + ] +-- +2.54.0 +
package/mupdf/0004-jlib-fix-setting-log-level-through-environement-vari.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0005-jlib-fix-unsupported-operand-type-when-setting-log-l.patch new file +44 -0
44 lines not on this page · raw message
package/mupdf/0006-scripts-wrap-cpp.py-class_add_iterator-assert-on-fin.patch new file +41 -0
41 lines not on this page · raw message
package/mupdf/0007-scripts-wrap-parse.py-has_refs-recover-definition-cu.patch new file +92 -0
92 lines not on this page · raw message
package/mupdf/0008-scripts-wrap-parse.py-get_members-recover-definition.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0009-scripts-wrap-parse.py-get_members-test-cursor.kind-n.patch new file +78 -0
78 lines not on this page · raw message
package/mupdf/0010-scripts-wrap-parse.py-get_members-descend-into-anony.patch new file +80 -0
80 lines not on this page · raw message
package/mupdf/0011-source-fitz-random.c-fix-build-with-uClibc.patch new file +66 -0
66 lines not on this page · raw message
package/mupdf/0012-scripts-make-venv-optional.patch new file +52 -0
52 lines not on this page · raw message
package/mupdf/Config.in +8 -0
@@ -20,3 +20,11 @@ comment "mupdf needs a toolchain w/ C++, gcc >= 4.9" depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_INSTALL_LIBSTDCPP || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +if BR2_PACKAGE_MUPDF +config BR2_PACKAGE_MUPDF_PYTHON_BINDINGS + bool "python bindings for mupdf" + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_HOST_SWIG +endif
package/mupdf/mupdf.hash +2 -4
@@ -1,8 +1,6 @@ # From https://mupdf.com/releases: -sha1 d79600bccd70ab9d0e8ee19dae4e275f2af95ced mupdf-1.23.9-source.tar.lz - -# Locally computed: -sha256 2c2f89deb9f425ba637dac226191d547f2b40975c4d21a340965f52c001e15c5 mupdf-1.23.9-source.tar.lz +sha1 1f0a14123a2410c3bdb63cb6bbef69d0f2518f6e mupdf-1.28.5-source.tar.lz +sha256 f33f3c672033324c38c7c9a1444c28436ede9669a28e2da672df7f6c62b8cfc8 mupdf-1.28.5-source.tar.lz # Hash for license files: sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/mupdf/mupdf.mk +45 -10
79 lines not on this page · raw message
package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch deleted +0 -125
125 lines not on this page · raw message
package/python-pymupdf/0001-src-extra-i-fix-for-swig-4-5.patch new file +25 -0
@@ -0,0 +1,25 @@ +From d2ddf9032d61f8344cd06ab2c4bb077771047e22 Mon Sep 17 00:00:00 2001 +From: Julian Smith <[email protected]> +Date: Sat, 22 Aug 2026 08:11:57 +0100 +Subject: [PATCH] src/extra.i: fix for swig-4.5. + +Python 2's PyString_FromString() is no longer provided by swig code. +Upstream: https://github.com/pymupdf/PyMuPDF/commit/d2ddf9032d61f8344cd06ab2c4bb077771047e22 +Signed-off-by: Raphaël Mélotte <[email protected]> +--- + src/extra.i | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/extra.i b/src/extra.i +index f62cdf83c..dd1670a2e 100644 +--- a/src/extra.i ++++ b/src/extra.i +@@ -225,7 +225,7 @@ static void messagev(const char* format, va_list va) + static PyObject* message_fn = PyObject_GetAttrString(pymupdf_module, "message"); + char* text; + vasprintf(&text, format, va); +- PyObject* text_py = PyString_FromString(text); ++ PyObject* text_py = PyUnicode_FromString(text); + PyObject* args = PyTuple_Pack(1, text_py); + PyObject* ret = PyObject_CallObject(message_fn, args); + Py_XDECREF(ret);
package/python-pymupdf/Config.in +3 -1
@@ -3,10 +3,12 @@ config BR2_PACKAGE_PYTHON_PYMUPDF depends on BR2_INSTALL_LIBSTDCPP # mupdf -> harfbuzz depends on BR2_TOOLCHAIN_HAS_SYNC_4 # mupdf -> harfbuzz depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # mupdf -> harfbuzz - depends on !BR2_STATIC_LIBS # runtime failure + depends on !BR2_STATIC_LIBS # mupdf python bindings select BR2_PACKAGE_HOST_SWIG select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_MUPDF + select BR2_PACKAGE_MUPDF_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHON_PIPCL select BR2_PACKAGE_PYTHON3_ZLIB # runtime help Python bindings for the PDF rendering library MuPDF.
package/python-pymupdf/python-pymupdf.hash +2 -2
@@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/pymupdf/json -md5 5c219a0c4cb3d57b60e39cc901ebd220 PyMuPDF-1.23.22.tar.gz -sha256 c41cd91d83696cea67a4b6c65cc1951c2019ac0a561c5a3f543318ede30d3cd0 PyMuPDF-1.23.22.tar.gz +md5 ffd24ff2579b94e30151cf0e6ed95bcc pymupdf-1.28.2.tar.gz +sha256 5e0be7908a715aa20333caddd73f1d6f01e4cd0c26e869fa2dd0b7f344da2249 pymupdf-1.28.2.tar.gz # Locally computed sha256 checksums sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/python-pymupdf/python-pymupdf.mk +9 -7
@@ -5,21 +5,23 @@ ################################################################################ # python-pymupdf's version must be compatible with mupdf's version -PYTHON_PYMUPDF_VERSION = 1.23.22 -PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz -PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/05/20/a0d1221d8f379afcc12b4d1687a8f4adb69eef659e835d781c3fa331ff46 -PYTHON_PYMUPDF_SETUP_TYPE = setuptools +PYTHON_PYMUPDF_VERSION = 1.28.2 +PYTHON_PYMUPDF_SOURCE = pymupdf-$(PYTHON_PYMUPDF_VERSION).tar.gz +PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/a3/fb/b6761fa2d5266f2cdb24c3b91f4023070ab7848381417678e7a289a1d52a +PYTHON_PYMUPDF_SETUP_TYPE = pep517 PYTHON_PYMUPDF_LICENSE = AGPL-3.0+ PYTHON_PYMUPDF_LICENSE_FILES = COPYING # No license file included in pip, but it's present on github -PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf +PYTHON_PYMUPDF_DEPENDENCIES = freetype host-python-pipcl host-swig mupdf PYTHON_PYMUPDF_BUILD_OPTS = --skip-dependency-check +# LD needs to be overriden because pipcl expects it to be a linker +# driver (e.g. gcc) and not an actual linker. PYTHON_PYMUPDF_ENV = \ + LD=$(TARGET_CC) \ PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \ PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \ - PYMUPDF_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \ - PYMUPDF_SETUP_IMPLEMENTATIONS=a \ + PIPCL_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \ PYMUPDF_SETUP_MUPDF_BUILD= $(eval $(python-package))
support/testing/tests/package/sample_python_pymupdf.py +1 -1
@@ -1,4 +1,4 @@ -import fitz_old as fitz +import fitz # Write a test PDF file outfile = "python-pymupdf.pdf"
support/testing/tests/package/test_python_pymupdf.py +1 -1
@@ -9,7 +9,7 @@ class TestPythonPy3PyMuPDF(TestPythonPackageBase): BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_PYMUPDF=y BR2_TARGET_ROOTFS_EXT2=y - BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + BR2_TARGET_ROOTFS_EXT2_SIZE="240M" """ sample_scripts = ["tests/package/sample_python_pymupdf.py"] timeout = 30
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Hi,
Raphaël Mélotte via buildroot wrote,
Quoted 53 lines
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.htmlNote that this bump fixes multiple security vulnerabilities, and at least the following ones:
- CVE-2025-46206
- CVE-2025-71382
- CVE-2026-7233
- CVE-2026-40505With this new python-pymupdf (and mupdf) version, we can no longer build the old implementation (the 'a' implementation). We now need to build mupdf's python binding, which require host-clang (and its python bindings) to be built.
Also note that python-mupdf's version still needs to stay close to mupdf's version, they can only be updated together.
A number of mupdf patches were needed:
- To allow changing the build-time log level from an environment variable.
- To be able to provide the libclang include directories. This is needed because our default libclang include directories are not properly set.
- To be able to link against mupdf with no versioning number.
- To fix build errors when generating the python bindings for python-pymupdf with clang 22.
- To fix build errors with uClibc.
- To make it possible to build without a venv.python-pymupdf also needed a (backported) patch to fix building with swig 4.5+.
In mupdf, setting
JLIB_log_levelsis not strictly necessary, but it greatly helps debugging build issues. It also only has an impact at build time anyway. To make it easier to debug potential future CI build failures, we enable it unconditionally.
brotli is also added as a new optional dependency, supported since mupdf v1.26.0.
Starting from version 1.28.1 pipcl is no longer bundled and needs to be installed separately, so add host-python-pipcl when we build the python bindings.
Starting from version 1.28.2, mupdf added the unconditional use of a venv, so disable it withMUPDF_NO_AUTOVENV.In python-pymupdf, !BR2_STATIC_LIBS is now required by mupdf anyway, so update the comment accordingly.
pipcl (required to build python-pymupdf) used to be bundled in python-pymupdf but is now available as a separate package, so use it. This also allows us to use 'pep517' as the setup type. The test is also updated to use the new implementation.
Quoted 7 lines
For both packages, the patches that are now upstream are also removed.
The tarball filename for python-pymupdf has changed upstream so it is also updated accordingly.
These new versions no longer fit in the 120M rootfs configured for the runtime test, so double its size.
Thanks for your patch. I was once trying to do an update myself and failed to get python-pymupdf to compile. They changed so much in their new version. Great work!
You can add my
Tested mupdf-x11 in fluxbox with qemu-system-x86_64 and glibc toolchain.
Quoted 4 lines
The mupdf builds are quite finicky on at least swig and libclang versions, so applying these changes on the Buildroot LTS branches should only be done with careful consideration (and making sure that it builds and passes the runtime test).
I tried the update for 2025.02, but get:
./scripts/mupdfwrap.py -d build/shared-release -b 01
(+0.0s): jlib.py:371:log_levels_add: adding level: filename_prefix='/' function_prefix=''
(+0.0s): parse.py:16:<module>: Warning, could not import clang: No module named 'clang'
(+0.0s): state.py:21:<module>: Warning: failed to import clang.cindex: e=ModuleNotFoundError("No module named 'clang'") (+0.0s): state.py:21:<module>: We need Clang Python to build MuPDF python.
(+0.0s): state.py:21:<module>: Install with pip install libclang (typically inside a Python venv),
So adding it to LTS will be challenging again I think.
best regards
Waldemar
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
In reply to Raphaël Mélotte via buildrootHello Raphaël,
Wow, lots of work here. mupdf seems pretty crazy to build, and their usage of clang doesn't seem to be making things simple. Do you expect some/all of your patches to be merged?
More comments below (not many).
Quoted 10 lines · Raphaël Mélotte via buildroot
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.htmlNote that this bump fixes multiple security vulnerabilities, and at least the following ones:
- CVE-2025-46206
- CVE-2025-71382
- CVE-2026-7233
- CVE-2026-40505
So should this commit be title "security bump to ..." ?
package/python-pymupdf/Config.in config BR2_PACKAGE_PYTHON_PYMUPDF · line 11
Quoted 5 lines
package/python-pymupdf/Config.in +2
-0select BR2_PACKAGE_HOST_SWIG select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_MUPDF + select BR2_PACKAGE_MUPDF_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHON_PIPCL
As I reported in my review of the previous patch, this option exists but doesn't do anything as python-pipcl doesn't exist as a target package. I assume this can be dropped?
Thanks for your feedback!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Hello Thomas,
Quoted 6 lines · Thomas Petazzoni
Hello Raphaël,
Wow, lots of work here. mupdf seems pretty crazy to build, and their usage of clang doesn't seem to be making things simple. Do you expect some/all of your patches to be merged?
I still hope they will be eventually (at least the ones that fix build issues), but given that some of them are more than a year old I'm also not that confident they will be unfortunately.
Quoted 7 lines
More comments below (not many).
Quoted 4 lines · Raphaël Mélotte via buildroot
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.html
Quoted 9 lines
Quoted 6 lines
Note that this bump fixes multiple security vulnerabilities, and at least the following ones:
- CVE-2025-46206
- CVE-2025-71382
- CVE-2026-7233
- CVE-2026-40505So should this commit be title "security bump to ..." ?
I did not use it because our documentation says to use it "If the new version only contains security updates compared to the existing one". In this case it's a bump across several major releases, so it definitely contains more than security updates.
That said I don't mind updating the commit title to use it if it's preferable.
Quoted 10 lines
package/python-pymupdf/Config.in config BR2_PACKAGE_PYTHON_PYMUPDF · line 11
Quoted 5 lines
select
BR2_PACKAGE_HOST_SWIG
selectBR2_PACKAGE_FREETYPE
selectBR2_PACKAGE_MUPDFpackage/python-pymupdf/Config.in +2
-0+ select BR2_PACKAGE_MUPDF_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHON_PIPCLAs I reported in my review of the previous patch, this option exists but doesn't do anything as python-pipcl doesn't exist as a target package. I assume this can be dropped?
Yes indeed, I'll do that in a v2.
Quoted 3 lines
Thanks for your feedback!
Thomas
Thanks,
Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Quoted 3 lines · Raphaël Mélotte
I still hope they will be eventually (at least the ones that fix build issues), but given that some of them are more than a year old I'm also not that confident they will be unfortunately.
Meh :-/
Quoted 6 lines
Quoted 1 line
So should this commit be title "security bump to ..." ?
I did not use it because our documentation says to use it "If the new version only contains security updates compared to the existing one". In this case it's a bump across several major releases, so it definitely contains more than security updates.
And is it possible to backport just the security fixes? Otherwise our LTS maintainers will have no choice but to bump the version, but you said yourself that this should be considered very carefully.
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Hi Thomas,
Quoted 5 lines · Thomas Petazzoni
And is it possible to backport just the security fixes? Otherwise our LTS maintainers will have no choice but to bump the version, but you said yourself that this should be considered very carefully.
That would be ideal yes.
I need to check for each of them how easily they can be applied/backported.
Kind regards,
Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Hi all,
Quoted 11 lines · Raphaël Mélotte
Hi Thomas,
Quoted 5 lines · Thomas Petazzoni
And is it possible to backport just the security fixes? Otherwise our LTS maintainers will have no choice but to bump the version, but you said yourself that this should be considered very carefully.
That would be ideal yes.
I need to check for each of them how easily they can be applied/backported.
I sent backported patches for CVE-2025-46206, CVE-2025-71382 and CVE-2026-40505: https://patchwork.buildroot.org/project/buildroot/list/?series=1634
CVE-2026-7233 turned out to be a false positive, 1.23.9 is not affected.
Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Raphaël,
package/python-pipcl/Config.in line 2
Quoted 8 lines · Raphaël Mélotte via buildroot
package/python-pipcl/Config.in new file +2
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PIPCL + bool "python-pipcl"
It does not make sense to have a Config.in option to enable a target package... when you have no target package.
Quoted 11 lines
package/python-pipcl/python-pipcl.mk new file +5
-0@@ -0,0 +1,15 @@ +################################################################################ +# +# python-pipcl +# +################################################################################
package/python-pipcl/python-pipcl.mk line 15
Quoted 10 lines
package/python-pipcl/python-pipcl.mk new file +10
-0+ +PYTHON_PIPCL_VERSION = 12 +PYTHON_PIPCL_SOURCE = pipcl-$(PYTHON_PIPCL_VERSION).tar.gz +PYTHON_PIPCL_SITE = https://files.pythonhosted.org/packages/64/1a/9ab2b272def9db9c80bf18fe8282119c2c4c074cc542030a28e4136dd13b +PYTHON_PIPCL_SETUP_TYPE = pep517 +PYTHON_PIPCL_LICENSE = AGPL-3.0+ +PYTHON_PIPCL_LICENSE_FILES = COPYING +HOST_PYTHON_PIPCL_DEPENDENCIES = host-python-packaging + +$(eval $(host-python-package))
^^^
See here, you've made this a host only package.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
Quoted 4 lines · Thomas Petazzoni
Hello Raphaël,
On Wed, Sep 30, 2026 at 02:00:57PM +0200, Raphaël Mélotte via buildroot wrote:
Quoted 12 lines
package/python-pipcl/Config.in line 2
Quoted 8 lines
package/python-pipcl/Config.in new file +2
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PIPCL + bool "python-pipcl"It does not make sense to have a Config.in option to enable a target package... when you have no target package.
Indeed, I must have thought pipcl was needed on the target initially, and forgot to remove the option when I made it a host package. I'll send a v2.
Quoted 24 lines
Quoted 11 lines
package/python-pipcl/python-pipcl.mk new file +5
-0@@ -0,0 +1,15 @@ +################################################################################ +# +# python-pipcl +# +################################################################################package/python-pipcl/python-pipcl.mk line 15
Quoted 10 lines
package/python-pipcl/python-pipcl.mk new file +10
-0+ +PYTHON_PIPCL_VERSION = 12 +PYTHON_PIPCL_SOURCE = pipcl-$(PYTHON_PIPCL_VERSION).tar.gz +PYTHON_PIPCL_SITE = https://files.pythonhosted.org/packages/64/1a/9ab2b272def9db9c80bf18fe8282119c2c4c074cc542030a28e4136dd13b +PYTHON_PIPCL_SETUP_TYPE = pep517 +PYTHON_PIPCL_LICENSE = AGPL-3.0+ +PYTHON_PIPCL_LICENSE_FILES = COPYING +HOST_PYTHON_PIPCL_DEPENDENCIES = host-python-packaging + +$(eval $(host-python-package))^^^
Quoted 5 lines
See here, you've made this a host only package.
Best regards,
Thomas
Kind regards,
Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/2 package/python-pipcl: new host package
In reply to Raphaël Mélotte via buildrootpipcl used to be bundled in python-pymupdf, but is now available as a separate package.
---
Changes v1 -> v2:
- Remove Config.in
DEVELOPERS | 1 + package/python-pipcl/python-pipcl.hash | 5 +++++ package/python-pipcl/python-pipcl.mk | 15 +++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 package/python-pipcl/python-pipcl.hash create mode 100644 package/python-pipcl/python-pipcl.mk
DEVELOPERS +1 -0
@@ -2849,6 +2849,7 @@ F: package/mupdf/ F: package/python-boto3/ F: package/python-botocore/ F: package/python-jmespath/ +F: package/python-pipcl/ F: package/python-pymupdf/ F: package/python-rsa/ F: package/python-s3transfer/
package/python-pipcl/python-pipcl.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pipcl/json +md5 76883243610278b77725feb1813141f8 pipcl-12.tar.gz +sha256 c7545480cfa808500d8b606da73db7f89a872258bcdb293716126e2ccff1a5c6 pipcl-12.tar.gz +# Locally computed sha256 checksums +sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/python-pipcl/python-pipcl.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# python-pipcl +# +################################################################################ + +PYTHON_PIPCL_VERSION = 12 +PYTHON_PIPCL_SOURCE = pipcl-$(PYTHON_PIPCL_VERSION).tar.gz +PYTHON_PIPCL_SITE = https://files.pythonhosted.org/packages/64/1a/9ab2b272def9db9c80bf18fe8282119c2c4c074cc542030a28e4136dd13b +PYTHON_PIPCL_SETUP_TYPE = pep517 +PYTHON_PIPCL_LICENSE = AGPL-3.0+ +PYTHON_PIPCL_LICENSE_FILES = COPYING +HOST_PYTHON_PIPCL_DEPENDENCIES = host-python-packaging + +$(eval $(host-python-package))
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/2 package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.html
Note that this bump fixes multiple security vulnerabilities, and at least the following ones:
- CVE-2025-46206
- CVE-2025-71382
- CVE-2026-7233
- CVE-2026-40505
With this new python-pymupdf (and mupdf) version, we can no longer build the old implementation (the 'a' implementation). We now need to build mupdf's python binding, which require host-clang (and its python bindings) to be built.
Also note that python-mupdf's version still needs to stay close to mupdf's version, they can only be updated together.
A number of mupdf patches were needed:
- To allow changing the build-time log level from an environment variable.
- To be able to provide the libclang include directories. This is needed because our default libclang include directories are not properly set.
- To be able to link against mupdf with no versioning number.
- To fix build errors when generating the python bindings for python-pymupdf with clang 22.
- To fix build errors with uClibc.
- To make it possible to build without a venv.
python-pymupdf also needed a (backported) patch to fix building with swig 4.5+.
In mupdf, setting JLIB_log_levels is not strictly necessary, but it greatly helps debugging build issues. It also only has an impact at build time anyway. To make it easier to debug potential future CI build failures, we enable it unconditionally.
brotli is also added as a new optional dependency, supported since mupdf v1.26.0.
Starting from version 1.28.1 pipcl is no longer bundled and needs to be installed separately, so add host-python-pipcl when we build the python bindings.
Starting from version 1.28.2, mupdf added the unconditional use of a venv, so disable it with MUPDF_NO_AUTOVENV.
In python-pymupdf, !BR2_STATIC_LIBS is now required by mupdf anyway, so update the comment accordingly.
pipcl (required to build python-pymupdf) used to be bundled in python-pymupdf but is now available as a separate package, so use it. This also allows us to use 'pep517' as the setup type. The test is also updated to use the new implementation.
For both packages, the patches that are now upstream are also removed.
The tarball filename for python-pymupdf has changed upstream so it is also updated accordingly.
These new versions no longer fit in the 120M rootfs configured for the runtime test, so double its size.
The mupdf builds are quite finicky on at least swig and libclang versions, so applying these changes on the Buildroot LTS branches should only be done with careful consideration (and making sure that it builds and passes the runtime test).
---
Changes v1 -> v2:
- Remove the select of BR2_PACKAGE_PYTHON_PIPCL
...-incorrect-error-case-free-of-pixmap.patch | 53 -------- ...-jlib-fix-setting-filename-log-level.patch | 48 +++++++ ...y-to-provide-libclang-include-dirs-e.patch | 53 ++++++++ ...e-non-versioned-symlink-to-the-build.patch | 35 +++++ ...-log-level-through-environement-vari.patch | 53 ++++++++ ...rted-operand-type-when-setting-log-l.patch | 44 ++++++ ....py-class_add_iterator-assert-on-fin.patch | 41 ++++++ ...se.py-has_refs-recover-definition-cu.patch | 92 +++++++++++++ ...se.py-get_members-recover-definition.patch | 53 ++++++++ ...se.py-get_members-test-cursor.kind-n.patch | 78 +++++++++++ ...se.py-get_members-descend-into-anony.patch | 80 +++++++++++ ...-fitz-random.c-fix-build-with-uClibc.patch | 66 +++++++++ .../0012-scripts-make-venv-optional.patch | 52 ++++++++ package/mupdf/Config.in | 8 ++ package/mupdf/mupdf.hash | 6 +- package/mupdf/mupdf.mk | 55 ++++++-- ...w-providing-python-config-externally.patch | 125 ------------------ .../0001-src-extra-i-fix-for-swig-4-5.patch | 25 ++++ package/python-pymupdf/Config.in | 3 +- package/python-pymupdf/python-pymupdf.hash | 4 +- package/python-pymupdf/python-pymupdf.mk | 16 ++- .../tests/package/sample_python_pymupdf.py | 2 +- .../tests/package/test_python_pymupdf.py | 2 +- 23 files changed, 790 insertions(+), 204 deletions(-) delete mode 100644 package/mupdf/0001-Fix-incorrect-error-case-free-of-pixmap.patch create mode 100644 package/mupdf/0001-jlib-fix-setting-filename-log-level.patch create mode 100644 package/mupdf/0002-scripts-add-a-way-to-provide-libclang-include-dirs-e.patch create mode 100644 package/mupdf/0003-setup.py-add-the-non-versioned-symlink-to-the-build.patch create mode 100644 package/mupdf/0004-jlib-fix-setting-log-level-through-environement-vari.patch create mode 100644 package/mupdf/0005-jlib-fix-unsupported-operand-type-when-setting-log-l.patch create mode 100644 package/mupdf/0006-scripts-wrap-cpp.py-class_add_iterator-assert-on-fin.patch create mode 100644 package/mupdf/0007-scripts-wrap-parse.py-has_refs-recover-definition-cu.patch create mode 100644 package/mupdf/0008-scripts-wrap-parse.py-get_members-recover-definition.patch create mode 100644 package/mupdf/0009-scripts-wrap-parse.py-get_members-test-cursor.kind-n.patch create mode 100644 package/mupdf/0010-scripts-wrap-parse.py-get_members-descend-into-anony.patch create mode 100644 package/mupdf/0011-source-fitz-random.c-fix-build-with-uClibc.patch create mode 100644 package/mupdf/0012-scripts-make-venv-optional.patch delete mode 100644 package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch create mode 100644 package/python-pymupdf/0001-src-extra-i-fix-for-swig-4-5.patch
package/mupdf/0001-Fix-incorrect-error-case-free-of-pixmap.patch deleted +0 -53
@@ -1,53 +0,0 @@ -From d4743b6092d513321c23c6f7fe5cff87cde043c1 Mon Sep 17 00:00:00 2001 -From: Robin Watts <[email protected]> -Date: Mon, 12 Jan 2026 19:08:56 +0000 -Subject: Bug 709029: Fix incorrect error-case free of pixmap. - -Don't free a pixmap we don't own! - -CVE: CVE-2026-25556 -Upstream: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=d4743b6092d513321c23c6f7fe5cff87cde043c1 -Signed-off-by: Thomas Perale <[email protected]> ---- - source/fitz/util.c | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/source/fitz/util.c b/source/fitz/util.c -index 7710124cc..90226a5c1 100644 ---- a/source/fitz/util.c -+++ b/source/fitz/util.c -@@ -119,7 +119,15 @@ fz_new_pixmap_from_display_list_with_separations(fz_context *ctx, fz_display_lis - else - fz_clear_pixmap_with_value(ctx, pix, 0xFF); - -- return fz_fill_pixmap_from_display_list(ctx, list, ctm, pix); -+ fz_try(ctx) -+ fz_fill_pixmap_from_display_list(ctx, list, ctm, pix); -+ fz_catch(ctx) -+ { -+ fz_drop_pixmap(ctx, pix); -+ fz_rethrow(ctx); -+ } -+ -+ return pix; - } - - fz_pixmap * -@@ -136,14 +144,9 @@ fz_fill_pixmap_from_display_list(fz_context *ctx, fz_display_list *list, fz_matr - fz_close_device(ctx, dev); - } - fz_always(ctx) -- { - fz_drop_device(ctx, dev); -- } - fz_catch(ctx) -- { -- fz_drop_pixmap(ctx, pix); - fz_rethrow(ctx); -- } - - return pix; - } --- -cgit v1.2.3 -
package/mupdf/0001-jlib-fix-setting-filename-log-level.patch new file +48 -0
48 lines not on this page · raw message
package/mupdf/0002-scripts-add-a-way-to-provide-libclang-include-dirs-e.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0003-setup.py-add-the-non-versioned-symlink-to-the-build.patch new file +35 -0
@@ -0,0 +1,35 @@ +From b8efb551ba65f6f0d737ca3760fe5e2dbac5743c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]> +Date: Tue, 3 Sep 2024 15:35:33 +0200 +Subject: [PATCH] setup.py: add the non-versioned symlink to the build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Starting from bf1c28cc4f2dd4bd17e35783fa3c1f98ded22296, the generated +mupdf libraries are versioned. This means that if we want to link +against them without knowing their version number (i.e. using +'-lmupdf'), we also need to install the symlink to the wheel. + +Upstream: https://github.com/ArtifexSoftware/mupdf/pull/59 +Signed-off-by: Raphaël Mélotte <[email protected]> +--- + setup.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/setup.py b/setup.py +index 49199f5..3252412 100755 +--- a/setup.py ++++ b/setup.py +@@ -357,6 +357,8 @@ def build(): + names = [ + pipcl.get_soname(f'{build_dir()}/libmupdf.so'), # C. + pipcl.get_soname(f'{build_dir()}/libmupdfcpp.so'), # C++. ++ f'{build_dir()}/libmupdf.so', # C symlink. ++ f'{build_dir()}/libmupdfcpp.so', # C++ symlink. + f'{build_dir()}/_mupdf.so', # Python internals. + f'{build_dir()}/mupdf.py', # Python. + ] +-- +2.54.0 +
package/mupdf/0004-jlib-fix-setting-log-level-through-environement-vari.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0005-jlib-fix-unsupported-operand-type-when-setting-log-l.patch new file +44 -0
44 lines not on this page · raw message
package/mupdf/0006-scripts-wrap-cpp.py-class_add_iterator-assert-on-fin.patch new file +41 -0
41 lines not on this page · raw message
package/mupdf/0007-scripts-wrap-parse.py-has_refs-recover-definition-cu.patch new file +92 -0
92 lines not on this page · raw message
package/mupdf/0008-scripts-wrap-parse.py-get_members-recover-definition.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0009-scripts-wrap-parse.py-get_members-test-cursor.kind-n.patch new file +78 -0
78 lines not on this page · raw message
package/mupdf/0010-scripts-wrap-parse.py-get_members-descend-into-anony.patch new file +80 -0
80 lines not on this page · raw message
package/mupdf/0011-source-fitz-random.c-fix-build-with-uClibc.patch new file +66 -0
66 lines not on this page · raw message
package/mupdf/0012-scripts-make-venv-optional.patch new file +52 -0
52 lines not on this page · raw message
package/mupdf/Config.in +8 -0
@@ -20,3 +20,11 @@ comment "mupdf needs a toolchain w/ C++, gcc >= 4.9" depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_INSTALL_LIBSTDCPP || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +if BR2_PACKAGE_MUPDF +config BR2_PACKAGE_MUPDF_PYTHON_BINDINGS + bool "python bindings for mupdf" + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_HOST_SWIG +endif
package/mupdf/mupdf.hash +2 -4
@@ -1,8 +1,6 @@ # From https://mupdf.com/releases: -sha1 d79600bccd70ab9d0e8ee19dae4e275f2af95ced mupdf-1.23.9-source.tar.lz - -# Locally computed: -sha256 2c2f89deb9f425ba637dac226191d547f2b40975c4d21a340965f52c001e15c5 mupdf-1.23.9-source.tar.lz +sha1 1f0a14123a2410c3bdb63cb6bbef69d0f2518f6e mupdf-1.28.5-source.tar.lz +sha256 f33f3c672033324c38c7c9a1444c28436ede9669a28e2da672df7f6c62b8cfc8 mupdf-1.28.5-source.tar.lz # Hash for license files: sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/mupdf/mupdf.mk +45 -10
79 lines not on this page · raw message
package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch deleted +0 -125
125 lines not on this page · raw message
package/python-pymupdf/0001-src-extra-i-fix-for-swig-4-5.patch new file +25 -0
@@ -0,0 +1,25 @@ +From d2ddf9032d61f8344cd06ab2c4bb077771047e22 Mon Sep 17 00:00:00 2001 +From: Julian Smith <[email protected]> +Date: Sat, 22 Aug 2026 08:11:57 +0100 +Subject: [PATCH] src/extra.i: fix for swig-4.5. + +Python 2's PyString_FromString() is no longer provided by swig code. +Upstream: https://github.com/pymupdf/PyMuPDF/commit/d2ddf9032d61f8344cd06ab2c4bb077771047e22 +Signed-off-by: Raphaël Mélotte <[email protected]> +--- + src/extra.i | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/extra.i b/src/extra.i +index f62cdf83c..dd1670a2e 100644 +--- a/src/extra.i ++++ b/src/extra.i +@@ -225,7 +225,7 @@ static void messagev(const char* format, va_list va) + static PyObject* message_fn = PyObject_GetAttrString(pymupdf_module, "message"); + char* text; + vasprintf(&text, format, va); +- PyObject* text_py = PyString_FromString(text); ++ PyObject* text_py = PyUnicode_FromString(text); + PyObject* args = PyTuple_Pack(1, text_py); + PyObject* ret = PyObject_CallObject(message_fn, args); + Py_XDECREF(ret);
package/python-pymupdf/Config.in +2 -1
@@ -3,10 +3,11 @@ config BR2_PACKAGE_PYTHON_PYMUPDF depends on BR2_INSTALL_LIBSTDCPP # mupdf -> harfbuzz depends on BR2_TOOLCHAIN_HAS_SYNC_4 # mupdf -> harfbuzz depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # mupdf -> harfbuzz - depends on !BR2_STATIC_LIBS # runtime failure + depends on !BR2_STATIC_LIBS # mupdf python bindings select BR2_PACKAGE_HOST_SWIG select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_MUPDF + select BR2_PACKAGE_MUPDF_PYTHON_BINDINGS select BR2_PACKAGE_PYTHON3_ZLIB # runtime help Python bindings for the PDF rendering library MuPDF.
package/python-pymupdf/python-pymupdf.hash +2 -2
@@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/pymupdf/json -md5 5c219a0c4cb3d57b60e39cc901ebd220 PyMuPDF-1.23.22.tar.gz -sha256 c41cd91d83696cea67a4b6c65cc1951c2019ac0a561c5a3f543318ede30d3cd0 PyMuPDF-1.23.22.tar.gz +md5 ffd24ff2579b94e30151cf0e6ed95bcc pymupdf-1.28.2.tar.gz +sha256 5e0be7908a715aa20333caddd73f1d6f01e4cd0c26e869fa2dd0b7f344da2249 pymupdf-1.28.2.tar.gz # Locally computed sha256 checksums sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/python-pymupdf/python-pymupdf.mk +9 -7
@@ -5,21 +5,23 @@ ################################################################################ # python-pymupdf's version must be compatible with mupdf's version -PYTHON_PYMUPDF_VERSION = 1.23.22 -PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz -PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/05/20/a0d1221d8f379afcc12b4d1687a8f4adb69eef659e835d781c3fa331ff46 -PYTHON_PYMUPDF_SETUP_TYPE = setuptools +PYTHON_PYMUPDF_VERSION = 1.28.2 +PYTHON_PYMUPDF_SOURCE = pymupdf-$(PYTHON_PYMUPDF_VERSION).tar.gz +PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/a3/fb/b6761fa2d5266f2cdb24c3b91f4023070ab7848381417678e7a289a1d52a +PYTHON_PYMUPDF_SETUP_TYPE = pep517 PYTHON_PYMUPDF_LICENSE = AGPL-3.0+ PYTHON_PYMUPDF_LICENSE_FILES = COPYING # No license file included in pip, but it's present on github -PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf +PYTHON_PYMUPDF_DEPENDENCIES = freetype host-python-pipcl host-swig mupdf PYTHON_PYMUPDF_BUILD_OPTS = --skip-dependency-check +# LD needs to be overriden because pipcl expects it to be a linker +# driver (e.g. gcc) and not an actual linker. PYTHON_PYMUPDF_ENV = \ + LD=$(TARGET_CC) \ PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \ PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \ - PYMUPDF_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \ - PYMUPDF_SETUP_IMPLEMENTATIONS=a \ + PIPCL_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \ PYMUPDF_SETUP_MUPDF_BUILD= $(eval $(python-package))
support/testing/tests/package/sample_python_pymupdf.py +1 -1
@@ -1,4 +1,4 @@ -import fitz_old as fitz +import fitz # Write a test PDF file outfile = "python-pymupdf.pdf"
support/testing/tests/package/test_python_pymupdf.py +1 -1
@@ -9,7 +9,7 @@ class TestPythonPy3PyMuPDF(TestPythonPackageBase): BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_PYMUPDF=y BR2_TARGET_ROOTFS_EXT2=y - BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + BR2_TARGET_ROOTFS_EXT2_SIZE="240M" """ sample_scripts = ["tests/package/sample_python_pymupdf.py"] timeout = 30
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Raphaël,
Quoted 10 lines
-----Original Message-----
From: buildroot <[email protected]> On Behalf Of Raphaël Mélotte via buildroot
Sent: Monday, October 5, 2026 10:41 AM
To: [email protected]
Cc: James Hilliard <[email protected]>; Raphaël Mélotte <[email protected]>
Subject: [External] - [Buildroot] [PATCH v2 2/2] package/mupdf, python-
pymupdf: bump to versions 1.28.5 and 1.28.2
Quoted 3 lines
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.html
I saw that 2.0 was released recently and I wonder if that's a better option for master?
I ask because we're looking at Python 3.15 support in Buildroot and it looks like PyMuPDF added support in 2.0 (buildroots pymupdf tests fail on 3.15 due to build issues).
Given the major version number change, I imagine compatibility may be broken but it may be ideal for inclusion in master with security fixes ported to LTS branches?
Do maintainers have thoughts?
-Vincent
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Hi Vincent,
Quoted 6 lines · Vincent Fazio
I saw that 2.0 was released recently and I wonder if that's a better option for master?
I ask because we're looking at Python 3.15 support in Buildroot and it looks like PyMuPDF added support in 2.0 (buildroots pymupdf tests fail on 3.15 due to build issues).
Given the major version number change, I imagine compatibility may be broken but it may be ideal for inclusion in master with security fixes ported to LTS branches?
I can bump python-pymupdf to 2.0 and send a new series yes.
Despite the major version number change, there doesn't seem to be any major breaking change (except that some older python versions are no longer supported).
I haven't tried to build python-pymupdf 2.0 with python 3.15 yet though, I've no idea if it builds yet.
For the LTS branches yes, individual patches would be better. I still have to check which ones and if they apply.
Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 1.28.2
Quoted 16 lines
-----Original Message-----
From: Raphaël Mélotte <[email protected]>
Sent: Wednesday, October 28, 2026 10:33 AM
To: Vincent Fazio <[email protected]>; [email protected]
Cc: James Hilliard <[email protected]>
Subject: [External] - Re: [Buildroot] [PATCH v2 2/2] package/mupdf, python-
pymupdf: bump to versions 1.28.5 and 1.28.2Hi Vincent,
Quoted 2 lines · Vincent Fazio
I saw that 2.0 was released recently and I wonder if that's a better option for
master?
Quoted 1 line
Quoted 8 lines
Quoted 1 line
I ask because we're looking at Python 3.15 support in Buildroot and it looks
like PyMuPDF added support in 2.0 (buildroots pymupdf tests fail on 3.15 due to build issues).
Quoted 2 lines
Given the major version number change, I imagine compatibility may be
broken but it may be ideal for inclusion in master with security fixes ported to LTS branches?
I can bump python-pymupdf to 2.0 and send a new series yes.
Thanks!
Quoted 6 lines
Despite the major version number change, there doesn't seem to be any major breaking change (except that some older python versions are no longer supported).
I haven't tried to build python-pymupdf 2.0 with python 3.15 yet though, I've no idea if it builds yet.
I have a branch locally with a patch from Bernd [0] (though I bumped it to 3.15.1). I can apply your patch and rerun tests.
-Vincent
[0]: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 1/2 package/python-pipcl: new host package
In reply to Raphaël Mélotte via buildrootpipcl used to be bundled in python-pymupdf, but is now available as a separate package.
--- DEVELOPERS | 1 + package/python-pipcl/python-pipcl.hash | 5 +++++ package/python-pipcl/python-pipcl.mk | 15 +++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 package/python-pipcl/python-pipcl.hash create mode 100644 package/python-pipcl/python-pipcl.mk
DEVELOPERS +1 -0
@@ -2871,6 +2871,7 @@ F: package/mupdf/ F: package/python-boto3/ F: package/python-botocore/ F: package/python-jmespath/ +F: package/python-pipcl/ F: package/python-pymupdf/ F: package/python-rsa/ F: package/python-s3transfer/
package/python-pipcl/python-pipcl.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pipcl/json +md5 76883243610278b77725feb1813141f8 pipcl-12.tar.gz +sha256 c7545480cfa808500d8b606da73db7f89a872258bcdb293716126e2ccff1a5c6 pipcl-12.tar.gz +# Locally computed sha256 checksums +sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/python-pipcl/python-pipcl.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# python-pipcl +# +################################################################################ + +PYTHON_PIPCL_VERSION = 12 +PYTHON_PIPCL_SOURCE = pipcl-$(PYTHON_PIPCL_VERSION).tar.gz +PYTHON_PIPCL_SITE = https://files.pythonhosted.org/packages/64/1a/9ab2b272def9db9c80bf18fe8282119c2c4c074cc542030a28e4136dd13b +PYTHON_PIPCL_SETUP_TYPE = pep517 +PYTHON_PIPCL_LICENSE = AGPL-3.0+ +PYTHON_PIPCL_LICENSE_FILES = COPYING +HOST_PYTHON_PIPCL_DEPENDENCIES = host-python-packaging + +$(eval $(host-python-package))
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 2/2 package/mupdf, python-pymupdf: bump to versions 1.28.5 and 2.0
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.html
Note that this bump fixes multiple security vulnerabilities, and at least the following ones:
- CVE-2025-46206
- CVE-2025-71382
- CVE-2026-7233
- CVE-2026-40505
With this new python-pymupdf (and mupdf) version, we can no longer build the old implementation (the 'a' implementation). We now need to build mupdf's python binding, which require host-clang (and its python bindings) to be built.
Also note that python-mupdf's version still needs to stay close to mupdf's version, they can only be updated together.
A number of mupdf patches were needed:
- To allow changing the build-time log level from an environment variable.
- To be able to provide the libclang include directories. This is needed because our default libclang include directories are not properly set.
- To be able to link against mupdf with no versioning number.
- To fix build errors when generating the python bindings for python-pymupdf with clang 22.
- To fix build errors with uClibc.
- To make it possible to build without a venv.
In mupdf, setting JLIB_log_levels is not strictly necessary, but it greatly helps debugging build issues. It also only has an impact at build time anyway. To make it easier to debug potential future CI build failures, we enable it unconditionally.
brotli is also added as a new optional dependency, supported since mupdf v1.26.0.
Starting from version 1.28.1 pipcl is no longer bundled and needs to be installed separately, so add host-python-pipcl when we build the python bindings.
Starting from version 1.28.2, mupdf added the unconditional use of a venv, so disable it with MUPDF_NO_AUTOVENV.
In python-pymupdf, !BR2_STATIC_LIBS is now required by mupdf anyway, so update the comment accordingly.
pipcl (required to build python-pymupdf) used to be bundled in python-pymupdf but is now available as a separate package, so use it. This also allows us to use 'pep517' as the setup type. The test is also updated to use the new implementation.
For both packages, the patches that are now upstream are also removed.
The tarball filename for python-pymupdf has changed upstream so it is also updated accordingly.
These new versions no longer fit in the 120M rootfs configured for the runtime test, so double its size.
The mupdf builds are quite finicky on at least swig and libclang versions, so applying these changes on the Buildroot LTS branches should only be done with careful consideration (and making sure that it builds and passes the runtime test).
---
Changes v1 -> v2:
- Remove the select of BR2_PACKAGE_PYTHON_PIPCL
Changes v2 -> v3:
- Bump python-pymupdf to 2.0
...-incorrect-error-case-free-of-pixmap.patch | 53 -------- ...-jlib-fix-setting-filename-log-level.patch | 48 +++++++ ...y-to-provide-libclang-include-dirs-e.patch | 53 ++++++++ ...e-non-versioned-symlink-to-the-build.patch | 35 +++++ ...-log-level-through-environement-vari.patch | 53 ++++++++ ...rted-operand-type-when-setting-log-l.patch | 44 ++++++ ....py-class_add_iterator-assert-on-fin.patch | 41 ++++++ ...se.py-has_refs-recover-definition-cu.patch | 92 +++++++++++++ ...se.py-get_members-recover-definition.patch | 53 ++++++++ ...se.py-get_members-test-cursor.kind-n.patch | 78 +++++++++++ ...se.py-get_members-descend-into-anony.patch | 80 +++++++++++ ...-fitz-random.c-fix-build-with-uClibc.patch | 66 +++++++++ .../0012-scripts-make-venv-optional.patch | 52 ++++++++ package/mupdf/Config.in | 8 ++ package/mupdf/mupdf.hash | 6 +- package/mupdf/mupdf.mk | 55 ++++++-- ...w-providing-python-config-externally.patch | 125 ------------------ package/python-pymupdf/Config.in | 3 +- package/python-pymupdf/python-pymupdf.hash | 4 +- package/python-pymupdf/python-pymupdf.mk | 16 ++- .../tests/package/sample_python_pymupdf.py | 2 +- .../tests/package/test_python_pymupdf.py | 2 +- 22 files changed, 765 insertions(+), 204 deletions(-) delete mode 100644 package/mupdf/0001-Fix-incorrect-error-case-free-of-pixmap.patch create mode 100644 package/mupdf/0001-jlib-fix-setting-filename-log-level.patch create mode 100644 package/mupdf/0002-scripts-add-a-way-to-provide-libclang-include-dirs-e.patch create mode 100644 package/mupdf/0003-setup.py-add-the-non-versioned-symlink-to-the-build.patch create mode 100644 package/mupdf/0004-jlib-fix-setting-log-level-through-environement-vari.patch create mode 100644 package/mupdf/0005-jlib-fix-unsupported-operand-type-when-setting-log-l.patch create mode 100644 package/mupdf/0006-scripts-wrap-cpp.py-class_add_iterator-assert-on-fin.patch create mode 100644 package/mupdf/0007-scripts-wrap-parse.py-has_refs-recover-definition-cu.patch create mode 100644 package/mupdf/0008-scripts-wrap-parse.py-get_members-recover-definition.patch create mode 100644 package/mupdf/0009-scripts-wrap-parse.py-get_members-test-cursor.kind-n.patch create mode 100644 package/mupdf/0010-scripts-wrap-parse.py-get_members-descend-into-anony.patch create mode 100644 package/mupdf/0011-source-fitz-random.c-fix-build-with-uClibc.patch create mode 100644 package/mupdf/0012-scripts-make-venv-optional.patch delete mode 100644 package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch
package/mupdf/0001-Fix-incorrect-error-case-free-of-pixmap.patch deleted +0 -53
@@ -1,53 +0,0 @@ -From d4743b6092d513321c23c6f7fe5cff87cde043c1 Mon Sep 17 00:00:00 2001 -From: Robin Watts <[email protected]> -Date: Mon, 12 Jan 2026 19:08:56 +0000 -Subject: Bug 709029: Fix incorrect error-case free of pixmap. - -Don't free a pixmap we don't own! - -CVE: CVE-2026-25556 -Upstream: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=d4743b6092d513321c23c6f7fe5cff87cde043c1 -Signed-off-by: Thomas Perale <[email protected]> ---- - source/fitz/util.c | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/source/fitz/util.c b/source/fitz/util.c -index 7710124cc..90226a5c1 100644 ---- a/source/fitz/util.c -+++ b/source/fitz/util.c -@@ -119,7 +119,15 @@ fz_new_pixmap_from_display_list_with_separations(fz_context *ctx, fz_display_lis - else - fz_clear_pixmap_with_value(ctx, pix, 0xFF); - -- return fz_fill_pixmap_from_display_list(ctx, list, ctm, pix); -+ fz_try(ctx) -+ fz_fill_pixmap_from_display_list(ctx, list, ctm, pix); -+ fz_catch(ctx) -+ { -+ fz_drop_pixmap(ctx, pix); -+ fz_rethrow(ctx); -+ } -+ -+ return pix; - } - - fz_pixmap * -@@ -136,14 +144,9 @@ fz_fill_pixmap_from_display_list(fz_context *ctx, fz_display_list *list, fz_matr - fz_close_device(ctx, dev); - } - fz_always(ctx) -- { - fz_drop_device(ctx, dev); -- } - fz_catch(ctx) -- { -- fz_drop_pixmap(ctx, pix); - fz_rethrow(ctx); -- } - - return pix; - } --- -cgit v1.2.3 -
package/mupdf/0001-jlib-fix-setting-filename-log-level.patch new file +48 -0
48 lines not on this page · raw message
package/mupdf/0002-scripts-add-a-way-to-provide-libclang-include-dirs-e.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0003-setup.py-add-the-non-versioned-symlink-to-the-build.patch new file +35 -0
@@ -0,0 +1,35 @@ +From b8efb551ba65f6f0d737ca3760fe5e2dbac5743c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]> +Date: Tue, 3 Sep 2024 15:35:33 +0200 +Subject: [PATCH] setup.py: add the non-versioned symlink to the build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Starting from bf1c28cc4f2dd4bd17e35783fa3c1f98ded22296, the generated +mupdf libraries are versioned. This means that if we want to link +against them without knowing their version number (i.e. using +'-lmupdf'), we also need to install the symlink to the wheel. + +Upstream: https://github.com/ArtifexSoftware/mupdf/pull/59 +Signed-off-by: Raphaël Mélotte <[email protected]> +--- + setup.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/setup.py b/setup.py +index 49199f5..3252412 100755 +--- a/setup.py ++++ b/setup.py +@@ -357,6 +357,8 @@ def build(): + names = [ + pipcl.get_soname(f'{build_dir()}/libmupdf.so'), # C. + pipcl.get_soname(f'{build_dir()}/libmupdfcpp.so'), # C++. ++ f'{build_dir()}/libmupdf.so', # C symlink. ++ f'{build_dir()}/libmupdfcpp.so', # C++ symlink. + f'{build_dir()}/_mupdf.so', # Python internals. + f'{build_dir()}/mupdf.py', # Python. + ] +-- +2.54.0 +
package/mupdf/0004-jlib-fix-setting-log-level-through-environement-vari.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0005-jlib-fix-unsupported-operand-type-when-setting-log-l.patch new file +44 -0
44 lines not on this page · raw message
package/mupdf/0006-scripts-wrap-cpp.py-class_add_iterator-assert-on-fin.patch new file +41 -0
41 lines not on this page · raw message
package/mupdf/0007-scripts-wrap-parse.py-has_refs-recover-definition-cu.patch new file +92 -0
92 lines not on this page · raw message
package/mupdf/0008-scripts-wrap-parse.py-get_members-recover-definition.patch new file +53 -0
53 lines not on this page · raw message
package/mupdf/0009-scripts-wrap-parse.py-get_members-test-cursor.kind-n.patch new file +78 -0
78 lines not on this page · raw message
package/mupdf/0010-scripts-wrap-parse.py-get_members-descend-into-anony.patch new file +80 -0
80 lines not on this page · raw message
package/mupdf/0011-source-fitz-random.c-fix-build-with-uClibc.patch new file +66 -0
66 lines not on this page · raw message
package/mupdf/0012-scripts-make-venv-optional.patch new file +52 -0
52 lines not on this page · raw message
package/mupdf/Config.in +8 -0
@@ -20,3 +20,11 @@ comment "mupdf needs a toolchain w/ C++, gcc >= 4.9" depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_INSTALL_LIBSTDCPP || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +if BR2_PACKAGE_MUPDF +config BR2_PACKAGE_MUPDF_PYTHON_BINDINGS + bool "python bindings for mupdf" + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_HOST_SWIG +endif
package/mupdf/mupdf.hash +2 -4
@@ -1,8 +1,6 @@ # From https://mupdf.com/releases: -sha1 d79600bccd70ab9d0e8ee19dae4e275f2af95ced mupdf-1.23.9-source.tar.lz - -# Locally computed: -sha256 2c2f89deb9f425ba637dac226191d547f2b40975c4d21a340965f52c001e15c5 mupdf-1.23.9-source.tar.lz +sha1 1f0a14123a2410c3bdb63cb6bbef69d0f2518f6e mupdf-1.28.5-source.tar.lz +sha256 f33f3c672033324c38c7c9a1444c28436ede9669a28e2da672df7f6c62b8cfc8 mupdf-1.28.5-source.tar.lz # Hash for license files: sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/mupdf/mupdf.mk +45 -10
79 lines not on this page · raw message
package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch deleted +0 -125
125 lines not on this page · raw message
package/python-pymupdf/Config.in +2 -1
@@ -3,10 +3,11 @@ config BR2_PACKAGE_PYTHON_PYMUPDF depends on BR2_INSTALL_LIBSTDCPP # mupdf -> harfbuzz depends on BR2_TOOLCHAIN_HAS_SYNC_4 # mupdf -> harfbuzz depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # mupdf -> harfbuzz - depends on !BR2_STATIC_LIBS # runtime failure + depends on !BR2_STATIC_LIBS # mupdf python bindings select BR2_PACKAGE_HOST_SWIG select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_MUPDF + select BR2_PACKAGE_MUPDF_PYTHON_BINDINGS select BR2_PACKAGE_PYTHON3_ZLIB # runtime help Python bindings for the PDF rendering library MuPDF.
package/python-pymupdf/python-pymupdf.hash +2 -2
@@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/pymupdf/json -md5 5c219a0c4cb3d57b60e39cc901ebd220 PyMuPDF-1.23.22.tar.gz -sha256 c41cd91d83696cea67a4b6c65cc1951c2019ac0a561c5a3f543318ede30d3cd0 PyMuPDF-1.23.22.tar.gz +md5 5c0cf589c291b30707e2ca591114cbf2 pymupdf-2.0.tar.gz +sha256 7733136f626fffe98677daa53c906eb45f2eb486a6450dbcfd652cbbd760f1e2 pymupdf-2.0.tar.gz # Locally computed sha256 checksums sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
package/python-pymupdf/python-pymupdf.mk +9 -7
@@ -5,21 +5,23 @@ ################################################################################ # python-pymupdf's version must be compatible with mupdf's version -PYTHON_PYMUPDF_VERSION = 1.23.22 -PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz -PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/05/20/a0d1221d8f379afcc12b4d1687a8f4adb69eef659e835d781c3fa331ff46 -PYTHON_PYMUPDF_SETUP_TYPE = setuptools +PYTHON_PYMUPDF_VERSION = 2.0 +PYTHON_PYMUPDF_SOURCE = pymupdf-$(PYTHON_PYMUPDF_VERSION).tar.gz +PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/b0/23/3575cf6652171bba33fd4b41d34ab92c7ee75bb5e5790f5a2a044b9ba49b +PYTHON_PYMUPDF_SETUP_TYPE = pep517 PYTHON_PYMUPDF_LICENSE = AGPL-3.0+ PYTHON_PYMUPDF_LICENSE_FILES = COPYING # No license file included in pip, but it's present on github -PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf +PYTHON_PYMUPDF_DEPENDENCIES = freetype host-python-pipcl host-swig mupdf PYTHON_PYMUPDF_BUILD_OPTS = --skip-dependency-check +# LD needs to be overriden because pipcl expects it to be a linker +# driver (e.g. gcc) and not an actual linker. PYTHON_PYMUPDF_ENV = \ + LD=$(TARGET_CC) \ PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \ PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \ - PYMUPDF_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \ - PYMUPDF_SETUP_IMPLEMENTATIONS=a \ + PIPCL_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \ PYMUPDF_SETUP_MUPDF_BUILD= $(eval $(python-package))
support/testing/tests/package/sample_python_pymupdf.py +1 -1
@@ -1,4 +1,4 @@ -import fitz_old as fitz +import fitz # Write a test PDF file outfile = "python-pymupdf.pdf"
support/testing/tests/package/test_python_pymupdf.py +1 -1
@@ -9,7 +9,7 @@ class TestPythonPy3PyMuPDF(TestPythonPackageBase): BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_PYMUPDF=y BR2_TARGET_ROOTFS_EXT2=y - BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + BR2_TARGET_ROOTFS_EXT2_SIZE="240M" """ sample_scripts = ["tests/package/sample_python_pymupdf.py"] timeout = 30
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 2.0
Raphaël,
Quoted 10 lines
-----Original Message-----
From: Raphaël Mélotte <[email protected]>
Sent: Wednesday, October 28, 2026 11:15 AM
To: [email protected]
Cc: Vincent Fazio <[email protected]>; Raphaël Mélotte <[email protected]>; James Hilliard <[email protected]>; Yegor Yefremov <[email protected]>
Subject: [External] - [PATCH v3 2/2] package/mupdf,python-pymupdf: bump to versions 1.28.5 and 2.0
Quoted 7 lines
Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.htmlStarting from version 1.28.1 pipcl is no longer bundled and needs to be installed separately, so add host-python-pipcl when we build the python bindings.
I'm probably missing something obvious, but I do not see this package in master and I ran into:
make[1]: *** No rule to make target 'host-python-pipcl', needed by '/home/vfazio/development/buildroot/output/TestPythonPy3PyMuPDF/build/mupdf-1.28.5/.stamp_configured'. Stop.
While trying to run the pymupdf unit test when testing your patch on top of my 3.15 branch which is based on master
-Vincent
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 2.0
Hi Vincent,
Quoted 9 lines · Vincent Fazio
Raphaël,
I'm probably missing something obvious, but I do not see this package in master and I ran into:
make[1]: *** No rule to make target 'host-python-pipcl', needed by '
/home/vfazio/development/buildroot/output/TestPythonPy3PyMuPDF/build/mupdf-1.28.5/.stamp_configured'. Stop.While trying to run the pymupdf unit test when testing your patch on top of my 3.15 branch which is based on master
host-python-pipcl is not part of Buildroot master yet, it's part of the same series that updates mupdf: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
I'll also see if I can run the python-pymupdf runtime test with python 3.15, just to check in case anything breaks.
Kind regards,
Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 2.0
Quoted 26 lines
-----Original Message-----
From: Raphaël Mélotte <[email protected]>
Sent: Thursday, October 29, 2026 3:53 PM
To: Vincent Fazio <[email protected]>; [email protected]
Cc: James Hilliard <[email protected]>; Yegor Yefremov <[email protected]>
Subject: [External] - Re: [PATCH v3 2/2] package/mupdf,python-pymupdf: bump to versions 1.28.5 and 2.0Hi Vincent,
Quoted 5 lines · Vincent Fazio
Raphaël,
I'm probably missing something obvious, but I do not see this package in
master and I ran into:
Quoted 2 lines
make[1]: *** No rule to make target 'host-python-pipcl', needed by
'
/home/vfazio/development/buildroot/output/TestPythonPy3PyMuPDF/build/mupdf-1.28.5/.stamp_configured'. Stop.Quoted 1 line
Quoted 7 lines
Quoted 1 line
While trying to run the pymupdf unit test when testing your patch on top of
my 3.15 branch which is based on master
host-python-pipcl is not part of Buildroot master yet, it's part of the same series that updates mupdf:
https://patchwork.buildroot.org/project/buildroot/patch/20261028161447.3305
[email protected]/
I knew it was something obvious, when I downloaded the mbox I didn't grab the series so missed this patch.
Sorry for the noise.
-Vincent
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 2.0
In reply to Raphaël Mélotte via buildrootQuoted 71 lines
-----Original Message-----
From: Raphaël Mélotte <[email protected]>
Sent: Wednesday, October 28, 2026 11:15 AM
To: [email protected]
Cc: Vincent Fazio <[email protected]>; Raphaël Mélotte <[email protected]>; James Hilliard <[email protected]>; Yegor Yefremov <[email protected]>
Subject: [External] - [PATCH v3 2/2] package/mupdf,python-pymupdf: bump to versions 1.28.5 and 2.0Release notes:
https://mupdf.com/releases
https://pymupdf.readthedocs.io/en/latest/changes.htmlNote that this bump fixes multiple security vulnerabilities, and at least the following ones:
- CVE-2025-46206
- CVE-2025-71382
- CVE-2026-7233
- CVE-2026-40505With this new python-pymupdf (and mupdf) version, we can no longer build the old implementation (the 'a' implementation). We now need to build mupdf's python binding, which require host-clang (and its python bindings) to be built.
Also note that python-mupdf's version still needs to stay close to mupdf's version, they can only be updated together.
A number of mupdf patches were needed:
- To allow changing the build-time log level from an environment variable.
- To be able to provide the libclang include directories. This is needed because our default libclang include directories are not properly set.
- To be able to link against mupdf with no versioning number.
- To fix build errors when generating the python bindings for python-pymupdf with clang 22.
- To fix build errors with uClibc.
- To make it possible to build without a venv.In mupdf, setting
JLIB_log_levelsis not strictly necessary, but it greatly helps debugging build issues. It also only has an impact at build time anyway. To make it easier to debug potential future CI build failures, we enable it unconditionally.
brotli is also added as a new optional dependency, supported since mupdf v1.26.0.
Starting from version 1.28.1 pipcl is no longer bundled and needs to be installed separately, so add host-python-pipcl when we build the python bindings.
Starting from version 1.28.2, mupdf added the unconditional use of a venv, so disable it withMUPDF_NO_AUTOVENV.In python-pymupdf, !BR2_STATIC_LIBS is now required by mupdf anyway, so update the comment accordingly.
pipcl (required to build python-pymupdf) used to be bundled in python-pymupdf but is now available as a separate package, so use it. This also allows us to use 'pep517' as the setup type. The test is also updated to use the new implementation.For both packages, the patches that are now upstream are also removed.
The tarball filename for python-pymupdf has changed upstream so it is also updated accordingly.
These new versions no longer fit in the 120M rootfs configured for the runtime test, so double its size.
Quoted 6 lines
The mupdf builds are quite finicky on at least swig and libclang versions, so applying these changes on the Buildroot LTS branches should only be done with careful consideration (and making sure that it builds and passes the runtime test).
Signed-off-by Raphaël Mélotte <[email protected]>
I ran the build and PyMuPDF unit test on master and on top of Bernd's Python 3.15.2 patch and can confirm they both pass.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 2/2] package/mupdf, python-pymupdf: bump to versions 1.28.5 and 2.0
Hi Vincent,
Quoted 3 lines · Vincent Fazio
I ran the build and PyMuPDF unit test on master and on top of Bernd's Python 3.15.2 patch and can confirm they both pass.
Tested-by Vincent Fazio <[email protected]>
Good to know, thanks for testing it!
Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot