Files
update/sw-patch/debian/deb_folder/rules
mmachado 196534120c Remove sw-patch-agent service
sw-patch-agent service would cause unwanted
reboots and conflicts with the USM patching strategy:

sw-patch-agent can interfere with software-agent and incorrectly
flag the host as reboot-required after noticing that it's not
patch-current by sw-patch standards

Logs will typically look like this before each reboot:

sw-patch-agent[2049]: patch_agent.py(390): INFO: Active Sysroot
Commit:650ace717b24afd2e7283cc6ce8b01f13adce84db95e03685610e120424610b9
does not match active controller's Feed Repo Commit:
028e1fa688afaa27aa7a34d4b5ee9eeb8d188b691ba3e558c409bb58e0e83fe2
sw-patch: Node has been patched, with reboot-required flag set.
Rebooting

Since sw-patch-agent is no longer needed, it's to be removed.

Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/935555

Test-Plan:
PASS: AIO-SX upgrade using sw-manager strategy
PASS: AIO-DX System Controller upgrade using strategy
PASS: subcloud upgrade using dcmanager strategy
PASS: DC patch orchestration for n-1 subclouds

Story: 2010676
Task: 51387

Change-Id: I2af7dfab9da89eeba4ffef3fa0d884ae6f2c354f
Signed-off-by: mmachado <mmachado@windriver.com>
2024-11-25 15:05:33 +00:00

77 lines
2.7 KiB
Makefile
Executable File

#!/usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=cgcs-patch
DEBIAN_DESTDIR := $(CURDIR)/debian/tmp
PMONDIR := ${DEBIAN_DESTDIR}/usr/share/starlingx/pmon.d
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_test:
echo
override_dh_auto_install:
echo
override_dh_auto_clean:
python3 setup.py clean
override_dh_install:
python3 setup.py install -f --install-layout=deb --root=${DEBIAN_DESTDIR}
python3 setup.py bdist_wheel \
--universal \
-d $(CURDIR)/debian/cgcs-patch-wheel/usr/share/python-wheels
install -m 755 -d ${DEBIAN_DESTDIR}/usr/sbin
install -m 755 -d ${DEBIAN_DESTDIR}/usr/share/bash-completion/completions
install -m 755 -d ${DEBIAN_DESTDIR}/etc/goenabled.d
install -m 755 -d ${DEBIAN_DESTDIR}/etc/init.d
install -m 755 -d ${DEBIAN_DESTDIR}/etc/logrotate.d
install -m 755 -d ${DEBIAN_DESTDIR}/etc/patching
install -m 700 -d ${DEBIAN_DESTDIR}/etc/patching/patch-scripts
install -m 755 -d ${DEBIAN_DESTDIR}/lib/systemd/system
install -m 755 -d ${PMONDIR}
install -m 500 bin/sw-patch-controller-daemon \
${DEBIAN_DESTDIR}/usr/sbin/sw-patch-controller-daemon
install -m 555 bin/sw-patch \
${DEBIAN_DESTDIR}/usr/sbin/sw-patch
install -m 500 bin/sw-patch-controller-daemon-init.sh \
${DEBIAN_DESTDIR}/etc/init.d/sw-patch-controller-daemon
install -m 600 bin/patching.conf \
${DEBIAN_DESTDIR}/etc/patching/patching.conf
install -m 644 bin/policy.json \
${DEBIAN_DESTDIR}/etc/patching/policy.json
install -m 444 bin/pmon-sw-patch-controller-daemon.conf \
${PMONDIR}/sw-patch-controller-daemon.conf
install -m 444 bin/*.service \
${DEBIAN_DESTDIR}/lib/systemd/system
install -m 444 bin/sw-patch.completion \
${DEBIAN_DESTDIR}/usr/share/bash-completion/completions/sw-patch
install -m 400 bin/patch-functions \
${DEBIAN_DESTDIR}/etc/patching/patch-functions
install -D -m 444 bin/patch-tmpdirs.conf \
${DEBIAN_DESTDIR}/run/patch-tmpdirs.conf
install -m 500 bin/run-patch-scripts \
${DEBIAN_DESTDIR}/usr/sbin/run-patch-scripts
install -m 500 bin/sw-patch-controller-daemon-restart \
${DEBIAN_DESTDIR}/usr/sbin/sw-patch-controller-daemon-restart
install -m 500 bin/sw-patch-init.sh \
${DEBIAN_DESTDIR}/etc/init.d/sw-patch
install -m 500 bin/sw-patch-controller-init.sh \
${DEBIAN_DESTDIR}/etc/init.d/sw-patch-controller
install -m 555 bin/patch_check_goenabled.sh \
${DEBIAN_DESTDIR}/etc/goenabled.d/patch_check_goenabled.sh
install -m 444 bin/patching.logrotate \
${DEBIAN_DESTDIR}/etc/logrotate.d/patching
dh_install
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
override_dh_fixperms:
dh_fixperms -Xsw-patch-* -Xpatching.conf -Xpolicy.json \
-Xpatch-functions -Xpatch-tmpdirs.conf -Xrun-patch-scripts \
-Xpatch_check_goenabled.sh -Xpatching -Xupgrade-start-pkg-extract