meta-starlingx/meta-stx-flock/stx-distributedcloud/distributedcloud_git.bb
Jackie Huang e2fefea34d recipes-devtools: fix the do_install failure for pkgs
Set PBR_VERSION to disable all version calculation logic
of pbr the supplied version will be considered absolute.

Closes-bug: 2013029

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Ia038c1c7f10170413051e5b3addd337d3559f3ff
2023-03-28 21:44:00 -07:00

258 lines
8.5 KiB
BlitzBasic

DESCRIPTION = "StarlingX distributedcloud packages collection"
HOMEPAGE = "https://opendev.org/starlingx"
SECTION = "network"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://distributedcloud/LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
PROTOCOL = "https"
BRANCH = "r/stx.5.0"
SRCNAME = "distcloud"
SRCREV = "d8ce118e50f1d30b9b4d6b3e0b17d45d497ab4af"
PV = "1.0.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = " \
git://opendev.org/starlingx/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH} \
"
PACKAGES += "distributedcloud-dccommon"
PACKAGES += "distributedcloud-dcmanager"
PACKAGES += "distributedcloud-dcorch"
PACKAGES += "distributedcloud-dcdbsync"
PACKAGES += "distributedcloud-ocf"
DESCRIPTION_distributedcloud-dcmanager = "Distributed Cloud Manager"
DESCRIPTION_distributedcloud-dcorch = "Distributed Cloud Orchestrator"
DESCRIPTION_distributedcloud-dcdbsync = "DC DCorch DBsync Agent"
DEPENDS += " \
python-pbr-native \
"
ALL_RDEPENDS = " \
python-pycrypto \
python-cryptography \
python-eventlet \
python-setuptools \
python-jsonschema \
python-keyring \
python-keystonemiddleware \
python-keystoneauth1 \
python-netaddr \
python-oslo.concurrency \
python-oslo.config \
python-oslo.context \
python-oslo.db \
python-oslo.i18n \
python-oslo.log \
python-oslo.messaging \
python-oslo.middleware \
python-oslo.policy \
python-oslo.rootwrap \
python-oslo.serialization \
python-oslo.service \
python-oslo.utils \
python-oslo.versionedobjects \
python-pbr \
python-pecan \
python-routes \
python-sphinx \
python-pyopenssl \
systemd \
python-babel \
distributedcloud-ocf \
"
# TODO:
# Check dependencies
# python-sphinxcontrib-httpdomain
RDEPENDS_distributedcloud-dcmanager += " ${ALL_RDEPENDS}"
RDEPENDS_distributedcloud-dcorch += " ${ALL_RDEPENDS}"
RDEPENDS_distributedcloud-dcdbsync+= " ${ALL_RDEPENDS}"
inherit distutils python-dir
export PBR_VERSION = "${PV}"
do_configure() {
cd ${S}/distributedcloud
distutils_do_configure
}
do_compile() {
cd ${S}/distributedcloud
distutils_do_compile
}
do_install() {
cd ${S}/distributedcloud
distutils_do_install
SRCPATH=${datadir}/starlingx/distrbutedcloud-config-files/
# dcmanager
install -d -m 0755 ${D}/var/log/dcmanager
install -d -m 0755 ${D}/var/cache/dcmanager
install -d -m 0755 ${D}/${sysconfdir}/dcmanager
install -d -m 0755 ${D}/${sysconfdir}/tempfiles.d
install -d -m 0755 ${D}/${datadir}/starlingx/distrbutedcloud-config-files/
install -d -m 0755 ${D}/${systemd_system_unitdir}
install -d -m 0755 ${D}/opt/dc/ansible
# Install systemd unit files
install -p -D -m 0644 centos/files/dcmanager-api.service ${D}/${systemd_system_unitdir}/
install -p -D -m 0644 centos/files/dcmanager-manager.service ${D}/${systemd_system_unitdir}/
install -p -D -m 0644 centos/files/dcmanager-audit.service ${D}/${systemd_system_unitdir}/
install -p -D -m 0644 centos/files/dcmanager-audit-worker.service ${D}/${systemd_system_unitdir}/
install -p -D -m 0644 centos/files/dcmanager-orchestrator.service ${D}/${systemd_system_unitdir}/
install -p -D -m 0755 centos/files/dcmanager.conf ${D}/${sysconfdir}/tempfiles.d
# Install default config files
# defer postinst_ontarget
install -p -m 0644 dcmanager//config-generator.conf ${D}/${SRCPATH}/dcmanager-config-generator.conf
install -p -D -m 0644 centos/files/distcloud-syslog.conf ${D}/${sysconfdir}/syslog-ng/conf.d/distcloud.conf
install -p -D -m 0644 centos/files/distcloud-logrotate.conf ${D}/${sysconfdir}/logrotate.d/distcloud.conf
# dcorch
install -d -m 0755 ${D}/var/log/dcorch
install -d -m 0755 ${D}/var/cache/dcorch
install -d -m 0755 ${D}/${sysconfdir}/dcorch
# Install systemd unit files
install -p -D -m0644 centos/files/dcorch-api.service ${D}/${systemd_system_unitdir}/
install -p -D -m0644 centos/files/dcorch-engine.service ${D}/${systemd_system_unitdir}/
install -p -D -m0644 centos/files/dcorch-sysinv-api-proxy.service ${D}/${systemd_system_unitdir}/
install -p -D -m0644 centos/files/dcorch-identity-api-proxy.service ${D}/${systemd_system_unitdir}/
install -p -D -m0644 centos/files/dcorch.conf ${D}/${sysconfdir}/tempfiles.d
# Install ocf scripts
install -d -m 0755 ${D}/${libdir}/ocf/resource.d/openstack/ocf
install -m 0644 \
ocf/dcdbsync-api \
ocf/dcmanager-api \
ocf/dcmanager-audit \
ocf/dcmanager-audit-worker \
ocf/dcmanager-manager \
ocf/dcmanager-orchestrator \
ocf/dcorch-cinder-api-proxy \
ocf/dcorch-engine \
ocf/dcorch-identity-api-proxy \
ocf/dcorch-neutron-api-proxy \
ocf/dcorch-nova-api-proxy \
ocf/dcorch-patch-api-proxy \
ocf/dcorch-sysinv-api-proxy ${D}/${libdir}/ocf/resource.d/openstack/
# Install default config files
# defer postinst_ontarget
install -p -m 0644 dcorch/config-generator.conf ${D}/${SRCPATH}/dcorch-config-generator.conf
# dc dbsync agent
install -d -m 755 ${D}/var/log/dcdbsync
install -d -m 755 ${D}/var/cache/dcdbsync
install -d -m 755 ${D}/${sysconfdir}/dcdbsync/
# Install systemd unit files
install -p -D -m 644 centos/files/dcdbsync-api.service ${D}/${systemd_system_unitdir}/dcdbsync-api.service
# ???? CheckInstall systemd unit files for optional second instance
install -p -D -m 644 centos/files/dcdbsync-openstack-api.service ${D}/${systemd_system_unitdir}/dcdbsync-openstack-api.service
install -p -D -m 644 centos/files/dcdbsync.conf ${D}/${sysconfdir}/tmpfiles.d
# Install default config files
# defer postinst_ontarget
install -p -m 0644 dcdbsync/config-generator.conf ${D}/${SRCPATH}/dcdbsync-config-generator.conf
# install dcorch cleaner
install -p -D -m 755 centos/files/clean-dcorch ${D}/${bindir}/clean-dcorch
}
pkg_postinst_ontarget_distributedcloud-dcmanager() {
SRCPATH=${datadir}/starlingx/distrbutedcloud-config-files/
oslo-config-generator --config-file ${SRCPATH}/dcmanager-config-generator.conf \
--output-file ${sysconfdir}/dcmanager/dcmanager.conf.sample
}
pkg_postinst_ontarget_distributedcloud-dcorch() {
SRCPATH=${datadir}/starlingx/distrbutedcloud-config-files/
oslo-config-generator --config-file ${SRCPATH}/dcorch-config-generator.conf \
--output-file ${sysconfdir}/dcorch/dcorch.conf.sample
}
pkg_postinst_ontarget_distributedcloud-dcdbsync() {
SRCPATH=${datadir}/starlingx/distrbutedcloud-config-files/
oslo-config-generator --config-file ${SRCPATH}/dcdbsync-config-generator.conf \
--output-file ${sysconfdir}/dcdbsync/dcdbsync.conf.sample
}
FILES_${PN} = " \
/var/volatile \
/var/log \
/var/volatile/log \
/etc/tmpfiles.d \
"
FILES_distributedcloud-ocf = " \
${libdir}/ocf/resource.d/openstack \
"
FILES_distributedcloud-dcdbsync = " \
${PYTHON_SITEPACKAGES_DIR}/dcdbsync \
${PYTHON_SITEPACKAGES_DIR}/dcdbsync-*.egg.info \
/var/cache/dcdbsync \
/var/volatile/log/dcdbsync \
${bindir}/dcdbsync-api \
${systemd_system_unitdir}/dcdbsync-api.service \
${systemd_system_unitdir}/dcdbsync-openstack-api.service \
${sysconfdir}/dcdbsync/ \
${datadir}/starlingx/distrbutedcloud-config-files/dcdbsync-config-generator.conf \
"
FILES_distributedcloud-dcorch = " \
${PYTHON_SITEPACKAGES_DIR}/dcorch \
${PYTHON_SITEPACKAGES_DIR}/distributedcloud-*.egg-info \
${bindir}/dcorch-api \
${systemd_system_unitdir}/dcorch-api.service \
${bindir}/dcorch-engine \
${systemd_system_unitdir}/dcorch-engine.service \
${bindir}/dcorch-api-proxy \
${systemd_system_unitdir}/dcorch-sysinv-api-proxy.service \
${systemd_system_unitdir}/dcorch-identity-api-proxy.service \
${bindir}/dcorch-manage \
${bindir}/clean-dcorch \
${sysconfdir}/tempfiles.d/dcorch.conf \
/var/cache/dcorch \
${sysconfdir}/dcorch \
${datadir}/starlingx/distrbutedcloud-config-files/dcorch-config-generator.conf \
"
FILES_distributedcloud-dccommon = " \
${PYTHON_SITEPACKAGES_DIR}/dccommon* \
${PYTHON_SITEPACKAGES_DIR}/distributedcloud-*.egg-info \
${sysconfdir}/syslog-ng/conf.d/distcloud.conf \
${sysconfdir}/logrotate.d/distcloud.conf \
"
FILES_distributedcloud-dcmanager = " \
${PYTHON_SITEPACKAGES_DIR}/dcmanager \
${bindir}/dcmanager-api \
${systemd_system_unitdir}/dcmanager-api.service \
${bindir}/dcmanager-audit \
${systemd_system_unitdir}/dcmanager-audit.service \
${bindir}/dcmanager-audit-worker \
${systemd_system_unitdir}/dcmanager-audit-worker.service \
${bindir}/dcmanager-orchestrator \
${systemd_system_unitdir}/dcmanager-orchestrator.service \
${bindir}/dcmanager-manager \
${systemd_system_unitdir}/dcmanager-manager.service \
${bindir}/dcmanager-manage \
${sysconfdir}/tmpfiles.d/dcmanager.conf \
/var/cache/dcmanager \
${sysconfdir}/dcmanager \
${sysconfdir}/tempfiles.d/dcmanager.conf \
/opt/dc/ansible \
${datadir}/starlingx/distrbutedcloud-config-files/dcmanager-config-generator.conf \
"