Merge remote-tracking branch 'origin/develop' into nr_prs
This commit is contained in:
+6
-46
@@ -1,41 +1,20 @@
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr style="border-collapse: collapse; border: none;">
|
||||
<td style="border-collapse: collapse; border: none;">
|
||||
<a href="http://www.openairinterface.org/">
|
||||
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">The OpenAirInterface repository: the sources</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The OpenAirInterface software can be obtained from our gitLab
|
||||
server. You will need a git client to get the sources. The repository
|
||||
is currently used for main developments.
|
||||
|
||||
# Prerequisites
|
||||
|
||||
You need to install the subversion/git using the following commands:
|
||||
You need to install git using the following commands:
|
||||
|
||||
```shell
|
||||
sudo apt-get update
|
||||
sudo apt-get install subversion git
|
||||
sudo apt-get install git
|
||||
```
|
||||
|
||||
# Using EURECOM Gitlab
|
||||
|
||||
The [openairinterface5g repository](https://gitlab.eurecom.fr/oai/openairinterface5g.git)
|
||||
holds the source code for (eNB RAN + UE RAN).
|
||||
|
||||
For legal issues (licenses), the core network (EPC) source code is now moved away from
|
||||
the above openairinterface5g git repository.
|
||||
|
||||
* A more recent version is available under our GitHub domain:
|
||||
* [OAI GitHub openair-cn domain](https://github.com/OPENAIRINTERFACE)
|
||||
* Check its wiki pages for more details
|
||||
holds the source code for the RAN (4G and 5G).
|
||||
|
||||
Configure git with your name/email address (only important if you are developer and want to contribute/push code to Git Repository):
|
||||
|
||||
@@ -44,18 +23,6 @@ git config --global user.name "Your Name"
|
||||
git config --global user.email "Your email address"
|
||||
```
|
||||
|
||||
- Add a certificate from gitlab.eurecom.fr to your Ubuntu 14.04 installation:
|
||||
|
||||
```shell
|
||||
echo -n | openssl s_client -showcerts -connect gitlab.eurecom.fr:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
|
||||
```
|
||||
|
||||
- Disable certificate check completely if you do not have root access to /etc/ssl directory
|
||||
|
||||
```shell
|
||||
git config --global http.sslverify false
|
||||
```
|
||||
|
||||
## In order to clone the Git repository (for OAI Users without login to gitlab server)
|
||||
|
||||
Cloning RAN repository (eNB RAN + UE RAN):
|
||||
@@ -70,13 +37,6 @@ Please send email to [contact@openairinterface.org](mailto:contact@openairinterf
|
||||
as a developer (only important for users who want to commit code to the repository). If
|
||||
you do not have account on gitlab.eurecom.fr, please register yourself to gitlab.eurecom.fr and provide the identifiant in the email.
|
||||
|
||||
* Clone with using ssh keys:
|
||||
* You will need to put your ssh keys in https://gitlab.eurecom.fr/profile/keys
|
||||
to access to the git repo. Once that is done, clone the git repository using:
|
||||
* `git clone git@gitlab.eurecom.fr:oai/openairinterface5g.git`
|
||||
* Clone with user name/password prompt:
|
||||
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openairinterface5g.git`
|
||||
|
||||
# Which branch to checkout?
|
||||
|
||||
On the RAN side:
|
||||
@@ -84,15 +44,15 @@ On the RAN side:
|
||||
* **master**: This branch is targeted for the user community. Since January 2019, it is also subject to a Continuous Integration process. The update frequency is about once every 2-3 months. We are also performing bug fixes on this branch.
|
||||
* **develop**: This branch contains recent commits that are tested on our CI test bench. The update frequency is about once a week.
|
||||
|
||||
Please see the work flow and policies page :
|
||||
Please see the work flow and policies page:
|
||||
|
||||
https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home
|
||||
|
||||
you can find the latest stable tag release here :
|
||||
you can find the latest stable tag release here:
|
||||
|
||||
https://gitlab.eurecom.fr/oai/openairinterface5g/tags
|
||||
|
||||
The tag naming conventions are :
|
||||
The tag naming conventions are:
|
||||
|
||||
- On `master` branch: **v1.`x`.`y`** where
|
||||
* `x` is the minor release number, incremented every 2-3 months when we are merging `develop` into `master` branch.
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format our code.
|
||||
|
||||
# Integration into editors
|
||||
|
||||
Integration into various editors (`vim`, `emacs`, `VSCode`, `CLion`) is on the
|
||||
[clang-format project page](https://clang.llvm.org/docs/ClangFormat.html).
|
||||
|
||||
There is also an [eclipse plugin](https://github.com/wangzw/CppStyle).
|
||||
|
||||
# Integration into git
|
||||
|
||||
## Short version
|
||||
|
||||
See below for a more detailed explanation. In short: Add this to `~/.gitconfig`:
|
||||
```
|
||||
[clangFormat]
|
||||
binary = clang-format-12
|
||||
style = file
|
||||
```
|
||||
Now stage files for reformatting, then run `git clang-format`. It will reformat
|
||||
only the code that is staged, and you can view reformatted code with `git
|
||||
diff`. To add modified lines to your commit, stage them as well, then commit.
|
||||
|
||||
There is also a pre-commit hook that you can install. To install it, copy it
|
||||
`pre-commit-clang` to `.git/hooks/pre-commit`, and make it executable.
|
||||
|
||||
## Long version
|
||||
|
||||
In order to integrate `clang-format` into `git`, follow these steps:
|
||||
|
||||
1) Copy `pre-commit-clang` to `.git/hooks/pre-commit` and make it executable.
|
||||
|
||||
2) Install clang-format-12 (needs at least Ubuntu 20, remove anything else)
|
||||
```bash
|
||||
$ sudo apt-get remove clang-format*
|
||||
$ sudo apt-get install clang-format-12
|
||||
```
|
||||
|
||||
3) Configure `git` (set correct executable, set mode, provide more convenient alias)
|
||||
```bash
|
||||
$ git config --global clangFormat.binary clang-format-12
|
||||
$ git config --global clangFormat.style file
|
||||
$ git config --global alias.clang-format clang-format-12
|
||||
```
|
||||
|
||||
When this is done, you are set up. How to use:
|
||||
|
||||
4) When committing new code, add the code to commit into the staging (`git add
|
||||
-p` or `git add <file>`) _and stash the rest_ (e.g., `git stash -p`, this is
|
||||
quite important or reformatting might not work properly, or you don't know
|
||||
what has been reformatted)
|
||||
|
||||
5) Run git clang-format. The staged code will be reformatted. After this, you
|
||||
still have your changes in the staging area, and the formatted code appears
|
||||
as additional modification. Thus, your changes can be seen with
|
||||
```bash
|
||||
$ git diff --staged
|
||||
```
|
||||
while the modifications of clang-format with
|
||||
```bash
|
||||
$ git diff
|
||||
```
|
||||
So now, you can add all or parts of reformatted code to the staging area
|
||||
|
||||
6) Commit. It won't work if code is not properly formatted due to the
|
||||
pre-commit hook. Force committing with `git commit --no-verify`
|
||||
Reference in New Issue
Block a user