From c3f91116636439616c6b85c6023a9f6a2670d5ff Mon Sep 17 00:00:00 2001 From: Litao Gao Date: Thu, 30 Apr 2020 01:38:48 -0400 Subject: [PATCH] barbican: fix path issue in service unitfile and missing dir - use systemd-tmpfiles to create missing /var/log/barbican Issue-ID: INF-38 Signed-off-by: Litao Gao Change-Id: Id774e8859259289ecaba578726b9998edb5e47cb --- .../python/files/python-barbican/openstack-barbican-api.service | 4 ++-- meta-stx/recipes-devtools/python/python-barbican_git.bb | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meta-stx/recipes-devtools/python/files/python-barbican/openstack-barbican-api.service b/meta-stx/recipes-devtools/python/files/python-barbican/openstack-barbican-api.service index 197a281..d1e9cc0 100644 --- a/meta-stx/recipes-devtools/python/files/python-barbican/openstack-barbican-api.service +++ b/meta-stx/recipes-devtools/python/files/python-barbican/openstack-barbican-api.service @@ -10,8 +10,8 @@ Group=barbican RuntimeDirectory=barbican RuntimeDirectoryMode=770 ExecStart=/usr/bin/gunicorn --pid /run/barbican/pid -c /etc/barbican/gunicorn-config.py --paste /etc/barbican/barbican-api-paste.ini -ExecReload=/usr/bin/kill -s HUP $MAINPID -ExecStop=/usr/bin/kill -s TERM $MAINPID +ExecReload=/bin/kill -s HUP $MAINPID +ExecStop=/bin/kill -s TERM $MAINPID StandardError=syslog Restart=on-failure diff --git a/meta-stx/recipes-devtools/python/python-barbican_git.bb b/meta-stx/recipes-devtools/python/python-barbican_git.bb index 93b79ef..6eabfbe 100644 --- a/meta-stx/recipes-devtools/python/python-barbican_git.bb +++ b/meta-stx/recipes-devtools/python/python-barbican_git.bb @@ -88,6 +88,9 @@ do_install_append() { sed -e "s:%BARBICAN_CONF_DIR%:${sysconfdir}/${SRCNAME}:g" \ -i ${D}/${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/tests/api/test_resources_policy.py + + install -m 0755 -d ${D}/${sysconfdir}/tmpfiles.d + echo "d ${localstatedir}/log/barbican 0750 barbican barbican -" >> ${D}/${sysconfdir}/tmpfiles.d/barbican.conf } USERADD_PACKAGES = "${PN}" @@ -106,6 +109,7 @@ FILES_${SRCNAME} = "${sysconfdir}/${SRCNAME}/* \ ${bindir}/* \ ${localstatedir}/* \ ${systemd_system_unitdir} \ + ${sysconfdir}/tmpfiles.d/barbican.conf \ " ALLOW_EMPTY_${SRCNAME}-setup = "1" -- 2.16.6