Add debian package infra for fm-api

Add debian packaging infrastructure for fm-api
so we can create a debian packaging for it.

Also update the directory layout due to limitations
of the STX tool. Update the centos build information
to reflect the new layout.

Story: 2009101
Task: 43091

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I5c9784647581f31384d7475f596663adc0d26498
This commit is contained in:
Charles Short 2021-08-25 15:08:47 -04:00
parent bbda49dbb7
commit 7b127659e5
20 changed files with 81 additions and 25 deletions

View File

@ -1,4 +1,4 @@
SRC_DIR="." SRC_DIR="source"
EXCLUDE_FILES_FROM_TAR="centos" EXCLUDE_FILES_FROM_TAR="centos"
TIS_PATCH_VER=PKG_GITREVCOUNT TIS_PATCH_VER=PKG_GITREVCOUNT

View File

@ -1,14 +0,0 @@
Source: fm-api
Priority: optional
Maintainer: StarlingX team <starlingx-discuss@lists.starlingx.io>
Build-Depends: python-setuptools,
python-all,
debhelper,
dh-python
Standards-Version: 3.9.6
Package: fm-api
Architecture: all
Depends: ${misc:Depends},
${python:Depends}
Description: This package contains the fm-api project.

View File

@ -0,0 +1,5 @@
fm-api (1.0-1) unstable; urgency=medium
* Initial release.
-- Charles Short <charles.short@windriver.com Thu, 19 Aug 2021 05:46:22 -0400

View File

@ -0,0 +1,16 @@
Source: fm-api
Section: admin
Priority: optional
Maintainer: Starlingx Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13), dh-python, python3-setuptools, python3-all
Standards-Version: 4.4.1
Homepage: https://www.starlingx.io
Package: python3-fm-api
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}
Description: Starlingx fault management api
Provides the the APIs for applications to raise/clear/update
active alarms.
.
This package installs the library for Python 3.

View File

@ -0,0 +1,40 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: fm-api
Source: https://opendev.org/starlingx/fault
Files: *
Copyright: (c) 2013-2021 Wind River Systems, Inc
Others (See individual files for more details)
License: Apache-2
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
.
https://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.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.
Files: debian/*
Copyright: 2021 Wind River Systems, Inc
License: Apache-2
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
.
https://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.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.

7
fm-api/debian/deb_folder/rules Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=fm-api
%:
dh $@ --with python3 --buildsystem=pybuild

View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -0,0 +1 @@
extend-diff-ignore = "^[^/]*[.]egg-info/"

View File

@ -0,0 +1,7 @@
---
debname: fm-api
debver: 1.0-1
src_path: source
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -1,7 +0,0 @@
#!/usr/bin/make -f
export PYBUILD_INSTALL_ARGS=--install-data=/usr/share --prefix=/usr
%:
dh $@ --with python2 --buildsystem=pybuild

View File

@ -14,7 +14,7 @@ deps = -chttps://opendev.org/openstack/requirements/raw/branch/stable/stein/uppe
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-e{[tox]stxdir}/config/tsconfig/tsconfig -e{[tox]stxdir}/config/tsconfig/tsconfig
-e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client -e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client
-e{[tox]stxdir}/fault/fm-api -e{[tox]stxdir}/fault/fm-api/source
-e{[tox]stxdir}/fault/fm-rest-api/fm -e{[tox]stxdir}/fault/fm-rest-api/fm
[testenv:venv] [testenv:venv]
@ -39,7 +39,7 @@ deps = -chttps://opendev.org/starlingx/root/raw/branch/master/build-tools/requir
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-e{[tox]stxdir}/config/tsconfig/tsconfig -e{[tox]stxdir}/config/tsconfig/tsconfig
-e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client -e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client
-e{[tox]stxdir}/fault/fm-api -e{[tox]stxdir}/fault/fm-api/source
-e{[tox]stxdir}/fault/fm-rest-api/fm -e{[tox]stxdir}/fault/fm-rest-api/fm
commands = commands =
stestr run {posargs} stestr run {posargs}

View File

@ -59,7 +59,7 @@ deps = {[testenv]deps}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = pylint {posargs} --rcfile=./pylint.rc \ commands = pylint {posargs} --rcfile=./pylint.rc \
fm-api/fm_api \ fm-api/source/fm_api \
fm-common/sources/fm_db_sync_event_suppression.py \ fm-common/sources/fm_db_sync_event_suppression.py \
fm-rest-api/fm/fm \ fm-rest-api/fm/fm \
python-fmclient/fmclient/fmclient python-fmclient/fmclient/fmclient