Apply onlycap feature to mobile and wearable profiles only 52/80752/6 accepted/tizen/common/20160720.173323 accepted/tizen/ivi/20160720.103441 accepted/tizen/mobile/20160720.103354 accepted/tizen/tv/20160720.103407 accepted/tizen/wearable/20160720.103425 submit/tizen/20160720.054228
authorjooseong lee <jooseong.lee@samsung.com>
Wed, 20 Jul 2016 04:39:43 +0000 (13:39 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Wed, 20 Jul 2016 05:38:54 +0000 (22:38 -0700)
Change-Id: I096af17dd1aaf2312cdf18bd4449148aca09bb85
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
CMakeLists.txt
packaging/security-config.spec

index 844a7a0cab005a853920e5dc885ea0e972094eb6..1004dc678582c9ad94ae697f3dd9b1f04e360b1a 100755 (executable)
@@ -14,25 +14,24 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/set_capability DESTINATION /usr/share/s
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/security-config.conf DESTINATION /usr/lib/tmpfiles.d/)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/90_user-content-permissions.post DESTINATION ${SYSCONF_INSTALL_DIR}/gumd/useradd.d)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/91_user-dbspace-permissions.post DESTINATION ${SYSCONF_INSTALL_DIR}/gumd/useradd.d)
+
+IF("${PROFILE}" STREQUAL "mobile" OR "${PROFILE}" STREQUAL "wearable")
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/smack/onlycap DESTINATION /etc/smack)
-IF(NOT "${PROFILE}" STREQUAL "tv")
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/smack/smack_default_labeling DESTINATION /usr/share/security-config)
 ENDIF()
 
-IF("${ARCH}" STREQUAL "arm" OR "${ARCH}" STREQUAL "aarch64")
-    IF("${PROFILE}" STREQUAL "mobile")
-        INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/service_list/target/mobile/service_daemon_list DESTINATION /usr/share/security-config)
-    ELSEIF("${PROFILE}" STREQUAL "wearable")
-        INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/service_list/target/wearable/service_daemon_list DESTINATION /usr/share/security-config)
-    ENDIF()
-ENDIF()
-
 IF("${ARCH}" STREQUAL "i386" OR "${ARCH}" STREQUAL "x86_64")
     IF("${PROFILE}" STREQUAL "mobile")
         INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/service_list/emulator/mobile/service_daemon_list DESTINATION /usr/share/security-config)
     ELSEIF("${PROFILE}" STREQUAL "wearable")
         INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/service_list/emulator/wearable/service_daemon_list DESTINATION /usr/share/security-config)
     ENDIF()
+ELSE("${ARCH}" STREQUAL "i386" OR "${ARCH}" STREQUAL "x86_64")
+    IF("${PROFILE}" STREQUAL "mobile")
+        INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/service_list/target/mobile/service_daemon_list DESTINATION /usr/share/security-config)
+    ELSEIF("${PROFILE}" STREQUAL "wearable")
+        INSTALL(FILES ${CMAKE_SOURCE_DIR}/config/service_list/target/wearable/service_daemon_list DESTINATION /usr/share/security-config)
+    ENDIF()
 ENDIF()
 
 INSTALL(FILES
@@ -42,6 +41,6 @@ INSTALL(FILES
 )
 
 ADD_SUBDIRECTORY(test)
-IF(NOT "${PROFILE}" STREQUAL "tv")
+IF("${PROFILE}" STREQUAL "mobile" OR "${PROFILE}" STREQUAL "wearable")
 ADD_SUBDIRECTORY(systemd)
 ENDIF()
index 8833c0fb6a1036594141b6221b683d379353d07e..85d4132260194600b3b2e6cd50ec2d90032a6168 100755 (executable)
@@ -30,7 +30,7 @@ cp LICENSE %{buildroot}%{_datadir}/license/%{name}
 cp LICENSE %{buildroot}%{_datadir}/license/security-config
 %make_install
 
-%if "%{?profile}" != "tv"
+%if ("%{?profile}" == "mobile" || "%{?profile}" == "wearable")
 mkdir -p %{buildroot}/%{_unitdir}/multi-user.target.wants
 ln -s ../%{name}.service %{buildroot}/%{_unitdir}/multi-user.target.wants/%{name}.service
 %endif
@@ -45,7 +45,6 @@ mkdir -p /usr/share/security-config/log
 %manifest %{_datadir}/%{name}.manifest
 %{_datadir}/license/%{name}
 %defattr(-,root,root,-)
-%attr(644,root,root) /etc/smack/onlycap
 %attr(755,root,root) /usr/share/security-config/group_id_setting
 %attr(755,root,root) /usr/share/security-config/set_label
 %attr(755,root,root) /usr/share/security-config/set_capability
@@ -62,11 +61,10 @@ mkdir -p /usr/share/security-config/log
 %attr(755,root,root) /usr/share/security-config/test/security_mount_option_test/*
 %attr(755,root,root) %{_sysconfdir}/gumd/useradd.d/90_user-content-permissions.post
 %attr(755,root,root) %{_sysconfdir}/gumd/useradd.d/91_user-dbspace-permissions.post
-%if "%{?profile}" != "tv"
+%if ("%{?profile}" == "mobile" || "%{?profile}" == "wearable")
+%attr(755,root,root) /usr/share/security-config/service_daemon_list
 %attr(-,root,root) %{_unitdir}/security-config.service
 %attr(-,root,root) %{_unitdir}/multi-user.target.wants/security-config.service
 %attr(755,root,root) /usr/share/security-config/smack_default_labeling
-%endif
-%if ("%{?profile}" == "mobile" || "%{?profile}" == "wearable") && ("%{?_arch}" == "arm" || "%{?_arch}" == "aarch64" || "%{?_arch}" == "i386" || "%{?_arch}" == "x86_64")
-%attr(755,root,root) /usr/share/security-config/service_daemon_list
+%attr(644,root,root) /etc/smack/onlycap
 %endif