Files
ha/service-mgmt/sm-db/database/Makefile
Kyale, Eliud 7e15abae2d Move sm database files for ostree compatibility
Move the following sm database files to /etc/sm/<release>
- sm.db
- sm.hb.db

update the paths in source code to point to the new database location
added a static_assert to fail if SW_VERSION macro is not defined

Test plan:

PASS - AIO-SX: iso install
               verify database files are in the correct location
                - /var/lib/sm/...
                - /etc/sm/<rel>/...
                - /var/run/sm/...
               ensure sm is running smoothly after controller-0 unlock

PASS - AIO-DX: iso install upto controller-1 unlock
               user host-swact
               uncontrolled swact by powering off active controller

Story: 2010676
Task: 50649

Change-Id: I2195c420438135c9b109060de13765b0897d7dc9
Signed-off-by: Kyale, Eliud <Eliud.Kyale@windriver.com>
2024-07-25 16:27:42 -04:00

14 lines
430 B
Makefile

#
## SPDX-License-Identifier: Apache-2.0
#
SW_VERSION="$(shell grep SW_VERSION /usr/include/build_info.h | cut -d ' ' -f 3)"
install:
install -d ${DEST_DIR}/etc/sm/${SW_VERSION}
install -d ${DEST_DIR}/var/lib/sm/patches
install -d ${DEST_DIR}/usr/share/sm/patches
install sm.hb.db ${DEST_DIR}/etc/sm/${SW_VERSION}
install sm.db ${DEST_DIR}/etc/sm/${SW_VERSION}
install -m 644 sm-patch.sql ${DEST_DIR}/usr/share/sm/patches