[Updating] Adding to modify model-config file. 23/144823/1 accepted/tizen/unified/20170818.155136 submit/tizen/20170818.081859
authorwchang kim <wchang.kim@samsung.com>
Fri, 18 Aug 2017 05:51:55 +0000 (14:51 +0900)
committerwchang kim <wchang.kim@samsung.com>
Fri, 18 Aug 2017 05:51:55 +0000 (14:51 +0900)
permitted to use posttrans.
Added some model-config keys.

Change-Id: I605dda647c20c456342d8ce6bae6bdc24fe6cd0d

packaging/building-blocks.spec
packaging/platform-preset-boards.inc
rule_checker.py

index 8b82bcaa629e471c2a93d8e54324f78cd71f1e6e..6cec9a70ddb0929e0781d2d188e0f9c8b7d0e1ca 100644 (file)
@@ -3,7 +3,7 @@
 %define debug_package %{nil}
 
 Name:          building-blocks
-Version:       0.0.1
+Version:       0.0.2
 Release:       0
 License:       Apache-2.0
 Summary:       The Root of All Tizen Meta Packages (building blocks)
index 316379748542c2da38f53830534990961502307c..2d22fb95d2d27c82c45147c09b6a72a7922f44cd 100644 (file)
@@ -67,6 +67,17 @@ Conflicts:   %{name}-sub1-Preset_boards-ARTIK_fullBSP
 %description sub1-Preset_boards-RPI3
 Firstly select HALs and Feature to add to your image.
 %files sub1-Preset_boards-RPI3
+%posttrans sub1-Preset_boards-RPI3
+sed -i 's#\(\"tizen.org/system/platform.processor\".\+>\).\+\(</key>\)#\1BCM2837\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/system/platform.communication_processor\".\+>\).\+\(</key>\)#\1none\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.arch\".\+>\).\+\(</key>\)#\1armv8\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.arch.armv7\".\+>\).\+\(</key>\)#\1false\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.arch.armv8\".\+>\).\+\(</key>\)#\1true\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.frequency\".\+>\).\+\(</key>\)#\11200\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.fpu.arch\".\+>\).\+\(</key>\)#\1vfpv4\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.fpu.arch.vfpv3\".\+>\).\+\(</key>\)#\1false\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.fpu.arch.vfpv4\".\+>\).\+\(</key>\)#\1true\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/profile\".\+>\).\+\(</key>\)#\1common\2#' %{_sysconfdir}/config/model-config.xml
 
 
 ### RPI3-System ###
@@ -74,7 +85,7 @@ Firstly select HALs and Feature to add to your image.
 Summary:       System
 Requires:      system-plugin-headless
 Requires:      system-plugin-iot
-Requires:      model-config-rpi3-profile_common_iot_core
+Requires:      model-config-default
 
 %description sub2-Preset_boards-RPI3-System
 Packages for System HAL and Feature. They are mandatory.
@@ -288,7 +299,17 @@ Conflicts: %{name}-sub1-Preset_boards-ARTIK_fullBSP
 %description sub1-Preset_boards-TM1
 Firstly select HALs and Feature to add to your image.
 %files sub1-Preset_boards-TM1
-
+%posttrans sub1-Preset_boards-TM1
+sed -i 's#\(\"tizen.org/system/platform.processor\".\+>\).\+\(</key>\)#\1SC7727S\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/system/platform.communication_processor\".\+>\).\+\(</key>\)#\1SC7727S\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.arch\".\+>\).\+\(</key>\)#\1armv7\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.arch.armv7\".\+>\).\+\(</key>\)#\1true\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.arch.armv8\".\+>\).\+\(</key>\)#\1false\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.cpu.frequency\".\+>\).\+\(</key>\)#\11300\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.fpu.arch\".\+>\).\+\(</key>\)#\1vfpv3\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.fpu.arch.vfpv3\".\+>\).\+\(</key>\)#\1true\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/platform.core.fpu.arch.vfpv4\".\+>\).\+\(</key>\)#\1false\2#' %{_sysconfdir}/config/model-config.xml
+sed -i 's#\(\"tizen.org/feature/profile\".\+>\).\+\(</key>\)#\1mobile\2#' %{_sysconfdir}/config/model-config.xml
 
 ### TM1-System ###
 %package sub2-Preset_boards-TM1-System
index 459e32b2fbbb1162dee0f577c368b567c39e3f34..8658c3d0a0dbf12a980bbe81dec901f1a94ab119 100755 (executable)
@@ -399,7 +399,7 @@ def ruleCheckInc(file):
                 continue
 
         # Check for not allowed sections
-        if re.search(r'^\s*(%post)|(%pre)|(%build)|(%clean)|(%install)', line):
+        if re.search(r'^\s*(%post(?!trans))|(%pre)|(%build)|(%clean)|(%install)', line):
             error += 1
             print(
                 "ERROR: It is not allowed to add such sections in each domain.")