Skip to content
Snippets Groups Projects
Commit ff2f282d authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

oniro-mounts: Have the entire /home mounted from appdata


This offers the ability to have persistent data for features that
requires user data: for example running podman in rootless mode.
This change also makes sure that the home directory of user 'oniro'
exists on the appdata partition (using systemd tmpfiles).

Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 77d350f8
No related branches found
No related tags found
1 merge request!204Integrate podman in Oniro
...@@ -12,15 +12,18 @@ LICENSE = "Apache-2.0" ...@@ -12,15 +12,18 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
SRC_URI = " \ SRC_URI = " \
file://home.mount \
file://run-mount-boot.mount \ file://run-mount-boot.mount \
file://run-mount-devdata.mount \ file://run-mount-devdata.mount \
file://run-mount-appdata.mount \ file://run-mount-appdata.mount \
file://run-mount-sysdata.mount \ file://run-mount-sysdata.mount \
file://oniro-homes.conf.tmpfiles \
" "
inherit allarch systemd inherit allarch systemd
SYSTEMD_SERVICE:${PN} = " \ SYSTEMD_SERVICE:${PN} = " \
home.mount \
run-mount-boot.mount \ run-mount-boot.mount \
run-mount-sysdata.mount \ run-mount-sysdata.mount \
run-mount-devdata.mount \ run-mount-devdata.mount \
...@@ -40,6 +43,10 @@ do_install () { ...@@ -40,6 +43,10 @@ do_install () {
for label in ${LABELS}; do for label in ${LABELS}; do
install -m 0644 "${WORKDIR}/run-mount-${label}.mount" "${D}${systemd_unitdir}/system" install -m 0644 "${WORKDIR}/run-mount-${label}.mount" "${D}${systemd_unitdir}/system"
done done
install -m 0644 "${WORKDIR}/home.mount" "${D}${systemd_unitdir}/system"
install -D "${WORKDIR}/oniro-homes.conf.tmpfiles" \
"${D}${sysconfdir}/tmpfiles.d/oniro-homes.conf"
} }
FILES:${PN} += "${systemd_unitdir}" FILES:${PN} += "${systemd_unitdir}"
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
[Unit]
Description=home mount - appdata
Before=sysinit.target
Requires=run-mount-appdata.mount
After=run-mount-appdata.mount
[Mount]
What=/run/mount/appdata/user-data/home
Where=/home
Options=bind
[Install]
WantedBy=sysinit.target
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
# The home directory of the oniro user.
d /run/mount/appdata/user-data/home/oniro 0700 oniro oniro - -
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