diff options
| author | Joe Richey <joerichey@google.com> | 2017-03-02 10:15:23 -0800 |
|---|---|---|
| committer | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-05-02 13:39:18 -0700 |
| commit | 2ccea6496efc054c21c5ed397f3caff8d4992957 (patch) | |
| tree | 3a5a46492ad867d767770985773d08dcd49d1df6 /README.md | |
| parent | 49f7bad068c82d71d2af73b9c8046fb882b29c69 (diff) | |
metadata: introduce protobuf structures
This commit adds in the metadata package. The primary purpose of this
package is to provide the on-disk metadata structures in the form of
protocol buffers. This includes:
- Policy metadata structure
- Protector metadata structure
- Config file structure
- All necessary sub-structures (wrapped keys, parameters, etc)
This commit also adds in an example usage of the Config structure, which
represents the structure of the global config file. All the package
does at this point is convert between the Config structure and a JSON
representation.
Here we introduce govendor, which is described more in the README. This
means we will have all of our Go dependencies in the vendor
subdirectory. This means we will have no Go source dependencies, only
dependencies on the build tools (Go and govendor). The README describes
this in detail.
Note that we commit the generated files.
see: https://blog.golang.org/generate
Change-Id: Iaacd46666b5d3e4e865a0f4045dd63ed7e3d6f96
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 43 |
1 files changed, 30 insertions, 13 deletions
@@ -54,6 +54,7 @@ more managed environment and handling more functionality in the background. `fscrypt` has a [design document](https://goo.gl/55cCrI) that discusses many of the higher level design choices that were made. +<!-- TODO add in features when command-line interface is complete --> Specifically, `fscrypt` contains the following functionality: * Telling the time (but this is a stub program) @@ -68,11 +69,15 @@ git clone [REDACTED] $GOPATH/src/fscrypt ``` You will also want to add `$GOPATH/bin` to your `$PATH`. +`fscrypt` has the following build dependencies: +* `make` +* A C compiler ('gcc' or 'clang') +* Go + Once this is setup, you can run `make fscrypt` to build the executable in -`build/fscrypt`. The only other build dependencies are `make` and a C compiler. -Pass `"LDFLAGS += -static"` to `make` to get a static executable. If a Go -project contains C code, the go compiler produces a dynamically linked binary by -default. +`build/fscrypt`. Pass `"LDFLAGS += -static"` to `make` to get a static +executable. If a Go project contains C code, the go compiler produces a +dynamically linked binary by default. ## Running and Installing @@ -87,22 +92,34 @@ TODO ## Contributing -If you are making changes to the `fscrypt` component, you will need the -following additional commands: -* `make go` - Checks that all the go files build and tests pass. +If you are making changes to the `fscrypt` component, you will need to have +[govendor](https://github.com/kardianos/govendor) installed, and you will want +to use the following additional commands: +* `make update` - Updates the dependencies in the `vendor/` directory. +* `make go` - Generates, builds, and tests all the Go code. Requires + [protoc (v3.0 or later)](https://github.com/google/protobuf/releases) and + [protoc-gen-go](https://github.com/golang/protobuf). * `make format` - Formats all of the go code. -* `make lint` - Checks the code for style errors, requires - [`golint`](https://github.com/golang/lint) to be installed. -* `make all` - Does the above three commands and builds `fscrypt`. +* `make lint` - Checks the code for style errors. Requires + [`golint`](https://github.com/golang/lint). +* `make all` - Runs the above commands and builds `fscrypt`. + +These commands should be run before submitting any changes. Make sure that `$GOPATH/bin` is in you `$PATH`. All the above dependencies can be installed with: -```bash +``` bash +# Grab the latest version of protoc from github.com/google/protobuf/releases +> curl -L <download_link_for_your_architecture> > protoc.zip +> unzip protoc.zip -d protoc +> sudo mv protoc/bin/protoc /usr/local/bin/ +> rm -rf protoc.zip protoc/ +# Grab the go packages in the standard manner +> go get -u github.com/golang/protobuf/protoc-gen-go +> go get -u github.com/kardianos/govendor > go get -u github.com/golang/lint/golint ``` -These commands should be run before submitting any changes. - ## Known Issues None so far! |