From 30c8c1423ba2443e7f46e910f166fa728a49c7a5 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 25 Aug 2021 14:23:45 -0400 Subject: [PATCH] Add debian package for sysinv-fpga-agent Add debian packaging infrastructure for sysinv-fpga-agent so we can create a debian packaging from it. Also update the directory structure due to the limitations of the STX tool. Update the centos build information to reflect the new directory structure. Story: 2009101 Task: 43089 Signed-off-by: Charles Short Change-Id: Idd85bd198cfd44b08f545122d2a6210f24801008 --- debian_pkg_dirs | 1 + .../debian/deb_folder/changelog | 5 +++ .../debian/deb_folder/control | 13 ++++++ .../debian/deb_folder/copyright | 43 +++++++++++++++++++ .../sysinv-fpga-agent/debian/deb_folder/rules | 22 ++++++++++ .../debian/deb_folder/source/format | 1 + .../debian/deb_folder/sysinv-fpga-agent.dirs | 2 + .../deb_folder/sysinv-fpga-agent.install | 5 +++ sysinv/sysinv-fpga-agent/debian/dl_hook | 11 +++++ .../sysinv-fpga-agent/debian/meta_data.yaml | 7 +++ 10 files changed, 110 insertions(+) create mode 100644 sysinv/sysinv-fpga-agent/debian/deb_folder/changelog create mode 100644 sysinv/sysinv-fpga-agent/debian/deb_folder/control create mode 100644 sysinv/sysinv-fpga-agent/debian/deb_folder/copyright create mode 100755 sysinv/sysinv-fpga-agent/debian/deb_folder/rules create mode 100644 sysinv/sysinv-fpga-agent/debian/deb_folder/source/format create mode 100644 sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.dirs create mode 100644 sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.install create mode 100755 sysinv/sysinv-fpga-agent/debian/dl_hook create mode 100644 sysinv/sysinv-fpga-agent/debian/meta_data.yaml diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 3f771c6b15..5962effc23 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,4 +1,5 @@ controllerconfig sysinv/cgts-client +sysinv/sysinv-fpga-agent sysinv/sysinv tsconfig diff --git a/sysinv/sysinv-fpga-agent/debian/deb_folder/changelog b/sysinv/sysinv-fpga-agent/debian/deb_folder/changelog new file mode 100644 index 0000000000..7dcd6d8e67 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +sysinv-fpga-agent (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Charles Short Tue, 24 Aug 2021 14:37:44 -0400 diff --git a/sysinv/sysinv-fpga-agent/debian/deb_folder/control b/sysinv/sysinv-fpga-agent/debian/deb_folder/control new file mode 100644 index 0000000000..1b34aee5b8 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/deb_folder/control @@ -0,0 +1,13 @@ +Source: sysinv-fpga-agent +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13) +Standards-Version: 4.5.1 +Rules-Requires-Root: no + +Package: sysinv-fpga-agent +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate, rsyslog +Description: StarlingX FPGA agent monitor + Startup Scripts for StarlingX FPGA agent monitor diff --git a/sysinv/sysinv-fpga-agent/debian/deb_folder/copyright b/sysinv/sysinv-fpga-agent/debian/deb_folder/copyright new file mode 100644 index 0000000000..f436fa1e93 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/deb_folder/copyright @@ -0,0 +1,43 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: sysinv-fpga-agent +Source: https://opendev.org/starlingx/config + +Files: * +Copyright: + (c) 2013-2021 Wind River Systems, Inc + (c) 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'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +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'. diff --git a/sysinv/sysinv-fpga-agent/debian/deb_folder/rules b/sysinv/sysinv-fpga-agent/debian/deb_folder/rules new file mode 100755 index 0000000000..8f4b8dad61 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/deb_folder/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +ROOT := $(CURDIR)/debian/tmp + +%: + dh $@ + +override_dh_install: + install -p -D -m 755 sysinv-fpga-agent ${ROOT}/etc/init.d/sysinv-fpga-agent + install -p -D -m 644 sysinv-fpga-agent.conf ${ROOT}/etc/pmon.d/sysinv-fpga-agent.conf + install -p -D -m 644 sysinv-fpga-agent.service ${ROOT}/lib/systemd/system/sysinv-fpga-agent.service + install -p -D -m 644 sysinv-conf-watcher.service ${ROOT}/lib/systemd/system/sysinv-conf-watcher.service + install -p -D -m 644 sysinv-conf-watcher.path ${ROOT}/lib/systemd/system/sysinv-conf-watcher.path + dh_install + +override_dh_usrlocal: + # do nothing + +override_dh_installsystemd: + dh_installsystemd --name=sysinv-fpga-agent.service + dh_installsystemd --name=sysinv-fpga-watcher.service diff --git a/sysinv/sysinv-fpga-agent/debian/deb_folder/source/format b/sysinv/sysinv-fpga-agent/debian/deb_folder/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.dirs b/sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.dirs new file mode 100644 index 0000000000..2439ef5850 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.dirs @@ -0,0 +1,2 @@ +etc/init.d +etc/pmond.d diff --git a/sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.install b/sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.install new file mode 100644 index 0000000000..d9849758f8 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/deb_folder/sysinv-fpga-agent.install @@ -0,0 +1,5 @@ +etc/init.d/sysinv-fpga-agent +etc/pmon.d/sysinv-fpga-agent.conf +lib/systemd/system/sysinv-fpga-agent.service +lib/systemd/system/sysinv-conf-watcher.service +lib/systemd/system/sysinv-conf-watcher.path diff --git a/sysinv/sysinv-fpga-agent/debian/dl_hook b/sysinv/sysinv-fpga-agent/debian/dl_hook new file mode 100755 index 0000000000..fcad99dcb6 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/dl_hook @@ -0,0 +1,11 @@ +#!/bin/bash +set -x + +PKG_BUILD_NAME=$1 +PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME}) +STX_BASE=$(realpath ${MY_REPO}/stx) +SRC=$(realpath ${STX_BASE}/config/sysinv/sysinv-fpga-agent) + +mkdir ${PKG_BUILD_NAME} +pushd ${PKG_BUILD_NAME} || exit +cp -pr ${SRC}/{LICENSE,sysinv-*} ${PKG_BUILD_ROOT}/ diff --git a/sysinv/sysinv-fpga-agent/debian/meta_data.yaml b/sysinv/sysinv-fpga-agent/debian/meta_data.yaml new file mode 100644 index 0000000000..1cce91a318 --- /dev/null +++ b/sysinv/sysinv-fpga-agent/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: sysinv-fpga-agent +debver: 1.0 +dl_hook: dl_hook +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true