Skip to content
Snippets Groups Projects
Commit a9b17850 authored by Zygmunt Krynicki's avatar Zygmunt Krynicki
Browse files

rauc: ensure RAUC state directory exists

RAUC uses a state file `status.raucs`. In the Oniro images this file is
prescribed to be in `/run/mount/sysdata/common/`. Exploratory testing
has found that RAUC cannot create the leading directory automatically
and fails to handle an update transaction.

Resolve this by adding a systemd configuration override file which
creates the directory using ExecStartPre=

Closes: https://git.ostc-eu.org/distro/oniro/-/issues/158


Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 24a8100c
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
# Create directory where RAUC stores the status file. This must be
# synchronized with the system.conf file installed into /etc/rauc/system.conf.
[Service]
ExecStartPre=/bin/mkdir -p /run/mount/sysdata/common
...@@ -43,3 +43,17 @@ do_install_append() { ...@@ -43,3 +43,17 @@ do_install_append() {
bbwarn "The image is using a known, insecure test key for verifying RAUC bundles. Do not use this in production systems." bbwarn "The image is using a known, insecure test key for verifying RAUC bundles. Do not use this in production systems."
fi fi
} }
# Install Oniro specific override for RAUC state directory.
SRC_URI_append = " \
file://rauc-state-dir.conf \
"
FILES_${PN}-service += "\
${systemd_unitdir}/system/rauc.service.d/*.conf \
"
do_install_append() {
install -D -m 644 ${WORKDIR}/rauc-state-dir.conf --target-directory=${D}${systemd_unitdir}/system/rauc.service.d/
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment