diff options
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-barbican/barbican-fix-path-to-find-configuration-files.patch | 33 | ||||
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-barbican_git.bb | 4 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-barbican/barbican-fix-path-to-find-configuration-files.patch b/meta-openstack/recipes-devtools/python/python-barbican/barbican-fix-path-to-find-configuration-files.patch new file mode 100644 index 0000000..8fd1010 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-barbican/barbican-fix-path-to-find-configuration-files.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 30a57a0b4f2dcaff76821f21f4a545ecb9ddf194 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Keith Holman <Keith.Holman@windriver.com> | ||
| 3 | Date: Fri, 13 Jun 2014 13:46:04 -0400 | ||
| 4 | Subject: [PATCH] barbican: fix path to find configuration files | ||
| 5 | |||
| 6 | Barbican attempts to find configuration files for tests based on where | ||
| 7 | the files are located within the source tree. On deployment, | ||
| 8 | configuration files are installed to a directory specified by a build | ||
| 9 | recipe. This fix updates the location for the configuration files | ||
| 10 | with an identifier that is replaced during deployment. | ||
| 11 | |||
| 12 | Signed-off-by: Keith Holman <Keith.Holman@windriver.com> | ||
| 13 | --- | ||
| 14 | barbican/tests/api/test_resources_policy.py | 3 +-- | ||
| 15 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/barbican/tests/api/test_resources_policy.py b/barbican/tests/api/test_resources_policy.py | ||
| 18 | index 7d995c6..28b7599 100644 | ||
| 19 | --- a/barbican/tests/api/test_resources_policy.py | ||
| 20 | +++ b/barbican/tests/api/test_resources_policy.py | ||
| 21 | @@ -35,8 +35,7 @@ from barbican.openstack.common import policy | ||
| 22 | CONF = cfg.CONF | ||
| 23 | |||
| 24 | # Point to the policy.json file located in source control. | ||
| 25 | -TEST_VAR_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), | ||
| 26 | - '../../../etc', 'barbican')) | ||
| 27 | +TEST_VAR_DIR = "%BARBICAN_CONF_DIR%" | ||
| 28 | |||
| 29 | ENFORCER = policy.Enforcer() | ||
| 30 | |||
| 31 | -- | ||
| 32 | 1.9.3 | ||
| 33 | |||
diff --git a/meta-openstack/recipes-devtools/python/python-barbican_git.bb b/meta-openstack/recipes-devtools/python/python-barbican_git.bb index 0b6a6a7..8e53efd 100644 --- a/meta-openstack/recipes-devtools/python/python-barbican_git.bb +++ b/meta-openstack/recipes-devtools/python/python-barbican_git.bb | |||
| @@ -11,6 +11,7 @@ BARBICAN_MAX_PACKET_SIZE ?= "65535" | |||
| 11 | SRC_URI = "git://github.com/openstack/barbican.git;branch=master \ | 11 | SRC_URI = "git://github.com/openstack/barbican.git;branch=master \ |
| 12 | file://barbican.init \ | 12 | file://barbican.init \ |
| 13 | file://barbican-increase-buffer-size-to-support-PKI-tokens.patch \ | 13 | file://barbican-increase-buffer-size-to-support-PKI-tokens.patch \ |
| 14 | file://barbican-fix-path-to-find-configuration-files.patch \ | ||
| 14 | " | 15 | " |
| 15 | 16 | ||
| 16 | SRCREV="177d4499af6b261f48814503e3565f433e86cc66" | 17 | SRCREV="177d4499af6b261f48814503e3565f433e86cc66" |
| @@ -42,6 +43,9 @@ do_install_append() { | |||
| 42 | rm -f ${D}/usr/bin/barbican.sh | 43 | rm -f ${D}/usr/bin/barbican.sh |
| 43 | rm -f ${D}/usr/bin/barbican-worker.py | 44 | rm -f ${D}/usr/bin/barbican-worker.py |
| 44 | fi | 45 | fi |
| 46 | |||
| 47 | sed -e "s:%BARBICAN_CONF_DIR%:${sysconfdir}/${SRCNAME}:g" \ | ||
| 48 | -i ${D}/${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/tests/api/test_resources_policy.py | ||
| 45 | } | 49 | } |
| 46 | 50 | ||
| 47 | USERADD_PACKAGES = "${PN}" | 51 | USERADD_PACKAGES = "${PN}" |
