Skip to content
Snippets Groups Projects
Commit 71535e7d authored by Thierry Escande's avatar Thierry Escande
Browse files

openharmony-standard-3.0: Fix profiles and default dirs in safwk


With having /system/profile a symlink to /usr/lib/openharmony/profile
and similar for /system/usr, safwk are not working, as it is using
realpath(3) on the files before comparing against dir prefix. To avoid
that, we simply change dir prefix to the resolved path.

Signed-off-by: default avatarEsben Haabendal <esben.haabendal@huawei.com>
Signed-off-by: default avatarThierry Escande <thierry.escande@huawei.com>
parent abe18242
No related branches found
No related tags found
1 merge request!70Add systemd units for OpenHarmony 3.0
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
With having /system/profile a symlink to /usr/lib/openharmony/profile and
similar for /system/usr, safwk are not working, as it is using realpath(3) on
the files before comparing against dir prefix. To avoid that, we simply change
dir prefix to the resolved path.
Apply to foundation/distributedschedule/safwk repository
Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
Upstream-Status: Inappropriate [configuration/integration]
diff --git a/services/safwk/src/local_ability_manager.cpp b/services/safwk/src/local_ability_manager.cpp
index 5e29f32..809caab 100755
--- a/services/safwk/src/local_ability_manager.cpp
+++ b/services/safwk/src/local_ability_manager.cpp
@@ -48,8 +48,8 @@ const u16string BOOT_START_PHASE = u"BootStartPhase";
const u16string CORE_START_PHASE = u"CoreStartPhase";
constexpr int32_t MAX_SA_STARTUP_TIME = 100;
-const string PROFILES_DIR = "/system/profile/";
-const string DEFAULT_DIR = "/system/usr/";
+const string PROFILES_DIR = "/usr/lib/openharmony/profile/";
+const string DEFAULT_DIR = "/usr/lib/openharmony/usr/";
enum {
BOOT_START = 1,
...@@ -64,6 +64,9 @@ SRC_URI += "file://test_xts_acts-Align-tests-list-with-mandatory-set.patch;patch ...@@ -64,6 +64,9 @@ SRC_URI += "file://test_xts_acts-Align-tests-list-with-mandatory-set.patch;patch
SRC_URI += "file://param_service_standalone.patch;patchdir=${S}/base/startup/init_lite" SRC_URI += "file://param_service_standalone.patch;patchdir=${S}/base/startup/init_lite"
SRC_URI += "file://param_service-Add-to-startup-l2-part.patch;patchdir=${S}/base/startup/appspawn_standard" SRC_URI += "file://param_service-Add-to-startup-l2-part.patch;patchdir=${S}/base/startup/appspawn_standard"
# Patch to allow /system/profile and /system/usr to be symlinks to /usr/lib/openharmony
SRC_URI += "file://foundation_distributedschedule_safwk-slash-system-symlink.patch;patchdir=${S}/foundation/distributedschedule/safwk"
inherit python3native gn_base ptest inherit python3native gn_base ptest
B = "${S}/out/ohos-arm-release" B = "${S}/out/ohos-arm-release"
......
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