Merge remote-tracking branch 'weave/dev' into 'weave/master'

ff46c93 Merge remote-tracking branch 'weave/master' into dev_review
08be74d Update libuweave/macaroon code
4efdf46 Fix GCC warning
4fe71e3 Make App ID a part of User ID
3cbb686 Update macaroon lib with version supporting empty strings
8585d30 Remove unused line
69dd2e1 Merge remote-tracking branch 'weave/master' into dev_dev
70c8642 Add kUwMacaroonDelegateeTypeService caveat
d5f7aab Add session ID validation
d7c6deb Remove crypto type "None"
d74a732 Update macaroon lib
a821f2e Integrate new macaroon library
7d29a5a Update macaroon lib
1c83377 Fix build errors introduced by
9ac4c6c Merge remote-tracking branch 'weave/master' into 'weave/dev'
5a7c4f5 Add black list manager implementation
484b6e4 Update AccessBlackListManager interface
81ac16e Add MockConfigStore argument to disabled default expectations
07bb755 Merge remote-tracking branch 'weave/master' into dev_dev2
7329b74 Fix unittest compilation on GCC
f533677 Implemented _accessControlBlackList trait
6741755 Merge remote-tracking branch 'weave/master' into dev_dev2
42e508f Add write callback into SaveSettings function
7ecdf95 Add |name| into LoadSettings/SaveSettings
8023b80 Merge remote-tracking branch 'weave/master' into dev_dev2
tree: e29ce457ec760bdf7d7bcf2324fd164c6ec5d0b9
  1. .clang-format
  2. .gitignore
  3. AUTHORS
  4. CONTRIBUTORS
  5. LICENSE
  6. Makefile
  7. README.md
  8. examples/
  9. file_lists.mk
  10. include/
  11. libweave-test.pc.in
  12. libweave.pc.in
  13. src/
  14. tests.mk
  15. third_party/
README.md

Overview

libWeave is the library with device side implementation of Weave protocol.

Sources

Sources are located in git repository at https://weave.googlesource.com/weave/libweave/

Install Repo

Make sure you have a bin/ directory in your home directory and that it is included in your path:

mkdir ~/bin
PATH=~/bin:$PATH

Download the Repo tool and ensure that it is executable:

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Checkout code

repo init -u https://weave.googlesource.com/weave/manifest
repo sync

Directory structure

PathDescription
include/Includes to be used by device code
src/Implementation sources
examples/Example of device code
third_party/Dependencies
Makefile, *.mk filesBuild files

Quick start on Debian/Ubuntu

Install prerequisites

sudo apt-get update
sudo apt-get install \
  autoconf \
  automake \
  binutils \
  g++ \
  hostapd \
  libavahi-client-dev \
  libcurl4-openssl-dev \
  libevent-dev \
  libexpat1-dev \
  libnl-3-dev \
  libnl-route-3-dev \
  libssl-dev \
  libtool

Prerequisites

Common

  • autoconf
  • automake
  • binutils
  • libtool
  • libexpat1-dev

For tests

  • cmake
  • gtest (included; see third_party/get_gtest.sh)
  • gmock (included; see third_party/get_gtest.sh)

For examples

  • cmake
  • hostapd
  • libavahi-client-dev
  • libcurl4-openssl-dev
  • libevhtp (included; see third_party/get_libevhtp.sh)
  • libevent-dev

Compiling

The make --jobs/-j flag is encouraged, to speed up build time. For example

make -j

which happens to be the same as

make all -j

Build library

make out/Debug/libweave.so

Build examples

make all-examples

See the examples README for details.

Testing

Run tests

make test
make export-test

or

make testall

Making changes

Configure git

Make sure to have correct user in local or global config e.g.:

git config --local user.name "User Name"
git config --local user.email user.name@example.com

Start local branch

repo start <branch name> .

Edit code and commit locally e.g.

git commit -a -v

Upload CL

repo upload .

Request code review

Go to the url from the output of “repo upload” and add reviewers.