summaryrefslogtreecommitdiffstats
path: root/DEVELOP.md
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-03-07 03:32:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-07 03:32:22 +0000
commit81823d969708d7ad89ecc3c885cbed858c04b694 (patch)
tree05cb6cfa6250ba05f5744248bb6a02ed85a4cf59 /DEVELOP.md
parentfb50b97e6ecf15320b3a32d36d418e06e76a7099 (diff)
parentaa0724200ae8d7ed532a313f5c3e45c7f99e64ea (diff)
Merge "Add `subrepo` basic usage in developer guide."
Diffstat (limited to 'DEVELOP.md')
-rw-r--r--DEVELOP.md57
1 files changed, 57 insertions, 0 deletions
diff --git a/DEVELOP.md b/DEVELOP.md
index bdb8aa66..8e9545e6 100644
--- a/DEVELOP.md
+++ b/DEVELOP.md
@@ -46,6 +46,63 @@ It is for macOS uses TLS instead of OpenSSL and no header files supported. The s
# export LDFLAGS='-L $openssl_install_path/lib'
```
+### Third Party Code
+
+QTIP includes a few third party code via [subrepo](https://github.com/ingydotnet/git-subrepo).
+All third party code are stored in `/third-party`.
+
+To pull the changes from remote repository, use
+
+```
+git subrepo pull third-party/<subdir>
+```
+
+It will create a new commit in parent repo, i.e. `qtip`. However, the
+auto generated commit message does not include mandatory tags such as
+`Change-Id` required by gerrit. You need to manually amend the commit to
+append those.
+
+```
+git commit --amend -s
+```
+
+Example of final commit message
+
+```
+Include third party script for license checking and amending
+The following commit message are generated automatically by git-subrepo
+-----------------------------------------------------------------------------
+git subrepo clone git@github.com:openzero-zte/License.git third-party/License
+
+subrepo:
+ subdir: "third-party/License"
+ merged: "61489da"
+upstream:
+ origin: "git@github.com:openzero-zte/License.git"
+ branch: "master"
+ commit: "61489da"
+git-subrepo:
+ version: "0.3.0"
+ origin: "https://github.com/ingydotnet/git-subrepo"
+ commit: "988f8c8"
+-----------------------------------------------------------------------------
+Change-Id: I8eab86a8ce3f26995af3e3535f31f361b4826a8b
+Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
+```
+
+Sometimes you may modify the third-party code to adapt it in `qtip`.
+To push the changes to remote repository, run
+
+```
+git subrepo push third-party/<subdir>
+```
+
+If you want to include a new repository of third party code. Use
+
+```
+git subrepo clone <remote-url> [<subdir>]
+```
+
## Architecture
**TODO**: move to design spec