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

This commit is contained in:
Zuul 2021-11-08 18:25:48 +00:00 committed by Gerrit Code Review
commit 754041c649
16 changed files with 158 additions and 1 deletions

View File

@ -0,0 +1,5 @@
sm-common (1.0.0-1) unstable; urgency=medium
* Initial release.
-- Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com> Tue, 21 Sep 2021 19:52:46 +0000

View File

@ -0,0 +1 @@
10

View File

@ -0,0 +1,37 @@
Source: sm-common
Section: admin
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper (>= 13),
libsqlite3-dev,
libglib2.0-dev,
uuid-dev,
libsystemd-dev
Standards-Version: 4.1.2
Homepage: https://www.starlingx.io
Package: sm-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, sm-common-libs
Description: Service Management Common
This package handles Service Management Common files
Package: sm-common-libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
mtce-pmon, sqlite3, systemd
Description: Service Management Common - shared library files
This package contains shared libraries.
Package: sm-common-dev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, sm-common-libs
Description: Service Management Common - Development files
This package contains symbolic links, header files,
and related items necessary for software development.
Package: sm-eru
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, sm-common-libs
Description: Service Management ERU
Service Management Event Recorder Unit

View File

@ -0,0 +1,44 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: sm-common
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,30 @@
#!/usr/bin/make -f
export ROOT = $(CURDIR)/debian/tmp
export VER = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
export VER_MJR = $(shell echo $(VER) | cut -d. -f1)
%:
dh $@
override_dh_auto_install:
rm -rf ${ROOT}
$(MAKE) DEST_DIR=${ROOT} \
BIN_DIR=usr/bin \
UNIT_DIR=usr/lib/systemd/system \
LIB_DIR=/usr/lib64 \
INC_DIR=/usr/include \
BUILDSUBDIR=$(CURDIR) \
ETC_DIR=etc \
VER=${VER} \
VER_MJR=${VER_MJR} \
install
# Prevents dh_fixperms from changing the permissions defined in the makefiles
override_dh_fixperms:
dh_fixperms \
-Xsm-watchdog* \
-Xlibsm_common.so.* \
-Xlibsm_watchdog_nfs.so.* \
-Xsm-eru*

View File

@ -0,0 +1,3 @@
usr/include/*
usr/lib64/*.so
var/lib/sm/watchdog/modules/libsm_watchdog_nfs.so

View File

@ -0,0 +1,3 @@
/var/lib/sm
/var/lib/sm/watchdog
/var/lib/sm/watchdog/modules

View File

@ -0,0 +1,2 @@
usr/lib64/*.so.*
var/lib/sm/watchdog/modules/*.so.*

View File

@ -0,0 +1 @@
shared-library-is-executable

View File

@ -0,0 +1,4 @@
etc/init.d/sm-watchdog
etc/pmon.d/sm-watchdog.conf
usr/bin/sm-watchdog
usr/lib/systemd/system/sm-watchdog.service

View File

@ -0,0 +1,5 @@
etc/init.d/sm-eru
etc/pmon.d/sm-eru.conf
usr/bin/sm-eru
usr/bin/sm-eru-dump
usr/lib/systemd/system/sm-eru.service

View File

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

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-common)
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-common
debver: 1.0.0-1
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -6,6 +6,7 @@
INCLUDES =-I$(STAGING_DIR)/usr/include/glib-2.0
INCLUDES+=-I$(STAGING_DIR)/usr/lib64/glib-2.0/include -I.
INCLUDES+=-I$(STAGING_DIR)/usr/lib/x86_64-linux-gnu/glib-2.0/include
SRCS=sm_types.c
SRCS+=sm_debug.c
@ -27,7 +28,7 @@ SRCS+=sm_eru_db.c
SRCS+=sm_util_types.c
OBJS = $(SRCS:.c=.o)
CCFLAGS= -fPIC -g -O2 -Wall -Werror -std=c++11
CCFLAGS= -fPIC -g -O2 -Wall -Werror -Wno-restrict -Wno-format-truncation -std=c++11
EXTRACCFLAGS= -D__STDC_FORMAT_MACROS -DSW_VERSION=\"$(SW_VERSION)\"
EXTRACCFLAGS+= -Wformat -Wformat-security
LDLIBS= -lsqlite3 -lglib-2.0 -lgmodule-2.0 -luuid -lrt -lpthread

View File

@ -236,9 +236,11 @@ void sm_debug_sched_log_done( char* domain )
}
else {
if (_print_sched_log)
{
sm_debug_log( SM_DEBUG_SCHED_LOG, "%s: no scheduling changes "
"required.", domain );
_print_sched_log = false;
}
}
}
}