Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions 0001-disable-warning-as-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From db266a1602558013de056ccbbf4dd2e79a4645e4 Mon Sep 17 00:00:00 2001
From: Mingyuan Qi <[email protected]>
Date: Fri, 28 Sep 2018 19:45:40 +0800
Subject: [PATCH 1/2] disable warning as error

---
service-mgmt/sm-common-1.0.0/src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/service-mgmt/sm-common-1.0.0/src/Makefile b/service-mgmt/sm-common-1.0.0/src/Makefile
index c0f22de..145b207 100644
--- a/service-mgmt/sm-common-1.0.0/src/Makefile
+++ b/service-mgmt/sm-common-1.0.0/src/Makefile
@@ -26,7 +26,7 @@ SRCS+=sm_eru_db.c
SRCS+=sm_util_types.c

OBJS = $(SRCS:.c=.o)
-CCFLAGS= -fPIC -g -O2 -Wall -Werror
+CCFLAGS= -fPIC -g -O2 -Wall
EXTRACCFLAGS= -D__STDC_FORMAT_MACROS -DSW_VERSION=\"$(SW_VERSION)\"

LDLIBS= -lsqlite3 -lglib-2.0 -lgmodule-2.0 -luuid -lrt -lpthread -std=c++11
--
2.19.0

89 changes: 89 additions & 0 deletions 0002-change-sysconfig-dir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
From e06a34fb04a4ce932631ffdc7da1c5308b2118da Mon Sep 17 00:00:00 2001
From: Mingyuan Qi <[email protected]>
Date: Fri, 28 Sep 2018 19:45:40 +0800
Subject: [PATCH 2/2] change sysconfig dir

---
service-mgmt/sm-common-1.0.0/scripts/Makefile | 8 ++++----
service-mgmt/sm-common-1.0.0/scripts/sm-eru.conf | 2 +-
service-mgmt/sm-common-1.0.0/scripts/sm-eru.service | 4 ++--
service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.conf | 2 +-
service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.service | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/service-mgmt/sm-common-1.0.0/scripts/Makefile b/service-mgmt/sm-common-1.0.0/scripts/Makefile
index c142719..9284af2 100644
--- a/service-mgmt/sm-common-1.0.0/scripts/Makefile
+++ b/service-mgmt/sm-common-1.0.0/scripts/Makefile
@@ -1,8 +1,8 @@
install_non_bb:
install -d $(DEST_DIR)$(UNIT_DIR)
install -m 644 *.service $(DEST_DIR)$(UNIT_DIR)
- install -d $(DEST_DIR)/etc/init.d
- install sm-watchdog sm-eru $(DEST_DIR)/etc/init.d
- install -d $(DEST_DIR)/etc/pmon.d
- install *.conf $(DEST_DIR)/etc/pmon.d
+ install -d $(DEST_DIR)${sysconfdir}/init.d
+ install sm-watchdog sm-eru $(DEST_DIR)${sysconfdir}/init.d
+ install -d $(DEST_DIR)${sysconfdir}/pmon.d
+ install *.conf $(DEST_DIR)${sysconfdir}/pmon.d

diff --git a/service-mgmt/sm-common-1.0.0/scripts/sm-eru.conf b/service-mgmt/sm-common-1.0.0/scripts/sm-eru.conf
index 3daf316..b86d9a9 100644
--- a/service-mgmt/sm-common-1.0.0/scripts/sm-eru.conf
+++ b/service-mgmt/sm-common-1.0.0/scripts/sm-eru.conf
@@ -6,7 +6,7 @@
[process]
process = sm-eru
pidfile = /var/run/sm-eru.pid
-script = /etc/init.d/sm-eru
+script = ${sysconfdir}/init.d/sm-eru
style = lsb ; lsb
severity = minor ; minor, major, critical
restarts = 3 ; restarts before error assertion
diff --git a/service-mgmt/sm-common-1.0.0/scripts/sm-eru.service b/service-mgmt/sm-common-1.0.0/scripts/sm-eru.service
index 0c35ffe..96e954f 100644
--- a/service-mgmt/sm-common-1.0.0/scripts/sm-eru.service
+++ b/service-mgmt/sm-common-1.0.0/scripts/sm-eru.service
@@ -7,8 +7,8 @@ Before=pmon.service
Type=forking
RemainAfterExit=yes
User=root
-ExecStart=/etc/init.d/sm-eru start
-ExecStop=/etc/init.d/sm-eru stop
+ExecStart=${sysconfdir}/init.d/sm-eru start
+ExecStop=${sysconfdir}/init.d/sm-eru stop
PIDFile=/var/run/sm-eru.pid

[Install]
diff --git a/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.conf b/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.conf
index 8ae37ad..d4ecb77 100644
--- a/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.conf
+++ b/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.conf
@@ -6,7 +6,7 @@
[process]
process = sm-watchdog
pidfile = /var/run/sm-watchdog.pid
-script = /etc/init.d/sm-watchdog
+script = ${sysconfdir}/init.d/sm-watchdog
style = lsb ; lsb
severity = major ; minor, major, critical
restarts = 3 ; restarts before error assertion
diff --git a/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.service b/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.service
index 5fd147a..9cebed3 100644
--- a/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.service
+++ b/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.service
@@ -7,8 +7,8 @@ Before=sm.service pmon.service
Type=forking
RemainAfterExit=yes
User=root
-ExecStart=/etc/init.d/sm-watchdog start
-ExecStop=/etc/init.d/sm-watchdog stop
+ExecStart=${sysconfdir}/init.d/sm-watchdog start
+ExecStop=${sysconfdir}/init.d/sm-watchdog stop
PIDFile=/var/run/sm-watchdog.pid

[Install]
--
2.19.0

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PKG_NAME := sm-common-1.0.0
URL = https://github.com/openstack/stx-ha/archive/3ee0e6855958e9d702314f1577e619f657e79ffd.tar.gz
ARCHIVES =

include ../common/Makefile.common
1 change: 1 addition & 0 deletions build_pattern
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
make
4 changes: 4 additions & 0 deletions build_prepend
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VER=%{version}
MAJOR=`echo $VER | awk -F . '{print $1}'`
MINOR=`echo $VER | awk -F . '{print $2}'`
%global _buildsubdir %{_builddir}/stx-ha-3ee0e6855958e9d702314f1577e619f657e79ffd/service-mgmt/sm-common-1.0.0
6 changes: 6 additions & 0 deletions buildreq_add
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
glib-dev
sqlite-autoconf-dev
gcc
util-linux
systemd
systemd-devel
2 changes: 2 additions & 0 deletions buildreq_ban
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file contains build requirements that get picked up but are
# undesirable. One entry per line, no whitespace.
2 changes: 2 additions & 0 deletions buildreq_cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3ee0e6855958e9d702314f1577e619f657e79ffd
util-linux-dev
2 changes: 2 additions & 0 deletions excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file contains the output files that need %exclude. Full path
# names, one per line.
13 changes: 13 additions & 0 deletions install_append
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
%global _sysconfdir '/usr/local/etc'
install -m 750 -d %{buildroot}/usr
install -m 750 -d %{buildroot}/usr/bin
install -m 750 -p -D %{_buildsubdir}/src/sm_eru %{buildroot}%{_bindir}/sm-eru
install -m 750 -p -D %{_buildsubdir}/src/sm_eru_dump %{buildroot}%{_bindir}/sm-eru-dump
install -m 750 -p -D %{_buildsubdir}/src/sm_watchdog %{buildroot}%{_bindir}/sm-watchdog
install -m 644 -p -D %{_buildsubdir}/scripts/sm-eru.service %{buildroot}%{_unitdir}/sm-eru.service
install -m 644 -p -D %{_buildsubdir}/scripts/sm-watchdog.service %{buildroot}%{_unitdir}/sm-watchdog.service
install -m 750 -d %{buildroot}%{_sysconfdir}/pmon.d
install -m 640 -p -D %{_buildsubdir}/scripts/sm-eru.conf %{buildroot}%{_sysconfdir}/pmon.d/sm-eru.conf
install -m 640 -p -D %{_buildsubdir}/scripts/sm-watchdog.conf %{buildroot}%{_sysconfdir}/pmon.d/sm-watchdog.conf
install -m 750 -p -D %{_buildsubdir}/scripts/sm-eru %{buildroot}%{_sysconfdir}/init.d/sm-eru
install -m 750 -p -D %{_buildsubdir}/scripts/sm-watchdog %{buildroot}%{_sysconfdir}/init.d/sm-watchdog
1 change: 1 addition & 0 deletions install_macro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
make DEST_DIR=$RPM_BUILD_ROOT BIN_DIR=%{_bindir} UNIT_DIR=%{_unitdir} LIB_DIR=%{_libdir} INC_DIR=%{_includedir} VER=$VER VER_MJR=$MAJOR install_non_bb
9 changes: 9 additions & 0 deletions install_prepend
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sed -i -e 's/${sysconfdir}/\/usr\/local\/etc/g' %{_builddir}/stx-ha-3ee0e6855958e9d702314f1577e619f657e79ffd/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.conf
sed -i -e 's/${sysconfdir}/\/usr\/local\/etc/g' %{_builddir}/stx-ha-3ee0e6855958e9d702314f1577e619f657e79ffd/service-mgmt/sm-common-1.0.0/scripts/sm-watchdog.service
sed -i -e 's/${sysconfdir}/\/usr\/local\/etc/g' %{_builddir}/stx-ha-3ee0e6855958e9d702314f1577e619f657e79ffd/service-mgmt/sm-common-1.0.0/scripts/sm-eru.service
sed -i -e 's/${sysconfdir}/\/usr\/local\/etc/g' %{_builddir}/stx-ha-3ee0e6855958e9d702314f1577e619f657e79ffd/service-mgmt/sm-common-1.0.0/scripts/Makefile
sed -i -e 's/${sysconfdir}/\/usr\/local\/etc/g' %{_builddir}/stx-ha-3ee0e6855958e9d702314f1577e619f657e79ffd/service-mgmt/sm-common-1.0.0/scripts/sm-eru.conf
%global _unitdir '/usr/lib/systemd/system'
VER=%{version}
MAJOR=`echo $VER | awk -F . '{print $1}'`
MINOR=`echo $VER | awk -F . '{print $2}'`
1 change: 1 addition & 0 deletions make_args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VER=${VER} VER_MJR=$MAJOR
58 changes: 58 additions & 0 deletions options.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[package]
name = sm-common-1.0.0
url = https://github.com/openstack/stx-ha/archive/3ee0e6855958e9d702314f1577e619f657e79ffd.tar.gz
archives =
giturl = https://github.com/openstack/stx-ha.git

[autospec]
# build 32 bit libraries
32bit = false
# allow package to build with test failures
allow_test_failures = false
# unset %build ld_as_needed variable
asneeded = false
# this package is trusted enough to automatically update (used by other tools)
autoupdate = false
# extend flags with '-std=gnu++98
broken_c++ = false
# disable parallelization during build
broken_parallel_build = false
# this package is a library compatability package and only ships versioned library files
compat = false
# set conservative build flags
conservative_flags = false
# dev package requires the extras to be installed
dev_requires_extras = false
# pass -ffast-math to compiler
fast-math = false
# optimize build for speed over size
funroll-loops = false
# set flags to smallest -02 flags possible
insecure_build = false
# do not remove static libraries
keepstatic = false
# do not require autostart subpackage
no_autostart = false
# disable stripping binaries
nostrip = false
# optimize build for size over speed
optimize_size = false
# set profile for pgo
pgo = false
# set flags for security-sensitive builds
security_sensitive = false
# do not run test suite
skip_tests = false
# add .so files to the lib package instead of dev
so_to_lib = false
# configure build for avx2
use_avx2 = false
# configure build for avx512
use_avx512 = false
# add clang flags
use_clang = false
# configure build for lto
use_lto = false
# require package verification for build
verify_required = false

2 changes: 2 additions & 0 deletions pkgconfig_add
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file contains additional pkgconfig build requirements that did
# not get picked up automatically. One name per line, no whitespace.
2 changes: 2 additions & 0 deletions pkgconfig_ban
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file contains pkgconfig build requirements that get picked up
# but are undesirable. One entry per line, no whitespace.
1 change: 1 addition & 0 deletions release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
5 changes: 5 additions & 0 deletions requires_add
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mtce-pmon
/bin/sh
sqlite-autoconf
util-linux
systemd
2 changes: 2 additions & 0 deletions requires_ban
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file contains runtime requirements that get picked up but are
# undesirable. One entry per line, no whitespace.
2 changes: 2 additions & 0 deletions series
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0001-disable-warning-as-error.patch
0002-change-sysconfig-dir.patch
Loading