Skip to content

Commit

Permalink
Update recipe for Kanto Update Manager in kirkstone branch eclipse-ka…
Browse files Browse the repository at this point in the history
…nto#69

Signed-off-by: Hristo Bozhilov <Hristo.Bozhilov@bosch.com>
  • Loading branch information
hristobojilov committed Aug 31, 2023
1 parent c6e1439 commit fad3cb8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions recipes-management/update-manager/files/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"log": {
"logFile": "@UM_LOG_DD@/update-manager/update-manager.log"
"logFile": "@UM_LOG_DD@/kanto-update-manager/kanto-update-manager.log"
},
"domain": "device",
"agents": {
"containers": {
"name": "containers",
"rebootRequired": false,
"readTimeout": "30s"
}
Expand Down
2 changes: 1 addition & 1 deletion recipes-management/update-manager/files/service.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requires=mosquitto.service

[Service]
Type=simple
ExecStart=@UM_BIN_DD@/update-manager --config-file @UM_CFG_DD@/update-manager/config.json
ExecStart=@UM_BIN_DD@/kanto-update-manager -config-file @UM_CFG_DD@/kanto-update-manager/config.json
Restart=always

[Install]
Expand Down
20 changes: 10 additions & 10 deletions recipes-management/update-manager/update-manager_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ inherit systemd

SYSTEMD_AUTO_ENABLE = "enable"
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','update-manager.service','',d)}"
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kanto-update-manager.service','',d)}"

# workaround for network issue
do_compile[network] = "1"

FILES:${PN} += "${UM_SYSUNIT_DD}/update-manager.service"
FILES:${PN} += "${UM_BIN_DD}/update-manager"
FILES:${PN} += "${UM_SYSUNIT_DD}/kanto-update-manager.service"
FILES:${PN} += "${UM_BIN_DD}/kanto-update-manager"
# ensure all additional resources are properly packed in the resulting package if provided
FILES:${PN} += "${UM_CFG_DD}/update-manager/config.json"
FILES:${PN} += "${UM_CFG_DD}/kanto-update-manager/config.json"

RDEPENDS:${PN} += "mosquitto"

Expand All @@ -43,27 +43,27 @@ RPROVIDES:${PN} += "kanto/update-manager"
do_install() {
install -d "${D}/${UM_BIN_DD}"

install -m 0755 "${GO_BUILD_BINDIR}/update-manager" "${D}${UM_BIN_DD}/update-manager"
install -m 0755 "${GO_BUILD_BINDIR}/update-manager" "${D}${UM_BIN_DD}/kanto-update-manager"

if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${UM_SYSUNIT_DD}

# update-manager
install -d ${D}${UM_CFG_DD}/update-manager
install -d ${D}${UM_CFG_DD}/kanto-update-manager

# config.json
install -m 0644 ${WORKDIR}/config.json ${D}${UM_CFG_DD}/update-manager
install -m 0644 ${WORKDIR}/config.json ${D}${UM_CFG_DD}/kanto-update-manager

# service.template as service
install -m 0644 ${WORKDIR}/service.template ${D}${UM_SYSUNIT_DD}/update-manager.service
install -m 0644 ${WORKDIR}/service.template ${D}${UM_SYSUNIT_DD}/kanto-update-manager.service

# fill in the update-manager systemd service template with the custom configs provided
sed -e 's,@UM_BIN_DD@,${UM_BIN_DD},g' \
-e 's,@UM_CFG_DD@,${UM_CFG_DD},g' \
-i ${D}${UM_SYSUNIT_DD}/update-manager.service
-i ${D}${UM_SYSUNIT_DD}/kanto-update-manager.service

# fill in the config.json template with the custom configs provided
sed -e 's,@UM_LOG_DD@,${UM_LOG_DD},g' \
-i ${D}${UM_CFG_DD}/update-manager/config.json
-i ${D}${UM_CFG_DD}/kanto-update-manager/config.json
fi
}

0 comments on commit fad3cb8

Please sign in to comment.