From e31d63dad78637f98e70c0adf1234b064bb5bd5f Mon Sep 17 00:00:00 2001 From: Erich Cordoba Date: Thu, 1 Nov 2018 11:49:43 -0600 Subject: [PATCH] Add makefile for compute-huge A makefile was added to compute-huge. The topology script was moved to the source folder to be handled by this makefile. Story: 2004043 Task: 27550 Change-Id: I84e70f409de7f68c9f04fb76b13df251858f7c4a Signed-off-by: Erich Cordoba --- compute-huge/centos/build_srpm.data | 1 - compute-huge/centos/compute-huge.spec | 36 ++++----------------- compute-huge/compute-huge/Makefile | 31 ++++++++++++++++++ compute-huge/{bin => compute-huge}/topology | 0 4 files changed, 37 insertions(+), 31 deletions(-) create mode 100644 compute-huge/compute-huge/Makefile rename compute-huge/{bin => compute-huge}/topology (100%) diff --git a/compute-huge/centos/build_srpm.data b/compute-huge/centos/build_srpm.data index bafa30fafc..7e36f63cc1 100644 --- a/compute-huge/centos/build_srpm.data +++ b/compute-huge/centos/build_srpm.data @@ -1,4 +1,3 @@ SRC_DIR="compute-huge" -COPY_LIST_TO_TAR="bin" COPY_LIST="$SRC_DIR/LICENSE" TIS_PATCH_VER=10 diff --git a/compute-huge/centos/compute-huge.spec b/compute-huge/centos/compute-huge.spec index 067b3ff4a8..93aa5c953b 100644 --- a/compute-huge/centos/compute-huge.spec +++ b/compute-huge/centos/compute-huge.spec @@ -28,38 +28,14 @@ Initial compute node hugepages and reserved cpus configuration %setup %build -%{__python} -m compileall topology.py +make %install - -# compute init scripts -install -d -m 755 %{buildroot}%{local_etc_initd} -install -p -D -m 755 affine-platform.sh %{buildroot}%{local_etc_initd}/affine-platform.sh - -# utility scripts -install -p -D -m 755 cpumap_functions.sh %{buildroot}%{local_etc_initd}/cpumap_functions.sh -install -p -D -m 755 task_affinity_functions.sh %{buildroot}%{local_etc_initd}/task_affinity_functions.sh -install -p -D -m 755 log_functions.sh %{buildroot}%{local_etc_initd}/log_functions.sh -install -d -m 755 %{buildroot}%{local_bindir} -install -p -D -m 755 ps-sched.sh %{buildroot}%{local_bindir}/ps-sched.sh -# TODO: Only ship pyc ? -install -p -D -m 755 topology.py %{buildroot}%{local_bindir}/topology.py -install -p -D -m 755 topology.pyc %{buildroot}%{local_bindir}/topology.pyc -install -p -D -m 755 affine-interrupts.sh %{buildroot}%{local_bindir}/affine-interrupts.sh -install -p -D -m 755 set-cpu-wakeup-latency.sh %{buildroot}%{local_bindir}/set-cpu-wakeup-latency.sh -install -p -D -m 755 bin/topology %{buildroot}%{local_bindir}/topology - -# compute config data -install -d -m 755 %{buildroot}%{local_etc_nova} -install -p -D -m 755 compute_reserved.conf %{buildroot}%{local_etc_nova}/compute_reserved.conf - -# goenabled check -install -d -m 755 %{buildroot}%{local_etc_goenabledd} -install -p -D -m 755 compute-huge-goenabled.sh %{buildroot}%{local_etc_goenabledd}/compute-huge-goenabled.sh - -# systemd services -install -d -m 755 %{buildroot}%{_unitdir} -install -p -D -m 664 affine-platform.sh.service %{buildroot}%{_unitdir}/affine-platform.sh.service +make install BINDIR=%{buildroot}%{local_bindir} \ + INITDDIR=%{buildroot}%{local_etc_initd} \ + GOENABLEDDIR=%{buildroot}%{local_etc_goenabledd} \ + NOVACONFDIR=%{buildroot}%{local_etc_nova} \ + SYSTEMDDIR=%{buildroot}%{_unitdir} %post /bin/systemctl enable affine-platform.sh.service >/dev/null 2>&1 diff --git a/compute-huge/compute-huge/Makefile b/compute-huge/compute-huge/Makefile new file mode 100644 index 0000000000..3f99622535 --- /dev/null +++ b/compute-huge/compute-huge/Makefile @@ -0,0 +1,31 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + +BINDIR ?= /usr/bin +INITDDIR ?= /etc/init.d/ +GOENABLEDDIR ?= /etc/goenabled.d/ +NOVACONFDIR ?= /etc/nova +SYSTEMDDIR ?= /usr/lib/systemd/system/ + +all: + python -m compileall topology.py + +install: + install -d -m 755 $(BINDIR) + install -d -m 755 $(INITDDIR) + install -d -m 755 $(GOENABLEDDIR) + install -d -m 755 $(NOVACONFDIR) + install -d -m 755 $(SYSTEMDDIR) + install -p -D -m 755 affine-platform.sh $(INITDDIR)/affine-platform.sh + install -p -D -m 755 cpumap_functions.sh $(INITDDIR)/cpumap_functions.sh + install -p -D -m 755 task_affinity_functions.sh $(INITDDIR)/task_affinity_functions.sh + install -p -D -m 755 ps-sched.sh $(BINDIR)/ps-sched.sh + install -p -D -m 755 topology.py $(BINDIR)/topology.py + install -p -D -m 755 topology.pyc $(BINDIR)/topology.pyc + install -p -D -m 755 affine-interrupts.sh $(BINDIR)/affine-interrupts.sh + install -p -D -m 755 set-cpu-wakeup-latency.sh $(BINDIR)/set-cpu-wakeup-latency.sh + install -p -D -m 755 topology $(BINDIR)/topology + install -p -D -m 755 compute_reserved.conf $(NOVACONFDIR)/compute_reserved.conf + install -p -D -m 755 compute-huge-goenabled.sh $(GOENABLEDDIR)/compute-huge-goenabled.sh + install -p -D -m 664 affine-platform.sh.service $(SYSTEMDDIR)/affine-platform.sh.service diff --git a/compute-huge/bin/topology b/compute-huge/compute-huge/topology similarity index 100% rename from compute-huge/bin/topology rename to compute-huge/compute-huge/topology