From d7a032cff6e0627807183b4760944ebb9ce700b5 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Wed, 22 Aug 2018 22:10:15 +0200 Subject: [PATCH] media-gfx/imagemagick: provide unrestricted policy during build to pass tests Closes: https://bugs.gentoo.org/664238 Package-Manager: Portage-2.3.48, Repoman-2.3.10 --- media-gfx/imagemagick/files/policy.test.xml | 17 +++++++++++++++++ .../imagemagick/imagemagick-6.9.10.10-r1.ebuild | 7 +++++++ .../imagemagick/imagemagick-7.0.8.10-r1.ebuild | 7 +++++++ media-gfx/imagemagick/imagemagick-9999.ebuild | 7 +++++++ 4 files changed, 38 insertions(+) create mode 100644 media-gfx/imagemagick/files/policy.test.xml diff --git a/media-gfx/imagemagick/files/policy.test.xml b/media-gfx/imagemagick/files/policy.test.xml new file mode 100644 index 000000000000..6db44b76d252 --- /dev/null +++ b/media-gfx/imagemagick/files/policy.test.xml @@ -0,0 +1,17 @@ + + + + + +]> + + + + + + diff --git a/media-gfx/imagemagick/imagemagick-6.9.10.10-r1.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.10-r1.ebuild index 1d686b48b4d3..660eaf750203 100644 --- a/media-gfx/imagemagick/imagemagick-6.9.10.10-r1.ebuild +++ b/media-gfx/imagemagick/imagemagick-6.9.10.10-r1.ebuild @@ -69,6 +69,13 @@ S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}"/policy-hardening.patch ) src_prepare() { + # Install default (unrestricted) policy in $HOME for test suite #664238 + local _im_local_config_home="${HOME}/.config/ImageMagick" + mkdir -p "${_im_local_config_home}" || \ + die "Failed to create IM config dir in '${_im_local_config_home}'" + cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ + die "Failed to install default blank policy.xml in '${_im_local_config_home}'" + local mesa_cards ati_cards nvidia_cards render_cards default diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.10-r1.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.10-r1.ebuild index 37caf38d4eb9..be9dabf5daca 100644 --- a/media-gfx/imagemagick/imagemagick-7.0.8.10-r1.ebuild +++ b/media-gfx/imagemagick/imagemagick-7.0.8.10-r1.ebuild @@ -76,6 +76,13 @@ REQUIRED_USE="corefonts? ( truetype ) S="${WORKDIR}/${MY_P}" src_prepare() { + # Install default (unrestricted) policy in $HOME for test suite #664238 + local _im_local_config_home="${HOME}/.config/ImageMagick" + mkdir -p "${_im_local_config_home}" || \ + die "Failed to create IM config dir in '${_im_local_config_home}'" + cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ + die "Failed to install default blank policy.xml in '${_im_local_config_home}'" + local ati_cards mesa_cards nvidia_cards render_cards default diff --git a/media-gfx/imagemagick/imagemagick-9999.ebuild b/media-gfx/imagemagick/imagemagick-9999.ebuild index c4e214944021..7b3cfc9af8aa 100644 --- a/media-gfx/imagemagick/imagemagick-9999.ebuild +++ b/media-gfx/imagemagick/imagemagick-9999.ebuild @@ -76,6 +76,13 @@ REQUIRED_USE="corefonts? ( truetype ) S="${WORKDIR}/${MY_P}" src_prepare() { + # Install default (unrestricted) policy in $HOME for test suite #664238 + local _im_local_config_home="${HOME}/.config/ImageMagick" + mkdir -p "${_im_local_config_home}" || \ + die "Failed to create IM config dir in '${_im_local_config_home}'" + cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ + die "Failed to install default blank policy.xml in '${_im_local_config_home}'" + local ati_cards mesa_cards nvidia_cards render_cards default -- 2.26.2