Use RS7-STAR's TensorFlow again (#1235)
author서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com>
Wed, 16 May 2018 08:13:04 +0000 (17:13 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 16 May 2018 08:13:04 +0000 (17:13 +0900)
* Revert "Remove scripts/command/change_gitmodule.sh (#1085)"

For issue #1233

This reverts commit edc95922795cb73dd4fed6ab3783fb959e58a809.

Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
* Use again RS7-STAR's TensorFlow

For issue #1233

This patch changes tensorflow's git url to RS7-STAR's, since we will
work on modification of tensorflow lite there.

Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
.gitmodules
externals/tensorflow
scripts/command/change_gitmodule.sh [new file with mode: 0755]
scripts/command/docker_build_cross_arm_ubuntu.sh
scripts/command/docker_build_cross_arm_ubuntu_without_aclbuild.sh
scripts/command/docker_build_ubuntu_svace.sh
scripts/command/docker_cross_test_coverage_build.sh
scripts/command/docker_run_test.sh

index 33861b5..81043d3 100644 (file)
@@ -1,7 +1,7 @@
 [submodule "tensorflow"]
        path = externals/tensorflow
-       url = git://git.tizen.org/platform/upstream/tensorflow
-       branch = tizen
+       url = git@github.sec.samsung.net:RS7-STAR/Tensorflow.git
+       branch = nnfw
 [submodule "acl"]
        path = externals/acl
        url = git://git.tizen.org/platform/upstream/armcl
index 1b0a020..5781158 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1b0a0203bb23f15c42fa66ea9f9001041465e658
+Subproject commit 5781158a98bb0b134b19242f19d36a0e5cfa844c
diff --git a/scripts/command/change_gitmodule.sh b/scripts/command/change_gitmodule.sh
new file mode 100755 (executable)
index 0000000..8e16ac8
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Background for this hack
+#
+# To fetch submodule repositories from github.sec.samsung.net, we must
+# authenticate the user, who is fetching the source tree, regardless of
+# communication protocol (e.g., ssh, https).  Note that the policy of Samsung's
+# internal github does not allow to access the repository without
+# authentication.  Because of this, the replacement below is a workaround to
+# pass the login information of our CI account, git-bot-sec, using an API token.
+# Since the URL in .gitmodules is written with `git@` that requires ssh key
+# authentication and we don't really want to put git-bot-sec's ssh private key
+# somewhere, we decided to use a token-based authentication method.
+
+SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+HOST_HOME=$SCRIPT_ROOT/../..
+
+USERNAME=git-bot-sec
+TOKEN=acb137d756874f7c7746a95e31ebb3994f1c4505
+
+sed -i "s/git@github.sec.samsung.net:/https:\/\/$USERNAME:$TOKEN@github.sec.samsung.net\//" $HOST_HOME/.gitmodules
index 1f04aa6..5dba0c8 100755 (executable)
@@ -15,6 +15,10 @@ DOCKER_ENV_VARS+=" -e CROSS_BUILD=1"
 DOCKER_RUN_OPTS="--rm"
 DOCKER_RUN_OPTS+=" -w $DOCKER_HOME"
 
+# Change .gitmodules to work around the permission issue
+CMD_SUBMODULE="./scripts/command/change_gitmodule.sh"
+docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME sh -c "$CMD_SUBMODULE"
+
 if [ -n "$DOCKER_INTERACTIVE" ]; then
   DOCKER_RUN_OPTS+=" -it"
   CMD="/bin/bash"
index 4ecbe4d..92f6ff4 100755 (executable)
@@ -32,6 +32,10 @@ fi
 DOCKER_VOLUMES+=" -v $ROOTFS_DIR:/opt/rootfs"
 DOCKER_VOLUMES+=" -v $ARMCL_DIR:/opt/libarmcl"
 
+# Change .gitmodules to work around the permission issue
+CMD_SUBMODULE="./scripts/command/change_gitmodule.sh"
+docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME sh -c "$CMD_SUBMODULE"
+
 if [ -n "$DOCKER_INTERACTIVE" ]; then
   DOCKER_RUN_OPTS+=" -it"
   CMD="/bin/bash"
index 24877a9..825994a 100755 (executable)
@@ -54,6 +54,10 @@ DOCKER_VOLUMES+=" -v $SVACE_ANALYZER_DIR:/opt/svace-analyzer"
 DOCKER_VOLUMES+=" -v $ROOTFS_DIR:/opt/rootfs"
 DOCKER_VOLUMES+=" -v $ARMCL_DIR:/opt/libarmcl"
 
+# Change .gitmodules to work around the permission issue
+CMD_SUBMODULE="./scripts/command/change_gitmodule.sh"
+docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME sh -c "$CMD_SUBMODULE"
+
 if [ -n "$DOCKER_INTERACTIVE" ]; then
   DOCKER_RUN_OPTS+=" -it"
   CMD="/bin/bash"
index 94e800d..0afba33 100755 (executable)
@@ -33,6 +33,10 @@ fi
 DOCKER_VOLUMES+=" -v $ROOTFS_DIR:/opt/rootfs"
 DOCKER_VOLUMES+=" -v $ARMCL_DIR:/opt/libarmcl"
 
+# Change .gitmodules to work around the permission issue
+CMD_SUBMODULE="./scripts/command/change_gitmodule.sh"
+docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME sh -c "$CMD_SUBMODULE"
+
 if [ -n "$DOCKER_INTERACTIVE" ]; then
   DOCKER_RUN_OPTS+=" -it"
   CMD="/bin/bash"
index f6605b1..a30e8cc 100755 (executable)
@@ -20,6 +20,10 @@ if [ "$DOCKER_INTERACTIVE" ]; then
     CMD="/bin/bash"
 fi
 
+# Change .gitmodules to work around the permission issue
+CMD_SUBMODULE="./scripts/command/change_gitmodule.sh"
+docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME $CMD_SUBMODULE
+
 docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME $CMD
 
 BUILD_RESULT=$?