El 5/12/22 a las 7:46, Stéphane Glondu escribió:
Did you try the supplied patch?
Good question.
I've just checked and yes, the supplied patch works.
So, here is my proposal to fix this in bullseye (debdiff against
0.8.2-4, the stable version).
Thanks.diff -Nru mlpost-0.8.2/debian/changelog mlpost-0.8.2/debian/changelog
--- mlpost-0.8.2/debian/changelog 2020-07-28 10:43:05.0 +0200
+++ mlpost-0.8.2/debian/changelog 2022-12-05 14:08:00.0 +0100
@@ -1,3 +1,9 @@
+mlpost (0.8.2-4+deb11u1) bullseye; urgency=medium
+
+ * Apply patch by Dennis Filder to override ImageMagick policy. Closes:
#991060.
+
+ -- Stéphane Glondu Mon, 05 Dec 2022 14:08:00 +0100
+
mlpost (0.8.2-4) unstable; urgency=medium
* Add empty dh_dwz override to fix FTBFS
diff -Nru mlpost-0.8.2/debian/patches/0009-Override-ImageMagick-policy.patch
mlpost-0.8.2/debian/patches/0009-Override-ImageMagick-policy.patch
--- mlpost-0.8.2/debian/patches/0009-Override-ImageMagick-policy.patch
1970-01-01 01:00:00.0 +0100
+++ mlpost-0.8.2/debian/patches/0009-Override-ImageMagick-policy.patch
2022-12-05 14:06:36.0 +0100
@@ -0,0 +1,27 @@
+Description: Override ImageMagick policy
+ Derive an appropriate policy from the too strict default one.
+Author: Dennis Filder
+Last-Update: 2021-07-16
+Bug-Debian: https://bugs.debian.org/991060
+
+--- a/ocamlbuild.Makefile
b/ocamlbuild.Makefile
+@@ -44,6 +44,7 @@
+ EXTDLL = .so
+ DLL := backend/dllmlpost_ft$(EXTDLL) backend/libmlpost_ft.a
+
++POLFILE = "/etc/$(shell convert -version|sed -n '/^Version: /s@Version:
ImageMagick \([[:digit:]]\+\)\..*@ImageMagick-\1@p')"/policy.xml
+
+ ifeq "$(OCAMLBEST)" "opt"
+ all:
+@@ -195,7 +196,10 @@
+ .PHONY: doc
+ doc:
+ rm -f doc
++ test -d $(HOME)/.magick || mkdir -p $(HOME)/.magick
++ sed -e '//s@"none"@"read|write"@' $(POLFILE) > $(HOME)/.magick/policy.xml
+ $(OCAMLBUILD) doc/index.html
++ rm -Rf $(HOME)/.magick
+ ln -s _build/doc doc
+
+ # clean
diff -Nru mlpost-0.8.2/debian/patches/series mlpost-0.8.2/debian/patches/series
--- mlpost-0.8.2/debian/patches/series 2020-07-28 10:43:05.0 +0200
+++ mlpost-0.8.2/debian/patches/series 2022-12-05 14:06:36.0 +0100
@@ -6,3 +6,4 @@
0006-Bitstring-now-uses-str.patch
0007-Adjust-myocamlbuild-to-use-cppo-and-ppx.patch
0008-The-bitstring-library-now-needs-str.patch
+0009-Override-ImageMagick-policy.patch