flash: Move image manager tmpfile config
1e4452449 added a systemd tmpfile config file for the software image
upload path but the config file was added to the systemd recipe.
tmpfile config files should be added to the recipes/config files that
use them. For example on an RPM based distro:
$ rpm -qf /usr/lib/tmpfiles.d/samba.conf
samba-common-4.7.7-0.fc27.noarch
Tested: Validated software.conf present in Witherspoon rootfs
Change-Id: I47e8c8c44eb19440cc98d0380e9634f688eccb21
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/common/recipes-phosphor/flash/phosphor-software-manager.bb b/common/recipes-phosphor/flash/phosphor-software-manager.bb
index 06a8006..f13805e 100644
--- a/common/recipes-phosphor/flash/phosphor-software-manager.bb
+++ b/common/recipes-phosphor/flash/phosphor-software-manager.bb
@@ -62,7 +62,7 @@
virtual-obmc-image-manager \
"
-FILES_${PN}-version += "${sbindir}/phosphor-version-software-manager"
+FILES_${PN}-version += "${sbindir}/phosphor-version-software-manager ${exec_prefix}/lib/tmpfiles.d/software.conf"
FILES_${PN}-download-mgr += "${sbindir}/phosphor-download-manager"
FILES_${PN}-updater += " \
${sbindir}/phosphor-image-updater \
@@ -105,6 +105,8 @@
SRC_URI += "file://obmc-flash-bmc"
SRC_URI += "file://synclist"
+SRC_URI += "file://software.conf"
+
do_install_append() {
install -d ${D}${sbindir}
install -m 0755 ${WORKDIR}/obmc-flash-bmc ${D}${sbindir}/obmc-flash-bmc
@@ -114,6 +116,15 @@
install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/synclist ${D}${sysconfdir}/synclist
fi
+
+ # /tmp/images is the software image upload directory.
+ # It should not be deleted since it is watched by the Image Manager
+ # for new images.
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
+ install -d ${D}${exec_prefix}/lib/tmpfiles.d
+ install -m 644 ${WORKDIR}/software.conf ${D}${exec_prefix}/lib/tmpfiles.d/
+ fi
}
SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt"
diff --git a/common/recipes-phosphor/flash/phosphor-software-manager/software.conf b/common/recipes-phosphor/flash/phosphor-software-manager/software.conf
new file mode 100644
index 0000000..09ecd92
--- /dev/null
+++ b/common/recipes-phosphor/flash/phosphor-software-manager/software.conf
@@ -0,0 +1,3 @@
+# /tmp/images is the software image upload directory
+# It should not be deleted if the UBI code update is used.
+x /tmp/images