From 70f5b5f3ccbf38c91893dd69afadfa72ea0ffd43 Mon Sep 17 00:00:00 2001 From: Litao Gao Date: Mon, 27 Apr 2020 10:27:23 -0400 Subject: [PATCH] barbican: fixes to enable barbican-api execution - create /bin/python symbolic lin - create /var/log/barbican/ - use /bin/kill in service unit file Issue-ID: INF-38 Signed-off-by: Litao Gao Change-Id: I2c910e98da6b7d1c4deddc5a4bd55cd3a1af4265 --- .../recipes-devtools/python/python_2.7.17.bbappend | 23 ++++++++++++++++++++++ .../files/openstack-barbican-api.service | 4 ++-- .../openstack-barbican-api.bb | 2 ++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 meta-stx/recipes-devtools/python/python_2.7.17.bbappend diff --git a/meta-stx/recipes-devtools/python/python_2.7.17.bbappend b/meta-stx/recipes-devtools/python/python_2.7.17.bbappend new file mode 100644 index 0000000..7e41c90 --- /dev/null +++ b/meta-stx/recipes-devtools/python/python_2.7.17.bbappend @@ -0,0 +1,23 @@ +# +## Copyright (C) 2019 Wind River Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +pkg_postinst_${PN}-core () { + # several scritps assume /bin/python is available + ln -sf ${bindir}/python $D${base_bindir}/python +} + + + diff --git a/meta-stx/recipes-support/openstack-barbican-api/files/openstack-barbican-api.service b/meta-stx/recipes-support/openstack-barbican-api/files/openstack-barbican-api.service index 197a281..d1e9cc0 100644 --- a/meta-stx/recipes-support/openstack-barbican-api/files/openstack-barbican-api.service +++ b/meta-stx/recipes-support/openstack-barbican-api/files/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-support/openstack-barbican-api/openstack-barbican-api.bb b/meta-stx/recipes-support/openstack-barbican-api/openstack-barbican-api.bb index 9b49e05..9c9f8a1 100644 --- a/meta-stx/recipes-support/openstack-barbican-api/openstack-barbican-api.bb +++ b/meta-stx/recipes-support/openstack-barbican-api/openstack-barbican-api.bb @@ -41,6 +41,7 @@ do_install() { install -m 0755 -d ${D}/${datadir}/starlingx/barbican/ install -m 0755 -d ${D}/${datadir}/starlingx/barbican/backup/ install -m 0755 -d ${D}/${systemd_system_unitdir}/ + install -m 0755 -d ${D}/var/log/barbican/ install -m 0644 ${WORKDIR}/barbican.conf ${D}/${datadir}/starlingx/barbican install -m 0644 ${WORKDIR}/barbican-api-paste.ini ${D}/${datadir}/starlingx/barbican install -m 0644 ${WORKDIR}/gunicorn-config.py ${D}/${datadir}/starlingx/barbican @@ -77,4 +78,5 @@ pkg_prerm_ontarget_${PN}() { FILES_${PN} = " \ ${datadir}/starlingx/barbican/ \ ${systemd_system_unitdir}/openstack-barbican-api.service \ + /var/log/barbican \ " -- 2.16.6