Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base: recipes-sota: aktualizr: enable changing COMPOSE_HTTP_TIMEOUT v… #185

Merged
merged 1 commit into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ConditionPathExists=!/usr/bin/mbedCloudClient
[Service]
RestartSec=180
Restart=always
Environment="COMPOSE_HTTP_TIMEOUT=@@COMPOSE_HTTP_TIMEOUT@@"
ExecStart=/usr/bin/aktualizr-lite --update-lockfile /run/lock/aktualizr-lite-update daemon

[Install]
Expand Down
8 changes: 7 additions & 1 deletion meta-lmp-base/recipes-sota/aktualizr/aktualizr_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SRCREV_lmp = "41ebc462578014467297187782b04619e482118f"

SRC_URI_lmp = "gitsm://github.com/foundriesio/aktualizr-lite;branch=${BRANCH};name=aktualizr \
file://aktualizr.service \
file://aktualizr-lite.service \
file://aktualizr-lite.service.in \
file://aktualizr-lite.path \
file://aktualizr-secondary.service \
file://aktualizr-serialcan.service \
Expand All @@ -27,12 +27,18 @@ PACKAGECONFIG[ubootenv] = ",,,u-boot-fw-utils u-boot-default-env aktualizr-uboot
SYSTEMD_PACKAGES += "${PN}-lite"
SYSTEMD_SERVICE_${PN}-lite = "aktualizr-lite.service aktualizr-lite.path"

COMPOSE_HTTP_TIMEOUT ?= "60"

# Workaround as aktualizr is a submodule of aktualizr-lite
do_configure_prepend_lmp() {
cd ${S}
git log -1 --format=%h | tr -d '\n' > VERSION
}

do_compile_append_lmp() {
sed -e 's/@@COMPOSE_HTTP_TIMEOUT@@/${COMPOSE_HTTP_TIMEOUT}/' ${WORKDIR}/aktualizr-lite.service.in > ${WORKDIR}/aktualizr-lite.service
mike-scott marked this conversation as resolved.
Show resolved Hide resolved
}

do_install_prepend_lmp() {
# link the path to config so aktualizr's do_install_append will find config files
[ -e ${S}/config ] || ln -s ${S}/aktualizr/config ${S}/config
Expand Down