From: Sangjung Woo Date: Sat, 20 Aug 2022 05:26:57 +0000 (+0900) Subject: [ML Agent] Enable PIE option for Tizen security check X-Git-Tag: accepted/tizen/unified/20220825.053102~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4331d23c7cf11f5899beead96527c934a87b64e9;p=platform%2Fcore%2Fapi%2Fmachine-learning.git [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 --- 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