Merge "Add debian package for service-mgmt/sm"

This commit is contained in:
Zuul 2021-11-04 13:52:15 +00:00 committed by Gerrit Code Review
commit 25d17af547
11 changed files with 126 additions and 2 deletions

View File

@ -0,0 +1,5 @@
sm (1.0.0-1) unstable; urgency=medium
* Initial release.
-- Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com> Tue, 28 Sep 2021 16:25:51 +0000

View File

@ -0,0 +1 @@
10

View File

@ -0,0 +1,28 @@
Source: sm
Section: admin
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper (>= 13),
fm-common-dev,
sm-db-dev,
sm-common-dev,
mtce-dev,
libglib2.0-dev,
libsqlite3-dev,
uuid-dev,
libjson-c-dev,
libssl-dev,
libsystemd-dev
Standards-Version: 4.1.2
Homepage: https://www.starlingx.io
Package: sm
Architecture: any
Pre-Depends: ${shlibs:Pre-Depends}, ${misc:Pre-Depends}, systemd
Depends: ${shlibs:Depends}, ${misc:Depends},
mtce-pmon,
logrotate,
time,
sqlite3
Description: Service Management
This package handles Service Management

View File

@ -0,0 +1,44 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: sm
Upstream-Contact: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Source: https://opendev.org/starlingx/ha
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'.

View File

@ -0,0 +1,16 @@
#!/usr/bin/make -f
ROOT := $(CURDIR)/debian/tmp
%:
dh $@
override_dh_usrlocal:
# dh_usrlocal complains about files being put in /usr/local
# this empty override causes dh_usrlocal to be skipped.
override_dh_auto_install:
rm -rf ${ROOT}
$(MAKE) DEST_DIR=${ROOT} \
UNIT_DIR=/usr/lib/systemd/system \
install

View File

@ -0,0 +1,9 @@
usr/lib/systemd/system/*
usr/bin/sm
usr/local/sbin/sm-notify
usr/local/sbin/sm-troubleshoot
usr/local/sbin/sm-notification
etc/init.d/sm
etc/init.d/sm-shutdown
etc/pmon.d/sm.conf
etc/logrotate.d/sm.logrotate

View File

@ -0,0 +1 @@
script-uses-unversioned-python-in-shebang

View File

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

11
service-mgmt/sm/debian/dl_hook Executable file
View File

@ -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}/ha/service-mgmt/sm)
mkdir ${PKG_BUILD_NAME}
pushd ${PKG_BUILD_NAME}
cp -pr ${SRC}/{src,scripts,Makefile} ${PKG_BUILD_ROOT}/

View File

@ -0,0 +1,7 @@
---
debname: sm
debver: 1.0.0-1
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -5,6 +5,7 @@
#
INCLUDES =-I$(STAGING_DIR)/usr/include/glib-2.0
INCLUDES+=-I$(STAGING_DIR)/usr/lib64/glib-2.0/include
INCLUDES+=-I$(STAGING_DIR)/usr/lib/x86_64-linux-gnu/glib-2.0/include
SRCS=main.c
SRCS+=sm_process.c
@ -120,9 +121,9 @@ SRCS+=sm_cluster_hbs_info_msg.cpp
SRCS+=sm_configure.cpp
OBJS= $(SRCS:.c=.o)
CCFLAGS= -g -O2 -Wall -Werror -Wformat -std=c++11
CCFLAGS= -g -O2 -Wall -Werror -Wformat -Wno-stringop-truncation -Wno-format-truncation -Wno-format-overflow -std=c++11
EXTRACCFLAGS= -D__STDC_FORMAT_MACROS -Wformat -Wformat-security
LDLIBS= -lsqlite3 -lglib-2.0 -luuid -lpthread -lrt -lsm_common -lsm_db -lfmcommon -ljson-c -lcrypto -lssl
LDLIBS= -lglib-2.0 -luuid -lpthread -lrt -lsm_common -lsm_db -lfmcommon -ljson-c -lcrypto -lssl -lsqlite3
LDFLAGS = -rdynamic
.c.o: