aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-10 13:14:31 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-05-19 10:38:25 +0000
commit3564e1dd729f8044d3d7bbb8f025e893da4d5716 (patch)
tree90aadaf81db5ac5f3b5d8ee293b2934b1a0fc192
parent99a568b05d5f9850b79199f7273737a6e565925b (diff)
Make /usr/local compatible with SOTA
This provides a link from /usr/local to ../../var/local that enforces file hierarchy local to the machine to be in a directory frankly separated from /usr. This is important for SOTA/OSTree that must not manage the locally installed files. But this is also important for correctly separating layers of the target. For this reason, the change is not conditionnal to SOTA. Bug-AGL: SPEC-359 Bug-AGL: SPEC-533 Change-Id: I0a709ba15582a011a43f3a3b68d4230bae11b658 Signed-off-by: José Bollo <jose.bollo@iot.bzh> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9071 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: Stéphane Desneux <stephane.desneux@iot.bzh> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
-rw-r--r--meta-app-framework/recipes-core/base-files/base-files_%.bbappend7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta-app-framework/recipes-core/base-files/base-files_%.bbappend b/meta-app-framework/recipes-core/base-files/base-files_%.bbappend
index 7e12bc829..0e93b4d65 100644
--- a/meta-app-framework/recipes-core/base-files/base-files_%.bbappend
+++ b/meta-app-framework/recipes-core/base-files/base-files_%.bbappend
@@ -4,6 +4,13 @@ RDEPENDS_${PN}_append_smack = " smack-userspace"
do_install_append() {
install -d ${D}/${sysconfdir}/skel/app-data
install -d ${D}/${sysconfdir}/skel/.config
+ install -m 0755 -d ${D}/var
+ if [ -d ${D}/usr/local ]; then
+ mv ${D}/usr/local ${D}/var
+ else
+ install -m 0755 -d ${D}/var/local
+ fi
+ ln -s ../../var/local ${D}/usr/local
}
do_install_append_smack () {