Skip to content

Commit

Permalink
doc: merge the engine and the cli readmes (ooni#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 3, 2021
1 parent c36e2a5 commit 8e5cc72
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 146 deletions.
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ reviewer is satisfied, they will merge the pull request.
Please, before opening a new issue, check whether the issue or feature request
you want us to consider has not already been reported by someone else.

For new issues, please use: https://github.com/ooni/probe.
For new issues, please use: [github.com/ooni/probe](
https://github.com/ooni/probe/issues/new?labels=ooni/probe-cli&assignee=bassosimone).

Please, also check https://github.com/ooni/probe-engine for legacy issues. This is
Please, also check [github.com/ooni/probe-engine](
https://github.com/ooni/probe-engine) for legacy issues. This is
the repository where the measurement engine previously was located.

## PR requirements
Expand Down
105 changes: 44 additions & 61 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,107 +1,90 @@
# OONI Probe CLI

[![linux-debian-packages](https://github.com/ooni/probe-cli/workflows/linux-debian-packages/badge.svg)](https://github.com/ooni/probe-cli/actions?query=workflow%3Alinux-debian-packages) [![GitHub issues by-label](https://img.shields.io/github/issues/ooni/probe/ooni/probe-cli?style=plastic)](https://github.com/ooni/probe/labels/ooni%2Fprobe-cli)
[![GoDoc](https://godoc.org/github.com/ooni/probe-cli?status.svg)](https://godoc.org/github.com/ooni/probe-cli) [![Short Tests Status](https://github.com/ooni/probe-cli/workflows/shorttests/badge.svg)](https://github.com/ooni/probe-cli/actions?query=workflow%3Ashorttests) [![All Tests Status](https://github.com/ooni/probe-cli/workflows/alltests/badge.svg)](https://github.com/ooni/probe-cli/actions?query=workflow%3Aalltests) [![Coverage Status](https://coveralls.io/repos/github/ooni/probe-cli/badge.svg?branch=master)](https://coveralls.io/github/ooni/probe-cli?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/ooni/probe-cli)](https://goreportcard.com/report/github.com/ooni/probe-cli) [![linux-debian-packages](https://github.com/ooni/probe-cli/workflows/linux-debian-packages/badge.svg)](https://github.com/ooni/probe-cli/actions?query=workflow%3Alinux-debian-packages) [![GitHub issues by-label](https://img.shields.io/github/issues/ooni/probe/ooni/probe-cli?style=plastic)](https://github.com/ooni/probe/labels/ooni%2Fprobe-cli)

The next generation OONI Probe Command Line Interface.

## User setup

1. Go [into the releases](https://github.com/ooni/probe-cli/releases) and download the
release for your architecture and platform
Please, follow the instructions at [ooni.org/install/cli](https://ooni.org/install/cli)
to install `ooniprobe`. If we do not support your use case, please let us know.

2. Extract the tarball with `tar xvzf ooniprobe_*.tar.gz`
Once `ooniprobe` is installed, try `ooniprobe help` to get interactive help.

3. Copy the `ooniprobe` binary into a location in your `$PATH`, for example
`/usr/local/bin/ooniprobe`
## Reporting issues

Please, report issues with this codebase at [github.com/ooni/probe](
https://github.com/ooni/probe/issues/new?labels=ooni/probe-cli&assignee=bassosimone).
Please, make sure you tag such issues using the `ooni/probe-cli` label.

4. Run `ooniprobe run` to perform all the tests
## Repository organization

Optional:
Every top-level directory contains an explanatory README file.

Add a crontab entry (on linux) to run `ooniprobe` daily at a random time:
## Development setup

Be sure you have golang >= 1.14 and a C compiler (when developing for Windows, you
need Mingw-w64 installed). The most basic build command is:

```bash
(crontab -l 2>/dev/null; echo "$(( ( RANDOM % 60 ) + 1 )) $(( ( RANDOM % 24 ) + 1 )) * * * ooniprobe run") | crontab -
go build -v ./cmd/ooniprobe
```

On macOS you can configure OONI Probe to run automatically using launchd.
This will generate a binary called `ooniprobe` in the current directory.

Below is a sample launchd script, that should be placed inside of
`~/Library/LaunchAgents/org.ooni.probe.cli.plist`.
## Update bundled assets

Be sure to replace `/PATH/TO/BINARY/ooniprobe` with the actual install location of the
`ooniprobe` binary.
To update bundled assets use:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.ooni.probe.daily-run</string>

<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
```bash
./updatebindata.sh
```

<key>ProgramArguments</key>
<array>
<string>/PATH/TO/BINARY/ooniprobe</string>
<string>--log-handler=syslog</string>
<string>run</string>
<string>unattended</string>
</array>
Then commit the changes.

<key>StartInterval</key>
<integer>86400</integer>
## Android bindings

</dict>
</plist>
```bash
./build-android.bash
```

Once you have written the file, you can enable `ooniprobe` to run automatically by
doing: `launchctl load org.ooni.probe.cli.plist`.
We automatically build Android bindings whenever commits are pushed to the
`mobile-staging` branch. Such builds could be integrated by using:

## Reporting issues

Please, report issues with this codebase at https://github.com/ooni/probe. Please, make
sure you tag such issues using the `ooni/probe-cli` label.
```Groovy
implementation "org.ooni:oonimkall:VERSION"
```

## Development setup
Where VERSION is like `2020.03.30-231914` corresponding to the
time when the build occurred.

Be sure you have golang >= 1.14 and a C compiler (when developing for Windows, you
need Mingw-w64 installed). The most basic build command is:
## iOS bindings

```bash
go build -v ./cmd/ooniprobe
./build-ios.bash
```

To compile a release used the `build.sh` script. For more information
We automatically build iOS bindings whenever commits are pushed to the
`mobile-staging` branch. Such builds could be integrated by using:

```bash
./build.sh help
```ruby
pod 'oonimkall', :podspec => 'https://dl.bintray.com/ooni/ios/oonimkall-VERSION.podspec'
```

The output generated by this command should provide you with updated information
regarding the pre-requisites for building (and cross-building) `ooniprobe` as well
as useful information regarding cross compiling.
Where VERSION is like `2020.03.30-231914` corresponding to the
time when the build occurred.

To update bundled binary data use:
## Updating dependencies

```bash
./updatebindata.sh
go get -u -v ./... && go mod tidy
```

## Updating dependencies

`go get -u -v ./... && go mod tidy`

## Releasing

1. update binary data as described above;

2. update `internal/version/version.go`;
2. update `version/version.go`;

3. make sure you have updated dependencies;

Expand Down
83 changes: 0 additions & 83 deletions internal/engine/README.md

This file was deleted.

0 comments on commit 8e5cc72

Please sign in to comment.