summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-06-08 17:20:52 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-06-25 23:05:24 +0300
commita4e7328186fcc507f4ef5c4c18876ecd5107bec5 (patch)
tree283de0d2e42a7f94ce5140af5b79183e87e503c4
parentcf994353c41012ceabeb20561158d6cdd3319ffb (diff)
downloadopenbmc-a4e7328186fcc507f4ef5c4c18876ecd5107bec5.tar.xz
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>
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-core/systemd/systemd_%.bbappend25
-rw-r--r--meta-phosphor/common/recipes-core/systemd/systemd/software.conf3
-rw-r--r--meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend8
-rw-r--r--meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb13
-rw-r--r--meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/software.conf (renamed from meta-openbmc-machines/meta-openpower/common/recipes-core/systemd/systemd/software.conf)0
5 files changed, 12 insertions, 37 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-core/systemd/systemd_%.bbappend b/meta-openbmc-machines/meta-openpower/common/recipes-core/systemd/systemd_%.bbappend
deleted file mode 100644
index e42259e5f..000000000
--- a/meta-openbmc-machines/meta-openpower/common/recipes-core/systemd/systemd_%.bbappend
+++ /dev/null
@@ -1,25 +0,0 @@
-inherit obmc-phosphor-utils
-
-SRC_URI += "${@df_enabled(d, 'openpower-ubi-fs', 'file://software.conf')}"
-
-install_tmpfile() {
- # /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', 'openpower-ubi-fs', 'true', 'false', d)}; then
- install -m 0644 ${WORKDIR}/software.conf ${D}${exec_prefix}/lib/tmpfiles.d/
- fi
-}
-
-install_tmpfile_df-obmc-ubi-fs() {
- # Don't install software.conf if obmc-ubi-fs is set since
- # the bbappend in the meta-phosphor layer already installs
- # if obmc-ubi-fs is set.
-
- :
-}
-
-do_install_append() {
- install_tmpfile
-}
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/software.conf b/meta-phosphor/common/recipes-core/systemd/systemd/software.conf
deleted file mode 100644
index 09ecd92e4..000000000
--- a/meta-phosphor/common/recipes-core/systemd/systemd/software.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# /tmp/images is the software image upload directory
-# It should not be deleted if the UBI code update is used.
-x /tmp/images
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
index 539c2d921..d7cad5fd5 100644
--- a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
@@ -16,7 +16,6 @@ SRC_URI += "file://0004-basic-Use-path-escaping-when-mangling-path-instances.pat
#TODO upstream the below patch via below issue
#https://github.com/openbmc/openbmc/issues/2016
SRC_URI += "file://0005-dont-return-error-if-unable-to-create-network-namespace.patch"
-SRC_URI_append_df-obmc-ubi-fs = " file://software.conf"
SRC_URI += "file://0001-watchdog-allow-a-device-path-to-be-specified.patch"
SRC_URI += "file://0002-core-Add-WatchdogDevice-config-option-and-implement-.patch"
@@ -31,10 +30,3 @@ do_install_append() {
install -m 644 ${WORKDIR}/default.network ${D}${systemd_unitdir}/network/
install -m 644 -D ${WORKDIR}/service-restart-policy.conf ${D}${systemd_unitdir}/system.conf.d/service-restart-policy.conf
}
-
-do_install_append_df-obmc-ubi-fs() {
- # /tmp/images is the software image upload directory.
- # It should not be deleted since it is watched by the Image Manager
- # for new images.
- install -m 0644 ${WORKDIR}/software.conf ${D}${exec_prefix}/lib/tmpfiles.d/
-}
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb
index 06a800601..f13805e73 100644
--- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb
@@ -62,7 +62,7 @@ RPROVIDES_${PN}-version += " \
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 @@ SYSTEMD_SUBSTITUTIONS += "RW_SIZE:${BMC_RW_SIZE}:obmc-flash-bmc-ubirw.service"
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 @@ do_install_append() {
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/meta-openbmc-machines/meta-openpower/common/recipes-core/systemd/systemd/software.conf b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/software.conf
index 09ecd92e4..09ecd92e4 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-core/systemd/systemd/software.conf
+++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/software.conf