Add debian packaging directory for sysinv-agent

Add debian packaging directory to build sysinv-agent for Debian os.

Story: 2009101
Task: 43110

Signed-off-by: Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com>
Change-Id: I7c6d3f658683d717f68e4b16c0f21a921c6fa828
This commit is contained in:
Fabricio Henrique Ramos 2021-10-08 10:06:54 -03:00
parent 23406f3a07
commit e9842965cc
12 changed files with 97 additions and 8 deletions

View File

@ -0,0 +1,5 @@
sysinv-agent (1.0-1) unstable; urgency=medium
* Initial Release.
-- Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com> Tue, 24 Aug 2021 11:40:50 -0300

View File

@ -0,0 +1,15 @@
Source: sysinv-agent
Section: admin
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.5.1
Homepage: https://www.starlingx.io
Rules-Requires-Root: no
Package: sysinv-agent
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}
Description: StarlingX Inventory Init Package
StarlingX package for system inventory management

View File

@ -0,0 +1,22 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: sysinv-agent
Upstream-Contact: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Source: https://opendev.org/starlingx/config
Files: *
Copyright: (c) 2013-2021 Wind River Systems, Inc.
License: Apache-2.0
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'.

View File

@ -0,0 +1,16 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
ROOT := $(CURDIR)/debian/tmp
%:
dh $@
override_dh_install:
install -p -D -m 755 sysinv-agent ${ROOT}/etc/init.d/sysinv-agent
install -p -D -m 644 sysinv-agent.conf ${ROOT}/etc/pmon.d/sysinv-agent.conf
install -p -D -m 644 sysinv-agent.service ${ROOT}/lib/systemd/system/sysinv-agent.service
dh_install
override_dh_installinit:
dh_installinit --only-scripts

View File

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

View File

@ -0,0 +1,3 @@
etc/init.d
etc/pmon.d
lib/systemd/system

View File

@ -0,0 +1,3 @@
etc/init.d/sysinv-agent
etc/pmon.d/sysinv-agent.conf
lib/systemd/system/sysinv-agent.service

View File

@ -0,0 +1,4 @@
#!/bin/sh
set -e
#DEBHELPER#

View File

@ -0,0 +1,4 @@
#!/bin/sh
set -e
#DEBHELPER#

View File

@ -0,0 +1,10 @@
#!/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-agent)
mkdir ${PKG_BUILD_NAME}
cp -p ${SRC}/{LICENSE,sysinv-agent*} ${PKG_BUILD_ROOT}/

View File

@ -0,0 +1,7 @@
---
debver: 1.0-1
debname: sysinv-agent
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -10,17 +10,16 @@
#
### BEGIN INIT INFO
# Provides: sysinv-agent
# Default-Start: 3 5
# Required-Start:
# Required-Stop:
# Default-Stop: 0 1 2 6
# Default-Start: 2 3 4 5
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Stop: 0 1 6
# Short-Description: Maintenance daemon
### END INIT INFO
. /etc/init.d/functions
. /etc/build.info
PLATFORM_CONF="/etc/platform/platform.conf"
NODETYPE=""
DAEMON_NAME="sysinv-agent"
@ -52,7 +51,7 @@ RETVAL=0
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
export PATH
function mount_and_copy_config_file()
mount_and_copy_config_file()
{
echo "Mount /opt/platform"
logger "$0: Info: nfs-mount controller:/opt/platform/sysinv/${SW_VERSION} /mnt/sysinv"
@ -218,8 +217,8 @@ case "$1" in
[ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart
;;
*)
echo "usage: $0 { start | stop | status | restart | condrestart | status }"
force-reload | *)
echo "usage: $0 { start | stop | status | restart | condrestart }"
;;
esac