Bug#991067: x4d-icons FTBFS with imagemagick with the #987504 change

2022-12-06 Thread Santiago Vila

Hi.

I've just made a QA upload (1.2-5) which replaces the workaround for the 
FTBFS problem by a proper fix based on the patch by Dennis Filder.

(The debhelper feature allowing this is really great)

I plan to do an upload for stable as well.

[ CC to all involved parties ]

Thanks.



Bug#991067: x4d-icons FTBFS with imagemagick with the #987504 change

2021-07-15 Thread Dennis Filder
Control: tag -1 patch

The attached patch should fix this by loading a more permissive policy.

Regards,
Dennis Filder.
Description: Override overly strict ImageMagick coder policy (#987504)
 This creates a more permissive version of
 /etc/ImageMagick-6/policy.xml and ensures it gets loaded after the
 one from /etc.
 .
 It is done by means of a patch to make use of the debhelper-provided
 $HOME visible by dh_auto_*.
 .
 The relevant code is at:
 https://sources.debian.org/src/imagemagick/8:6.9.11.60+dfsg-1.3/magick/configure.c/#L860
Author: Dennis Filder 
Last-Updated: 2021-07-15
--- a/generate.sh
+++ b/generate.sh
@@ -33,6 +33,29 @@
 generate XML '1.0' xml10
 generate XML '1.1' xml11
 
+# this relies on debhelper providing a $HOME directory for us to write
+# to
+polfile="/etc/$(convert -version|sed -n '/^Version: /s@Version: ImageMagick \([[:digit:]]\+\)\..*@ImageMagick-\1@p')"/policy.xml
+if [ ! -f "$polfile" ]; then
+echo "Error: generate.sh: Policy file not found: $polfile" >&2;
+exit 1
+fi
+if [ -e "$HOME"/.magick ]; then
+rm -Rf "$HOME"/.magick
+fi;
+if [ -e "$HOME"/.magick ]; then
+echo "Error: generate.sh: Failed to remove $HOME/.magick -- remove manually and try again." >&2;
+exit 1
+fi
+mkdir "$HOME"/.magick
+if [ ! -d "$HOME"/.magick ]; then
+echo "Error: generate.sh: Failed to create $HOME/.magick -- investigate, fix manually, then try again." >&2;
+exit 1;
+fi
+
+sed -e '//s@"none"@"read|write"@' "$polfile" \
+> "$HOME"/.magick/policy.xml
+
 /bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -I{} convert -background none {}-v.svg {}.png
 /bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -I{} convert -background none {}-v.svg {}.gif
 /bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -I{} convert -background none {}-v.svg {}-v.eps


Bug#991067: x4d-icons FTBFS with imagemagick with the #987504 change

2021-07-13 Thread Adrian Bunk
Source: x4d-icons
Version: 1.2-1
Severity: serious
Tags: ftbfs

https://tests.reproducible-builds.org/debian/rb-pkg/buster/amd64/x4d-icons.html

...
   dh_auto_build
make -j1
make[1]: Entering directory '/build/x4d-icons-1.2'
TZ=UTC faketime -f '2014-05-03 00:00:00' ./generate.sh
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: attempt to perform an operation not allowed by the security 
policy `EPS' @