From 707340e52146fe96a056e8d50067f0c6f896e713 Mon Sep 17 00:00:00 2001 From: Ramon Gazoni Lacerda Date: Mon, 29 Nov 2021 15:01:07 -0300 Subject: [PATCH] Add debian package for fm-doc Add debian packaging infrastructure for fm-doc to build a debian package. Test Plan: PASS: Package installed and ISO built successfully Story: 2009101 Task: 44088 Signed-off-by: Ramon Gazoni Lacerda Change-Id: If98aa5c561012e31ab67589e7d62486c58be8e4c --- fm-doc/debian/deb_folder/changelog | 5 ++++ fm-doc/debian/deb_folder/control | 19 ++++++++++++++ fm-doc/debian/deb_folder/copyright | 30 ++++++++++++++++++++++ fm-doc/debian/deb_folder/fm-doc.install | 2 ++ fm-doc/debian/deb_folder/rules | 34 +++++++++++++++++++++++++ fm-doc/debian/deb_folder/source/format | 1 + fm-doc/debian/meta_data.yaml | 7 +++++ 7 files changed, 98 insertions(+) create mode 100644 fm-doc/debian/deb_folder/changelog create mode 100644 fm-doc/debian/deb_folder/control create mode 100644 fm-doc/debian/deb_folder/copyright create mode 100644 fm-doc/debian/deb_folder/fm-doc.install create mode 100755 fm-doc/debian/deb_folder/rules create mode 100644 fm-doc/debian/deb_folder/source/format create mode 100644 fm-doc/debian/meta_data.yaml diff --git a/fm-doc/debian/deb_folder/changelog b/fm-doc/debian/deb_folder/changelog new file mode 100644 index 00000000..54d8d579 --- /dev/null +++ b/fm-doc/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +fm-doc (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Ramon Gazoni Lacerda Tue, 23 Nov 2021 15:42:51 -0300 diff --git a/fm-doc/debian/deb_folder/control b/fm-doc/debian/deb_folder/control new file mode 100644 index 00000000..9efac048 --- /dev/null +++ b/fm-doc/debian/deb_folder/control @@ -0,0 +1,19 @@ +Source: fm-doc +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + fm-common-doc, + python3-fm-api, + python3-yaml +Standards-Version: 4.1.2 +Homepage: https://www.starlingx.io + +Package: fm-doc +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: StarlingX Platform Fault Management Documentation Package + A yaml file description of the StarlingX Alarms and Customer Logs generated by + the StarlingX System. Also included and used at build time is a simple syntax + checker to ensure no duplicate IDs are used, and generally the correct + field values are documented. diff --git a/fm-doc/debian/deb_folder/copyright b/fm-doc/debian/deb_folder/copyright new file mode 100644 index 00000000..4a6486d8 --- /dev/null +++ b/fm-doc/debian/deb_folder/copyright @@ -0,0 +1,30 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: fm-doc +Upstream-Contact: StarlingX Developers +Source: https://opendev.org/starlingx/fault/ + +Files: * +Copyright: + (c) 2013-2021 Wind River Systems, Inc + (c) Others (See individual files for more details) +License: Apache-2 + +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + +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'. diff --git a/fm-doc/debian/deb_folder/fm-doc.install b/fm-doc/debian/deb_folder/fm-doc.install new file mode 100644 index 00000000..b34b46eb --- /dev/null +++ b/fm-doc/debian/deb_folder/fm-doc.install @@ -0,0 +1,2 @@ +opt/deploy/cgcs_doc/* +etc/fm/events.yaml etc/fm diff --git a/fm-doc/debian/deb_folder/rules b/fm-doc/debian/deb_folder/rules new file mode 100755 index 00000000..a65428f4 --- /dev/null +++ b/fm-doc/debian/deb_folder/rules @@ -0,0 +1,34 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = $(CURDIR)/debian/tmp +export CGCS_DOC_DEPLOY_DIR = $(ROOT)/opt/deploy/cgcs_doc +export CGCS_DOC_DIR = /opt/deploy/cgcs_doc +export FM_DIR = $(ROOT)/etc/fm + +%: + dh $@ + +override_dh_auto_install: + + install -d $(CGCS_DOC_DEPLOY_DIR) + install -m 644 events.yaml $(CGCS_DOC_DEPLOY_DIR) + install -m 755 checkEventYaml $(CGCS_DOC_DEPLOY_DIR) + install -m 644 parseEventYaml.py $(CGCS_DOC_DEPLOY_DIR) + install -m 644 check_missing_alarms.py $(CGCS_DOC_DEPLOY_DIR) + + install -d $(FM_DIR) + install -m 744 events.yaml $(FM_DIR) + + cd $(CGCS_DOC_DEPLOY_DIR) + cp $(CGCS_DOC_DIR)/fmAlarm.h /usr/lib/python3/dist-packages/fm_api/constants.py . + + sed -i 's/python/python3/g' checkEventYaml + ./checkEventYaml + + rm constants.py* fmAlarm.h* + cd - + +# Prevents dh_fixperms from changing the permissions defined in this file +override_dh_fixperms: + dh_fixperms --exclude etc/fm/events.yaml diff --git a/fm-doc/debian/deb_folder/source/format b/fm-doc/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/fm-doc/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/fm-doc/debian/meta_data.yaml b/fm-doc/debian/meta_data.yaml new file mode 100644 index 00000000..71cc3e9e --- /dev/null +++ b/fm-doc/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: fm-doc +debver: 1.0-1 +src_path: fm_doc +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true