From 63c249b9a154cbcc475368101788a19cd7f312d2 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 25 Aug 2021 13:58:59 -0400 Subject: [PATCH] Add debian packaging infrastructure for cert-mon Add debian packaging infrastructure for cert-mon to build debian package for cert-mon. Story: 2009101 Task: 43088 Signed-off-by: Charles Short Change-Id: Ic0835ee9838f9bea4bd39a5bd3d3c6a3f3d06edc --- .../cert-mon/debian/deb_folder/cert-mon.dirs | 3 ++ .../debian/deb_folder/cert-mon.install | 4 ++ sysinv/cert-mon/debian/deb_folder/changelog | 5 +++ sysinv/cert-mon/debian/deb_folder/control | 14 +++++++ sysinv/cert-mon/debian/deb_folder/copyright | 40 +++++++++++++++++++ sysinv/cert-mon/debian/deb_folder/rules | 14 +++++++ .../cert-mon/debian/deb_folder/source/format | 1 + sysinv/cert-mon/debian/meta_data.yaml | 7 ++++ 8 files changed, 88 insertions(+) create mode 100644 sysinv/cert-mon/debian/deb_folder/cert-mon.dirs create mode 100644 sysinv/cert-mon/debian/deb_folder/cert-mon.install create mode 100644 sysinv/cert-mon/debian/deb_folder/changelog create mode 100644 sysinv/cert-mon/debian/deb_folder/control create mode 100644 sysinv/cert-mon/debian/deb_folder/copyright create mode 100755 sysinv/cert-mon/debian/deb_folder/rules create mode 100644 sysinv/cert-mon/debian/deb_folder/source/format create mode 100644 sysinv/cert-mon/debian/meta_data.yaml diff --git a/sysinv/cert-mon/debian/deb_folder/cert-mon.dirs b/sysinv/cert-mon/debian/deb_folder/cert-mon.dirs new file mode 100644 index 0000000000..be03125fb4 --- /dev/null +++ b/sysinv/cert-mon/debian/deb_folder/cert-mon.dirs @@ -0,0 +1,3 @@ +usr/lib/ocf/resource.d +etc/syslog-ng/conf.d +etc/logrotate.d diff --git a/sysinv/cert-mon/debian/deb_folder/cert-mon.install b/sysinv/cert-mon/debian/deb_folder/cert-mon.install new file mode 100644 index 0000000000..f41404aad7 --- /dev/null +++ b/sysinv/cert-mon/debian/deb_folder/cert-mon.install @@ -0,0 +1,4 @@ +usr/lib/ocf/resource.d/platform/cert-mon +lib/systemd/system/cert-mon.service +etc/syslog-ng/conf.d/cert-mon.conf +etc/logrotate.d/cert-mon.conf diff --git a/sysinv/cert-mon/debian/deb_folder/changelog b/sysinv/cert-mon/debian/deb_folder/changelog new file mode 100644 index 0000000000..aee2ebeb1f --- /dev/null +++ b/sysinv/cert-mon/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +cert-mon (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Charles Short Tue, 24 Aug 2021 13:49:22 -0400 diff --git a/sysinv/cert-mon/debian/deb_folder/control b/sysinv/cert-mon/debian/deb_folder/control new file mode 100644 index 0000000000..8415f20064 --- /dev/null +++ b/sysinv/cert-mon/debian/deb_folder/control @@ -0,0 +1,14 @@ +Source: cert-mon +Section: admin +Priority: optional +Maintainer: Starlingx Developers +Build-Depends: debhelper-compat (= 13) +Standards-Version: 4.5.1 +Rules-Requires-Root: no + +Package: cert-mon +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate, rsyslog +Description: Starlingx certificate monitor + Manages the StarlingX platform's system certificate monitor process + as a HA resource. diff --git a/sysinv/cert-mon/debian/deb_folder/copyright b/sysinv/cert-mon/debian/deb_folder/copyright new file mode 100644 index 0000000000..6b15f1a4db --- /dev/null +++ b/sysinv/cert-mon/debian/deb_folder/copyright @@ -0,0 +1,40 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cert-mon +Source: https://opendev.org/starlingx/config + +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'. diff --git a/sysinv/cert-mon/debian/deb_folder/rules b/sysinv/cert-mon/debian/deb_folder/rules new file mode 100755 index 0000000000..831fbfdb88 --- /dev/null +++ b/sysinv/cert-mon/debian/deb_folder/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +ROOT := $(CURDIR)/debian/tmp + +%: + dh $@ + +override_dh_install: + install -m 755 -p -D cert-mon ${ROOT}/usr/lib/ocf/resource.d/platform/cert-mon + install -m 644 -p -D cert-mon.service ${ROOT}/lib/systemd/system/cert-mon.service + install -m 644 -p -D cert-mon.syslog ${ROOT}/etc/syslog-ng/conf.d/cert-mon.conf + install -m 644 -p -D cert-mon.logrotate ${ROOT}/etc/logrotate.d/cert-mon.conf + dh_install diff --git a/sysinv/cert-mon/debian/deb_folder/source/format b/sysinv/cert-mon/debian/deb_folder/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/sysinv/cert-mon/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/sysinv/cert-mon/debian/meta_data.yaml b/sysinv/cert-mon/debian/meta_data.yaml new file mode 100644 index 0000000000..a94500241b --- /dev/null +++ b/sysinv/cert-mon/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: cert-mon +debver: 1.0 +src_path: files +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true