Add number to upgrade scripts 44/102244/2
authorsangwan.kwon <sangwan.kwon@samsung.com>
Mon, 5 Dec 2016 08:30:58 +0000 (17:30 +0900)
committersangwan.kwon <sangwan.kwon@samsung.com>
Mon, 5 Dec 2016 08:43:47 +0000 (17:43 +0900)
Change-Id: I73b0d4b5bf40abcc3f0b9623f1809d5907b82c06
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
packaging/ca-certificates.spec
scripts/200.ca-certificates-certs-upgrade.sh.in [new file with mode: 0644]
scripts/201.ca-certificates-bundle-upgrade.sh.in [new file with mode: 0644]
scripts/CMakeLists.txt
scripts/ca-certificates-bundle-upgrade.sh.in [deleted file]
scripts/ca-certificates-certs-upgrade.sh.in [deleted file]

index 5b3c9e198a3cdbf526277651f3221eefa0318125..54c18e43a2969b1945844fc3e5af39e79f7c1935 100644 (file)
@@ -129,8 +129,8 @@ cp %{buildroot}%{ca_bundle} %{buildroot}%{upgrade_data_dir}
 # symbol CA bundle
 %{ro_ca_bundle}
 # support for platform upgrade (Tizen 2.4 -> 3.0)
-%attr(755, root, root) %{upgrade_script_dir}/ca-certificates-certs-upgrade.sh
-%attr(755, root, root) %{upgrade_script_dir}/ca-certificates-bundle-upgrade.sh
+%attr(755, root, root) %{upgrade_script_dir}/200.ca-certificates-certs-upgrade.sh
+%attr(755, root, root) %{upgrade_script_dir}/201.ca-certificates-bundle-upgrade.sh
 %attr(664, root, %{group_name}) %{upgrade_data_dir}/ca-bundle.pem
 
 %files devel
diff --git a/scripts/200.ca-certificates-certs-upgrade.sh.in b/scripts/200.ca-certificates-certs-upgrade.sh.in
new file mode 100644 (file)
index 0000000..040c662
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file        200.ca-certificates-certs-upgrade.sh.in
+# @author      Sangwan Kwon (sangwan.kwon@samsung.com)
+# @brief       Certificates migration scripts for platform upgrade 2.4 -> 3.0
+#
+
+# delete old certificates
+rm -rf @TZ_SYS_CA_CERTS@/*
+
+# make link files : for new certificates in RW area
+ln -sf @TZ_SYS_RO_CA_CERTS_ORIG@/* @TZ_SYS_CA_CERTS@/
+
+# change smack rule
+chsmack -a @SMACK_DOMAIN_NAME@ @TZ_SYS_CA_CERTS@
+
+# change DAC
+chown -h -R @USER_NAME@:@GROUP_NAME@ @TZ_SYS_CA_CERTS@
+
+# change mode
+chmod 775 @TZ_SYS_CA_CERTS@
diff --git a/scripts/201.ca-certificates-bundle-upgrade.sh.in b/scripts/201.ca-certificates-bundle-upgrade.sh.in
new file mode 100644 (file)
index 0000000..edb2db2
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file        201.ca-certificates-bundle-upgrade.sh.in
+# @author      Sangwan Kwon (sangwan.kwon@samsung.com)
+# @brief       CA bundle migration scripts for platform upgrade 2.4 -> 3.0
+#
+
+# delete old ca bundle
+rm -rf @OLD_CA_BUNDLE_DIR@
+
+# upgrade bundle file
+mkdir -p @TZ_SYS_CA_BUNDLE_DIR@
+cp @UPGRADE_DATA_DIR@/ca-bundle.pem @TZ_SYS_CA_BUNDLE_DIR@
+
+# change permission
+chsmack -a @SMACK_DOMAIN_NAME@ @TZ_SYS_CA_BUNDLE@
+chown root:@GROUP_NAME@ @TZ_SYS_CA_BUNDLE@
+chmod 664 @TZ_SYS_CA_BUNDLE@
index 8138e0b2a18025e5fd16e7b8d12c94be33bdfcc2..4b88fd2942c93b75f0e2a7ba914bf552bab913a9 100755 (executable)
 #
 
 CONFIGURE_FILE(
-       ca-certificates-certs-upgrade.sh.in ca-certificates-certs-upgrade.sh
+       200.ca-certificates-certs-upgrade.sh.in
+       200.ca-certificates-certs-upgrade.sh
        @ONLY)
 CONFIGURE_FILE(
-       ca-certificates-bundle-upgrade.sh.in ca-certificates-bundle-upgrade.sh
+       201.ca-certificates-bundle-upgrade.sh.in
+       201.ca-certificates-bundle-upgrade.sh
        @ONLY)
 
 INSTALL(FILES
-       ca-certificates-certs-upgrade.sh
-       ca-certificates-bundle-upgrade.sh
+       200.ca-certificates-certs-upgrade.sh
+       201.ca-certificates-bundle-upgrade.sh
        DESTINATION ${UPGRADE_SCRIPT_DIR})
diff --git a/scripts/ca-certificates-bundle-upgrade.sh.in b/scripts/ca-certificates-bundle-upgrade.sh.in
deleted file mode 100644 (file)
index 588cf63..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-# @file        ca-certificates-bundle-upgrade.sh.in
-# @author      Sangwan Kwon (sangwan.kwon@samsung.com)
-# @brief       CA bundle migration scripts for platform upgrade 2.4 -> 3.0
-#
-
-# delete old ca bundle
-rm -rf @OLD_CA_BUNDLE_DIR@
-
-# upgrade bundle file
-mkdir -p @TZ_SYS_CA_BUNDLE_DIR@
-cp @UPGRADE_DATA_DIR@/ca-bundle.pem @TZ_SYS_CA_BUNDLE_DIR@
-
-# change permission
-chsmack -a @SMACK_DOMAIN_NAME@ @TZ_SYS_CA_BUNDLE@
-chown root:@GROUP_NAME@ @TZ_SYS_CA_BUNDLE@
-chmod 664 @TZ_SYS_CA_BUNDLE@
diff --git a/scripts/ca-certificates-certs-upgrade.sh.in b/scripts/ca-certificates-certs-upgrade.sh.in
deleted file mode 100644 (file)
index 4500975..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-# @file        ca-certificates-certs-upgrade.sh.in
-# @author      Sangwan Kwon (sangwan.kwon@samsung.com)
-# @brief       Certificates migration scripts for platform upgrade 2.4 -> 3.0
-#
-
-# delete old certificates
-rm -rf @TZ_SYS_CA_CERTS@/*
-
-# make link files : for new certificates in RW area
-ln -sf @TZ_SYS_RO_CA_CERTS_ORIG@/* @TZ_SYS_CA_CERTS@/
-
-# change smack rule
-chsmack -a @SMACK_DOMAIN_NAME@ @TZ_SYS_CA_CERTS@
-
-# change DAC
-chown -h -R @USER_NAME@:@GROUP_NAME@ @TZ_SYS_CA_CERTS@
-
-# change mode
-chmod 775 @TZ_SYS_CA_CERTS@