From 4331d23c7cf11f5899beead96527c934a87b64e9 Mon Sep 17 00:00:00 2001 From: Sangjung Woo Date: Sat, 20 Aug 2022 14:26:57 +0900 Subject: [PATCH] [ML Agent] Enable PIE option for Tizen security check This patch enables the PIE (Position Independent Executable) option to comply with Tizen security. If this option is not enabled, the daemon file will be lost its executable permission when making platform image. Signed-off-by: Sangjung Woo --- daemon/meson.build | 4 ++-- packaging/machine-learning-api.spec | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/meson.build b/daemon/meson.build index baa7a0d..63c3f1f 100644 --- a/daemon/meson.build +++ b/daemon/meson.build @@ -64,8 +64,8 @@ if get_option('enable-machine-learning-agent') include_directories: nns_ml_agent_incs, install: true, install_dir: api_install_bindir, - cpp_args : '-DDB_PATH="' + serviceDBPath + '"' - + cpp_args : '-DDB_PATH="' + serviceDBPath + '"', + pie : true ) # For unit test diff --git a/packaging/machine-learning-api.spec b/packaging/machine-learning-api.spec index 01edb71..e8f3c73 100644 --- a/packaging/machine-learning-api.spec +++ b/packaging/machine-learning-api.spec @@ -464,9 +464,9 @@ cp -r result %{buildroot}%{_datadir}/ml-api/unittest/ %if 0%{?enable_machine_learning_agent} %files -n machine-learning-agent %manifest machine-learning-agent.manifest -%{_bindir}/machine-learning-agent -%{_unitdir}/machine-learning-agent.service -%config %{_sysconfdir}/dbus-1/system.d/machine-learning-agent.conf +%attr(0755,root,root) %{_bindir}/machine-learning-agent +%attr(0644,root,root) %{_unitdir}/machine-learning-agent.service +%attr(0644,root,root) %config %{_sysconfdir}/dbus-1/system.d/machine-learning-agent.conf %attr(0644,root,root) %{_datadir}/dbus-1/system-services/org.tizen.machinelearning.service.service %endif -- 2.7.4