Merge branch 'master' into f/stein

Change-Id: Ie2b362b710a004b05990431929a3f396a4300b13
Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Saul Wold 2019-02-19 10:51:26 -08:00
commit 44b1978b3f
4 changed files with 40 additions and 28 deletions

View File

@ -64,33 +64,13 @@ MINOR=`echo $VER | awk -F . '{print $2}'`
PATCH=%{patchlevel}
make all VER=${VER} MAJOR=${MAJOR} MINOR=${MINOR} PATCH=${PATCH}
%global _buildsubdir %{_builddir}/%{name}-%{version}
%install
install -d 750 -d %{buildroot}/usr/sbin
install -d 750 -d %{buildroot}%{_sysconfdir}/init.d
install -m 750 -d %{buildroot}/usr
install -m 750 -d %{buildroot}/usr/src
install -m 750 -d %{buildroot}/usr/src/debug
install -m 750 -d %{buildroot}/usr/src/debug/%{name}-%{version}
install -d 750 -d %{buildroot}/usr/sbin/.debug
install -m 750 %{_buildsubdir}/scripts/app_scale_helper %{buildroot}/usr/sbin/app_scale_helper
install -m 750 %{_buildsubdir}/scripts/offline_cpus %{buildroot}/usr/sbin/offline_cpus
install -m 750 %{_buildsubdir}/bin/guest_scale_helper %{buildroot}/usr/sbin/guest_scale_helper
install -m 750 %{_buildsubdir}/bin/guest_scale_agent %{buildroot}/usr/sbin/guest_scale_agent
install -m 750 %{_buildsubdir}/scripts/init_offline_cpus %{buildroot}/etc/init.d/offline_cpus
install -m 750 %{_buildsubdir}/bin/guest_scale_agent %{buildroot}/usr/sbin/.debug/guest_scale_agent
install -d %{buildroot}%{_unitdir}
install -m 750 %{_buildsubdir}/scripts/offline-cpus.service %{buildroot}%{_unitdir}/offline-cpus.service
install -m 750 %{_buildsubdir}/scripts/guest-scale-agent.service %{buildroot}%{_unitdir}/guest-scale-agent.service
# Deploy to the SDK deployment directory
install -d %{buildroot}%{cgcs_sdk_deploy_dir}
install -m 644 sdk/wrs-guest-scale-%{version}.%{patchlevel}.tgz %{buildroot}%{cgcs_sdk_deploy_dir}/wrs-guest-scale-%{version}.%{patchlevel}.tgz
make install \
DESTDIR=%{buildroot} \
SYSCONFDIR=%{buildroot}%{_sysconfdir} \
VERSION=%{version} PATCH=%{tis_patch_ver}\
UNITDIR=%{buildroot}%{_unitdir} \
SDK_DEPLOY_DIR=%{buildroot}%{cgcs_sdk_deploy_dir}
%post
%systemd_post offline-cpus.service

View File

@ -34,6 +34,13 @@
EXECS = guest_scale_helper guest_scale_agent
DESTDIR ?= /
SYSCONFDIR ?= $(DESTDIR)/etc
UNITDIR ?= $(DESTDIR)/usr/lib/systemd/system
SDK_DEPLOY_DIR ?= /opt/deploy/cgcs_sdk
VERSION ?= 2.0
PATCH ?= 0
CFLAGS= -g -Wall -Wformat -Wformat-security
ODIR=obj
BINDIR=bin
@ -104,6 +111,31 @@ $(BINDIR)/guest_scale_agent: $(GUEST_SCALE_AGENT_OBJ)
$(BINDIR)/guest_scale_helper: $(GUEST_SCALE_HELPER_OBJ)
$(CC) -o $@ $^ $(LDFLAGS) -lhostguestmsg -ljson-c
install:
install -d 750 -d $(DESTDIR)/usr/sbin
install -d 750 -d $(SYSCONFDIR)/init.d
install -m 750 -d $(DESTDIR)/usr
install -m 750 -d $(DESTDIR)/usr/src
install -m 750 -d $(DESTDIR)/usr/src/debug
install -m 750 -d $(DESTDIR)/usr/src/debug/guest-scale-agent-$(VERSION)
install -d 750 -d $(DESTDIR)/usr/sbin/.debug
install -m 750 scripts/app_scale_helper $(DESTDIR)/usr/sbin/app_scale_helper
install -m 750 scripts/offline_cpus $(DESTDIR)/usr/sbin/offline_cpus
install -m 750 bin/guest_scale_helper $(DESTDIR)/usr/sbin/guest_scale_helper
install -m 750 bin/guest_scale_agent $(DESTDIR)/usr/sbin/guest_scale_agent
install -m 750 scripts/init_offline_cpus $(SYSCONFDIR)/init.d/offline_cpus
install -m 750 bin/guest_scale_agent $(DESTDIR)/usr/sbin/.debug/guest_scale_agent
install -d $(UNITDIR)
install -m 750 scripts/offline-cpus.service $(UNITDIR)/offline-cpus.service
install -m 750 scripts/guest-scale-agent.service $(UNITDIR)/guest-scale-agent.service
install -d $(SDK_DEPLOY_DIR)
install -m 644 sdk/wrs-guest-scale-$(VERSION).$(PATCH).tgz $(SDK_DEPLOY_DIR)/wrs-guest-scale-$(VERSION).$(PATCH).tgz
# Add the host clean as a dependency to the SDK stuff
clean: host_clean
host_clean:

View File

@ -1,2 +1,2 @@
SRC_DIR="host-guest-comm-2.0"
TIS_PATCH_VER=5
TIS_PATCH_VER=6

View File

@ -140,7 +140,7 @@ install:
install -m 644 server_group.h $(DESTDIR)/usr/src/debug/host-guest-comm-$(VERSION)/server_group.h
install -m 750 scripts/host_agent $(SYSCONFDIR)/init.d/host_agent
install -m 640 scripts/host_agent.service $(UNITDIR)/host_agent.service
install -m 644 scripts/host_agent.service $(UNITDIR)/host_agent.service
install -m 644 scripts/guest-agent.service $(UNITDIR)/guest-agent.service
install -m 640 scripts/host_agent.conf $(SYSCONFDIR)/pmon.d/host_agent.conf
install -m 750 bin/host_agent $(DESTDIR)/usr/sbin/host_agent