summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-08-22 22:10:15 +0200
committerThomas Deutschmann <whissi@gentoo.org>2018-08-22 22:21:37 +0200
commitd7a032cff6e0627807183b4760944ebb9ce700b5 (patch)
treeddb25aacc11e5bb983d224aa0c3b926d8dcc232f /media-gfx
parentdev-php/PEAR-Archive_Tar: Version bump for 1.4.3 (diff)
downloadgentoo-d7a032cff6e0627807183b4760944ebb9ce700b5.tar.gz
gentoo-d7a032cff6e0627807183b4760944ebb9ce700b5.tar.bz2
gentoo-d7a032cff6e0627807183b4760944ebb9ce700b5.zip
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
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/imagemagick/files/policy.test.xml17
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.10.10-r1.ebuild7
-rw-r--r--media-gfx/imagemagick/imagemagick-7.0.8.10-r1.ebuild7
-rw-r--r--media-gfx/imagemagick/imagemagick-9999.ebuild7
4 files changed, 38 insertions, 0 deletions
diff --git a/media-gfx/imagemagick/files/policy.test.xml b/media-gfx/imagemagick/files/policy.test.xml
new file mode 100644
index 00000000000..6db44b76d25
--- /dev/null
+++ b/media-gfx/imagemagick/files/policy.test.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policymap [
+ <!ELEMENT policymap (policy)+>
+ <!ATTLIST policymap xmlns CDATA #FIXED ''>
+ <!ELEMENT policy EMPTY>
+ <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
+ name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
+ stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
+]>
+<policymap>
+ <!-- Policy used for test suite only to allow passing test suite
+ in case user has installed a restriction which would prevent
+ the execution of some tests -->
+ <policy domain="delegate" rights="read|write" pattern="*" />
+ <policy domain="filter" rights="read|write" pattern="*" />
+ <policy domain="coder" rights="read|write" pattern="*" />
+</policymap>
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 1d686b48b4d..660eaf75020 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 37caf38d4eb..be9dabf5dac 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 c4e21494402..7b3cfc9af8a 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