From f3142a03831c528fbfe30c3132f43655a1ff2f1d Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Thu, 10 Mar 2022 14:38:44 +0000 Subject: [PATCH] debian: Simplify mtce-storage packaging - Ensure that the service is not started when the package is installed. - Simplify debian/rules to use the Makefile in order to install the files that are needed. Test Plan PASS Build package and ISO PASS Boot and check for goenabled-storage.service is not enabled. Story: 2009101 Task: 43023 Signed-off-by: Chuck Short Change-Id: Id9929f3ff096e319759420ef518a67aa06bc381d --- mtce-storage/debian/deb_folder/control | 3 +-- .../debian/deb_folder/mtce-storage.install | 1 + mtce-storage/debian/deb_folder/not-installed | 1 + mtce-storage/debian/deb_folder/rules | 15 +++++++++------ .../deb_folder/systemd/00-mtce-storage.preset | 1 + 5 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 mtce-storage/debian/deb_folder/not-installed create mode 100644 mtce-storage/debian/deb_folder/systemd/00-mtce-storage.preset diff --git a/mtce-storage/debian/deb_folder/control b/mtce-storage/debian/deb_folder/control index 7ae3df6b..5ba1303d 100644 --- a/mtce-storage/debian/deb_folder/control +++ b/mtce-storage/debian/deb_folder/control @@ -2,8 +2,7 @@ Source: mtce-storage Section: admin Priority: optional Maintainer: StarlingX Developers -Build-Depends: debhelper-compat (= 13), - libsystemd-dev +Build-Depends: debhelper-compat (= 13) Standards-Version: 4.5.1 Homepage: https://www.starlingx.io diff --git a/mtce-storage/debian/deb_folder/mtce-storage.install b/mtce-storage/debian/deb_folder/mtce-storage.install index 7bbf97d7..8f6c7c26 100644 --- a/mtce-storage/debian/deb_folder/mtce-storage.install +++ b/mtce-storage/debian/deb_folder/mtce-storage.install @@ -1,2 +1,3 @@ etc/init.d/goenabledStorage lib/systemd/system/goenabled-storage.service +debian/systemd/00-mtce-storage.preset etc/systemd/systemd-preset diff --git a/mtce-storage/debian/deb_folder/not-installed b/mtce-storage/debian/deb_folder/not-installed new file mode 100644 index 00000000..5d0f65b8 --- /dev/null +++ b/mtce-storage/debian/deb_folder/not-installed @@ -0,0 +1 @@ +usr/share/licenses/mtce-storage-1.0/LICENSE diff --git a/mtce-storage/debian/deb_folder/rules b/mtce-storage/debian/deb_folder/rules index f9979b32..3e6de109 100644 --- a/mtce-storage/debian/deb_folder/rules +++ b/mtce-storage/debian/deb_folder/rules @@ -2,14 +2,17 @@ # export DH_VERBOSE = 1 export ROOT = debian/tmp -export INITDIR = $(ROOT)/etc/init.d -export SYSTEMDDIR = $(ROOT)/lib/systemd/system %: dh $@ override_dh_auto_install: - install -m 755 -d $(INITDIR) - install -m 755 -p -D scripts/goenabled $(INITDIR)/goenabledStorage - install -m 755 -d $(SYSTEMDDIR) - install -m 644 -p -D scripts/goenabled-storage.service $(SYSTEMDDIR) + $(MAKE) buildroot=$(ROOT) \ + _sysconfdir=/etc \ + _unitdir=/lib/systemd/system \ + _datarootdir=/usr/share \ + install + dh_install + +override_dh_installsystemd: + dh_installsystemd -pmtce-storage --no-enable diff --git a/mtce-storage/debian/deb_folder/systemd/00-mtce-storage.preset b/mtce-storage/debian/deb_folder/systemd/00-mtce-storage.preset new file mode 100644 index 00000000..1a327932 --- /dev/null +++ b/mtce-storage/debian/deb_folder/systemd/00-mtce-storage.preset @@ -0,0 +1 @@ +disable goenabled-storage.service