barbican: fixes to enable barbican-api execution 85/3485/1
authorLitao Gao <litao.gao@windriver.com>
Mon, 27 Apr 2020 14:27:23 +0000 (10:27 -0400)
committerLitao Gao <litao.gao@windriver.com>
Mon, 27 Apr 2020 14:29:57 +0000 (10:29 -0400)
- 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 <litao.gao@windriver.com>
Change-Id: I2c910e98da6b7d1c4deddc5a4bd55cd3a1af4265

meta-stx/recipes-devtools/python/python_2.7.17.bbappend [new file with mode: 0644]
meta-stx/recipes-support/openstack-barbican-api/files/openstack-barbican-api.service
meta-stx/recipes-support/openstack-barbican-api/openstack-barbican-api.bb

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 (file)
index 0000000..7e41c90
--- /dev/null
@@ -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
+}
+    
+
+
index 197a281..d1e9cc0 100644 (file)
@@ -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
 
index 9b49e05..9c9f8a1 100644 (file)
@@ -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 \
        "