Skip to content

Commit

Permalink
Merge branch 'master' into docs_update
Browse files Browse the repository at this point in the history
  • Loading branch information
boyvinall authored Jan 17, 2017
2 parents 5fb3f5f + 8befe81 commit a7125e2
Show file tree
Hide file tree
Showing 355 changed files with 5,458 additions and 4,216 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{c,h}]
indent_size = 4

[{Makefile,Dockerfile*}]
indent_style = tab
indent_size = 4
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ staging/
*.a
*.swp
*.so
*.orig
*.rej
awa_clientd
awa_serverd
awa_bootstrapd
Expand All @@ -17,6 +19,7 @@ valgrind/
build/
build.openwrt/
.build_x86
*.cmake

# Eclipse
.project
Expand All @@ -27,6 +30,9 @@ build.openwrt/
.pydevproject
.python-version

# VSCode
.vscode/*

# log files
daemon.log
awa_clientd.log
Expand Down
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"commands-show-output": false,
"ol-prefix": false,
"no-bare-urls": false,
"fenced-code-language": false,
"first-line-h1": false,
"no-hard-tabs": false,
"line-length": false
}
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
- virtualenv --system-site-packages venv
- source venv/bin/activate
- pip install nose
- pip install lxml
- pip install -r ci/requirements.txt

# Travis-CI does not support IPv6 addresses:
script: make tests TEST_FILTER=*.*:-*.*_handles_IPv6_address*
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ option (WITH_ERBIUM "Enable Erbium CoAP support)" ON)
option (WITH_GNUTLS "Enable GnuTLS DTLS support" OFF)
option (WITH_CYASSL "Enable CyaSSL DTLS support" OFF)
option (WITH_TINYDTLS "Enable TinyDTLS DTLS support" OFF)
option (WITH_MBEDTLS "Enable mbedTLS DTLS support" OFF)
option (WITH_SYSTEMD "Install systemd service files" OFF)


if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif(NOT CMAKE_BUILD_TYPE)

if (WITH_LIBCOAP)
message (WARNING "Disabling erbium support")
set (WITH_ERBIUM OFF)
Expand Down Expand Up @@ -49,7 +56,7 @@ if (RUN_TESTS)
set (BUILD_TESTS ON)
endif ()

if (CMAKE_CROSSCOMPILING)
if ((CMAKE_CROSSCOMPILING) OR (CMAKE_BUILD_TYPE STREQUAL "Release"))
set (BUILD_TESTS OFF)
set (RUN_TESTS OFF)
set (ENABLE_GCOV OFF)
Expand All @@ -59,10 +66,11 @@ endif ()
#execute_process (COMMAND git describe --abbrev=4 --dirty --always --tags OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
file (STRINGS "VERSION" VERSION)

set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
# enable debugging info for all components
# TODO: separate debug and release builds
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
add_compile_options (-g)
add_compile_options (-g)
endif ()

# build libraries
add_subdirectory (lib)
Expand Down
134 changes: 62 additions & 72 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@

![](doc/images/img.png)

----

# Awa LightweightM2M contributor guide.

# Awa LightweightM2M contributor guide

## Reporting issues and bugs.
## Reporting issues and bugs

If you discover a bug, or find an issue or area that you feel needs improvement:

* Navigate to the "Issues" tab on the project Github page https://github.com/FlowM2M/AwaLWM2M/issues
* Click the "New Issue" button.

* Navigate to the "Issues" tab on the project Github page https://github.com/FlowM2M/AwaLWM2M/issues
* Click the "New Issue" button.

When making your report, be as clear and concise as possible. Use the following list as a guide:

* Describe the issue, and why you believe it's a problem.
* Include the Awa LightweightM2M version or commit id.
* Describe environment details (OS/distribution etc).
* State how often the issue has occurred.
* Describe the steps to take to uncover or reproduce the issue (if any).
* Expected behaviour.
* Actual behaviour.
* Any additional infomation, log output etc.

* Describe the issue, and why you believe it's a problem.
* Include the Awa LightweightM2M version or commit id.
* Describe environment details (OS/distribution etc).
* State how often the issue has occurred.
* Describe the steps to take to uncover or reproduce the issue (if any).
* Expected behaviour.
* Actual behaviour.
* Any additional infomation, log output etc.

----

## Developer submissions

## Developer submissions.

### Create a Github account.
### Create a Github account

Before you can contribute you require a Github account.

You can sign up for a free account here: [https://github.com/](https://github.com/)

### Add your ssh key to your Github account.
### Add your ssh key to your Github account

If you are using a Linux development environment, you can normally find your public key in *~/.ssh/id_rsa.pub*. Alternatively you can generate a new key with the following command:
If you are using a Linux development environment, you can normally find your public key in *~/.ssh/id_rsa.pub*.
Alternatively you can generate a new key with the following command:

```
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Expand All @@ -48,12 +44,14 @@ ssh-keygen -t rsa -b 4096 -C "[email protected]"
When you're prompted to enter a file in which to save the key, press Enter to accept the default file location.
Now that you have a key:
* Sign in to your Github account
* Click the top right icon
* Click the top right icon
* Select *settings -> ssh keys -> new ssh key*
* Paste the contents of your public key into the box.
Your public key should look something like:
```
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDOvXIAom7iVB/JmNFZrDNZVz+ta6vZoAvoyzjAR53
LwFyA82TDK4RkosKZHgEU/KT+AXYZ9983uVvzS/O7rxa1YxiL21ckw8Ymm4qRxjMP6Bvw8vsGXlLfq7
Expand All @@ -65,12 +63,11 @@ gqnvYg+PkS4+sCyLE0qfMx301r9E6pSTj0SIsBz0PUHFhNUx3grg4eJ1FH8Zu9+JYaFjZeNEFSypxaS
Z7J6coWx8hfBG6bpdnFsuL8JJHKwzlU2OdUJ78uLGgl190OYOEsIz5k3yK49nTyky4sOGmJsmds+fqR
rbURhDGu/tLAAK/6np3fai5ef4beZDbdhXrWS+rjOKSU0lRifUXU/JJFicG2PiX2B1InuqGLwGwAp/3
xoHqsuyNhTw== [email protected]

```
### Set your git user name.
### Set your git user name
It is important that you set the user name and email address to use for any commits to the
It is important that you set the user name and email address to use for any commits to the
git repository:
```
Expand All @@ -80,20 +77,20 @@ $ git config --global user.email [email protected]
Use the same email address that you used to sign up for your github account.
### Forking the repository.
### Forking the repository
If you want to contribute to the project the best practice is to create a fork. To do so
navigate to *https://github.com/FlowM2M/AwaLWM2M* and click on the *fork* button at the top right of the
navigate to *https://github.com/FlowM2M/AwaLWM2M* and click on the *fork* button at the top right of the
screen. If you are a member of multiple organisations you will be presented with a selection screen
which can be used to select where to create the fork. Click on your user account to create the fork.
You can now clone your fork:
You can now clone your fork:
```
$ git clone [email protected]:<username>/AwaLWM2M.git
```
### Keeping your fork in sync.
### Keeping your fork in sync
In order to easily pull down upstream changes to your fork you need to setup a new remote.
Expand All @@ -114,38 +111,40 @@ $ git checkout master
$ git merge upstream/master
```
### Making changes.
### Making changes
The simplest way of working is to keep a clean master branch in the new fork and to create branches for each new pull request. This prevents merge conflicts with the upstream
master branch, and allows you to make changes to your pull request if required.
The simplest way of working is to keep a clean master branch in the new fork and to create branches for each new pull
request. This prevents merge conflicts with the upstream master branch, and allows you to make changes to your pull
request if required.
To create a new branch:
```
$ git checkout master -b dev-branch1 --track
```
**Note.** *The branch name here is important. It will show up in the git history so use something meaningful or suitably general*
**Note.** *The branch name here is important. It will show up in the git history so
use something meaningful or suitably general*
Once you have created your branch make your changes, then commit them to your new branch.
### Coding style.
### Coding style
The Awa LightweightM2M coding style guidelines can be found in the [coding style guide](doc/coding_style.md).
### Commit messages.
### Commit messages
For the commit message, the following rules apply:
* The first line should be a brief summary of the patch.
* Leave a blank line after the summary.
* Provide a detailed description of the change.
* Leave a blank line after the description.
* If the patch relates to an issue, add a line with 'Ref: ISSUE_ID'.
* Add a Gerrit 'Change-id' line.
* Add a Git 'Signed-off-by' line using ````git commit -s```` or ````git commit --sign-off```` (see *Signing your work* below).
* The first line should be a brief summary of the patch.
* Leave a blank line after the summary.
* Provide a detailed description of the change.
* Leave a blank line after the description.
* If the patch relates to an issue, add a line with 'Ref: ISSUE_ID'.
* Add a Gerrit 'Change-id' line.
* Add a Git 'Signed-off-by' line using ````git commit -s```` or ````git commit --sign-off```` (see *Signing your work* below).
Example:
Example:
````
Expand All @@ -162,19 +161,15 @@ For the commit message, the following rules apply:
````
### Signing your work
Awa LightweightM2M requires contributors to accept the Developer Certificate of Origin (DCO) from [developercertificate.org](http://developercertificate.org/).
### Signing your work.
Awa LightweightM2M requires contributors to accept the Developer Certificate of Origin (DCO) from developercertificate.org.
The sign-off is a single line at the end of your commit comment to certify that you either wrote the supplied code or otherwise have the right to pass on the code as open source.
The sign-off is a single line at the end of your commit comment to certify that you either wrote the supplied code or
otherwise have the right to pass on the code as open source.
Certifying your contribution asserts that *for the current submission* the following statement is true:
```
Developer Certificate of Origin
Version 1.1
Expand Down Expand Up @@ -213,7 +208,8 @@ By making a contribution to this project, I certify that:
this project or the open source license(s) involved.
```
To certify your submission just add the following line to *every* git commit message to indicate that you accept the above DCO:
To certify your submission just add the following line to *every* git commit message to indicate that you accept
the above DCO:
````
Signed-off-by: User Name <[email protected]>
Expand All @@ -226,7 +222,7 @@ If you set-up your user.name and user.email via git config, you can sign your co
$ git commit --signoff
````
### Pushing your changes to your branch.
### Pushing your changes to your branch
If you specified --track when you created your new branch you should be able to simply push using
Expand All @@ -240,45 +236,39 @@ If not you will either have to specify where to push your new commits.
$ git push origin dev_branch1:dev_branch1
```
or alternatively setup branch tracking
or alternatively setup branch tracking
```
$ git push --set-upstream origin dev_branch1
```
### Creating a pull request.
### Creating a pull request
- Navigate to https://github.com/username/AwaLWM2M/pulls
- Click on *New pull request*
- Select FlowM2M/AwaLWM2M/master as the base in the left hand box
- Select the branch you wish to submit as a pull request in the right hand box.
- Click the *create* button.
* Navigate to https://github.com/username/AwaLWM2M/pulls
* Click on *New pull request*
* Select FlowM2M/AwaLWM2M/master as the base in the left hand box
* Select the branch you wish to submit as a pull request in the right hand box.
* Click the *create* button.
**Note.** *All Awa LightweightM2M development occurs on the master branch. Developers should only submit patches against the master branch.*
**Note.** *All Awa LightweightM2M development occurs on the master branch. Developers should only submit patches
against the master branch.*
An email will be sent to the project maintainers who will review your pull request.
If everything checks out no further action will be required.
You may wish to continue making other changes, in this case simply resync with the upstream
and create a new branch. Do **NOT** add your new unrelated changes to the branch you
and create a new branch. Do **NOT** add your new unrelated changes to the branch you
used for the pull request as they will automatically be included in the request.
### Making changes to a pull request.
### Making changes to a pull request
You may be asked to make some changes before your pull request will be accepted.
Any further commits that are pushed to the branch you used for the initial pull
Any further commits that are pushed to the branch you used for the initial pull
request will be automatically added to your pull request.
In some cases you may be asked to rebase your commits, either to bring them in-line
with the current master branch, to tidy up any commit comments or to add a forgotten
with the current master branch, to tidy up any commit comments or to add a forgotten
sign-off. You can find more information on rebasing [here](doc/rebasing_info.md).
----
----
9 changes: 5 additions & 4 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Chris Dewbery
Sean Kelly
David Antliff
Roland Bewick <[email protected]>
Hayden Brown <[email protected]>
Tony Walsworth <[email protected]>
Rory Latchem <[email protected]>
Roland Bewick
Hayden Brown
Tony Walsworth
Rory Latchem
Delme Thomas
Surender Sanke
Janibasha Shaik
François Berder <[email protected]>
Loading

0 comments on commit a7125e2

Please sign in to comment.