Commit Graph

470 Commits

Author SHA1 Message Date
Simone Basso
f53b3be66e
feat: add end-to-end testing to this repository (#220)
* feat: add end-to-end testing to this repository

Part of https://github.com/ooni/probe-engine/issues/1181

Motivation: we want to run this check from the repository where
we work the most, such that it's unlikely it pauses due to inactivity,
as it may happen for less frequently touched upon repositories.

Code adapted from https://github.com/ooni/e2etesting/

* fix: correct name for main branch
2021-02-04 14:25:03 +01:00
Simone Basso
26d807c50f
fix: always use probe-cli version (and make it alpha) (#219)
See https://github.com/ooni/probe-engine/issues/1181

While there, run `go fmt ./...`
2021-02-04 11:00:27 +01:00
Simone Basso
6062b652f6
Release 3.5.1 (#218)
* chore: bless 3.5.1

* fix(debian): there is an unexpected empty line in template

* fix: make sure we can install the package

We notice that the package was broken only when installing. Apparently, the
debian script do not check for errors during the build.

* fix(debian): nice that the build breaks now let's see if it fixes
2021-02-03 21:32:45 +01:00
Simone Basso
cb6aa1fd3c
chore: release 3.5.0 (#217) 2021-02-03 20:22:41 +01:00
Simone Basso
a5f4fc997c
refactor: we don't wanna export pkg/oonimkall/tasks (#216)
* doc: merge the engine and the cli readmes

Part of https://github.com/ooni/probe/issues/1335

* refactor: we don't wanna export pkg/oonimkall/tasks

See https://github.com/ooni/probe/issues/1335
2021-02-03 19:48:23 +01:00
Simone Basso
cc5fcede44
doc: merge the engine and the cli readmes (#215)
Part of https://github.com/ooni/probe/issues/1335
2021-02-03 19:29:12 +01:00
Simone Basso
31cf7d2fdf
doc: ensure all top dirs have an explanatory README (#214)
* doc: ensure all top dirs have an explanatory README

This makes the repository a lil bit nicer to newcomers.

Part of https://github.com/ooni/probe/issues/1335

* fix: re-run bindata to embed the README

The readme is small, so we can pay the price of adding it.

On a related note, I am very pleased the Go team implemented the
`//go:embed` feature, so we can get rid of this bindata thing.
2021-02-03 16:54:00 +01:00
Simone Basso
bfd19fd347
fix(cross.yml): only run on the release branch (#213)
Part of https://github.com/ooni/probe/issues/1335.

Motivation: we want all workflows to be green only when we are
approaching a release. It's fine if some less core tests are
failing during the development process. We have daily builds anyway
so we know of new breakages the day after, which is OK.
2021-02-03 16:13:37 +01:00
Simone Basso
43f95e2c9a
fix(riseupvpn): skip currently failing tests (#212)
Part of https://github.com/ooni/probe/issues/1335.

Tracked also by https://github.com/ooni/probe/issues/1338.
2021-02-03 16:06:03 +01:00
Simone Basso
ef8fa97e13
chore: continue merging probe-engine into probe-cli (#211)
* chore: remove duplicate code of conduct

* chore: remove AUTHORS file

I doubt this actually has any value in the era of GitHub.

* chore: move CODEOWNERS to toplevel

* chore: move CONTRIBUTING.md to toplevel and adapt it

* chore: remove duplicated LICENSE file

* chore(engine): remove now-obsolete design document

* chore: remove the testusing test

We're not going to make this code importable from third parties
like we did for probe-engine. It seems this feature was only used
for the experiment in Spain so it makes sense to drop it.

* chore: enable code generation tests

See https://github.com/ooni/probe/issues/1335

* chore: enable code-ql checks

* cleanup: remove libooniffi code and tests

It seems this code is not used. We are not aware of anyone using it. And we
don't want to expose it publicly as an API. So, what to do?

I guess it's fine to delete it. If there is anyone that needs it, we have
in the history a reference to it and we can always reinstate it.

* chore: move issue templates to ooni/probe
2021-02-03 14:42:51 +01:00
Arturo Filastò
d5b3e90605
Drop the include_ip & include_network settings (#210)
Refactor the copy for the publishing of results setting
2021-02-03 13:52:39 +01:00
Simone Basso
c824612812
refactor: enable automatic iOS builds (#209)
* refactor: enable automatic iOS builds

Part of https://github.com/ooni/probe/issues/1335

* fix: go mod tidy
2021-02-03 13:51:15 +01:00
Maria Xynou
b4c311cb45
Edited Debian CLI informed consent copy
I have edited the Debian CLI informed consent copy so that it's more aligned with the copy in the OONI Probe apps and in the macOS version of OONI Probe CLI. I have also changed the default setting to `true` (to enable the contribution of measurements).
2021-02-03 13:40:00 +01:00
Simone Basso
0c48bc0746
refactor: enable QA tests and jafar self test (#208)
* refactor: enable QA tests and jafar self test

Part of https://github.com/ooni/probe/issues/1335

* chore: make sure all workflows run on release branches
2021-02-03 13:20:37 +01:00
Simone Basso
4eeadd06a5
refactor: move more commands to internal/cmd (#207)
* refactor: move more commands to internal/cmd

Part of https://github.com/ooni/probe/issues/1335.

We would like all commands to be at the same level of engine
rather than inside engine (now that we can do it).

* fix: update .gitignore

* refactor: also move jafar outside engine

* We should be good now?
2021-02-03 12:23:15 +01:00
Simone Basso
6351d898d6
refactor: miniooni should be outside of the engine (#206)
* refactor: miniooni should be outside of the engine

This is part of https://github.com/ooni/probe/issues/1335. We also need
to think whether we wanna keep libminiooni and miniooni separated.

The previous use case for having a top-level libminiooni was that of
enabling others to integrate miniooni into other binaries.

This was usegul when studying internet censorship in Spain in May 2020.

I am wondering whether we should be keeping this complexity. I am not
sure about this and probably we should be killing it.

(In any case, reducing complexity is not the objective of this diff,
since I would like instead to move things around with minimal changes
and make sure we have a ~good repository organization here.)

* fix: import in libminiooni
2021-02-03 11:21:10 +01:00
Simone Basso
99b28c1d95
refactor: start building an Android package (#205)
* refactor: start building an Android package

Part of https://github.com/ooni/probe/issues/1335.

This seems also a good moment to move some packages out of the
engine, e.g., oonimkall. This package, for example, is a consumer
of the engine, so it makes sense it's not _inside_ it.

* fix: committed some stuff I didn't need to commit

* fix: oonimkall needs to be public to build

The side effect is that we will probably need to bump the major
version number every time we change one of these APIs.

(We can also of course choose to violate the basic guidelines of Go
software, but I believe this is bad form.)

I have no problem in bumping the major quite frequently and in
any case this monorepo solution is convinving me more than continuing
to keep a split between engine and cli. The need to embed assets to
make the probe more reliable trumps the negative effects of having to
~frequently bump major because we expose a public API.

* fix: let's not forget about libooniffi

Honestly, I don't know what to do with this library. I added it
to provide a drop in replacement for MK but I have no idea whether
it's used and useful. I would not feel comfortable exposing it,
unlike oonimkall, since we're not using it.

It may be that the right thing to do here is just to delete the
package and reduce the amount of code we're maintaining?

* woops, we're still missing the publish android script

* fix(publish-android.bash): add proper API key

* ouch fix another place where the name changed
2021-02-03 10:51:14 +01:00
Simone Basso
6714b79f97
refactor: integrate more probe-engine workflows (#204)
This diff is part of https://github.com/ooni/probe/issues/1335.

We are moving more probe-engine workflows to toplevel.

The general idea here is to migrate all possible workflows and to
delete the ones that we cannot use in this repo (if any).
2021-02-02 15:57:37 +01:00
Simone Basso
90d15c1c09
refactor: build miniooni from toplevel (#203)
* refactor: build miniooni from toplevel

Of course, also move the specific test checking whether we are
still able of building miniooni.

Part of https://github.com/ooni/probe/issues/1335

* build for current branch just to confirm

* fix: correct the path where linux/arm binary is

* okay, it works, we can remove the special rule
2021-02-02 15:34:03 +01:00
Simone Basso
47dd063b77
fix: add missing files causing tests to fail (#202)
* fix: add missing files causing tests to fail

See https://github.com/ooni/probe/issues/1335#issuecomment-771559718

* fix: toggle verbose so we better understand the tests output
2021-02-02 14:18:22 +01:00
Simone Basso
d57c78bc71
chore: merge probe-engine into probe-cli (#201)
This is how I did it:

1. `git clone https://github.com/ooni/probe-engine internal/engine`

2. ```
(cd internal/engine && git describe --tags)
v0.23.0
```

3. `nvim go.mod` (merging `go.mod` with `internal/engine/go.mod`

4. `rm -rf internal/.git internal/engine/go.{mod,sum}`

5. `git add internal/engine`

6. `find . -type f -name \*.go -exec sed -i 's@/ooni/probe-engine@/ooni/probe-cli/v3/internal/engine@g' {} \;`

7. `go build ./...` (passes)

8. `go test -race ./...` (temporary failure on RiseupVPN)

9. `go mod tidy`

10. this commit message

Once this piece of work is done, we can build a new version of `ooniprobe` that
is using `internal/engine` directly. We need to do more work to ensure all the
other functionality in `probe-engine` (e.g. making mobile packages) are still WAI.

Part of https://github.com/ooni/probe/issues/1335
2021-02-02 12:05:47 +01:00
Simone Basso
b1ce300c8d
fix: import path should be github.com/ooni/probe-cli/v3 (#200)
See https://github.com/ooni/probe/issues/1335#issuecomment-771499511
2021-02-02 10:32:46 +01:00
Simone Basso
faa9308b1e
fix(build.sh): clarify for what Linux archs we build (#198)
See https://github.com/ooni/probe/issues/807#issuecomment-766941585
2021-01-25 17:45:26 +01:00
Arturo Filastò
b84fe2c7e3
Merge pull request #197 from ooni/fix-list-ui
Fixup the rightpad on the list command
2021-01-22 13:48:54 +01:00
Arturo Filastò
06699445a7 Fixup the rightpad on the list command 2021-01-22 12:46:57 +01:00
Simone Basso
f2af3db193
fix(show): make sure we quote URL/query (#196) 2021-01-22 12:14:19 +01:00
Simone Basso
9577d7e11e
chore: 3.5.0-alpha for the master branch 2021-01-20 14:06:12 +01:00
Simone Basso
795f3be44e
chore: release 3.4.0 (#195)
This release only contains updates in debian packaging. All other platforms
could safely continue to use 3.2.0 or 3.3.0.

I didn't want to make a path release, though, because I didn't want to convey
the meaning that something was fixed.

Related to https://github.com/ooni/ooni.org/issues/677
2021-01-20 13:31:54 +01:00
Simone Basso
4b557a0899
build.sh: build windows/386 and linux/386, update Debian packaging (#193)
* feat(build.sh): build for windows/386

Part of https://github.com/ooni/probe/issues/1315

* fix(build.sh): docker pull so we have latest image

Part of https://github.com/ooni/probe/issues/1315

* fix(build.sh): apk update && apk upgrade to have latest packages

It does not currently seem necessary. But let's be defensive.

Part of https://github.com/ooni/probe/issues/1315.

* fix(windows.yml): for now disable windows/386

It's working locally but not remotely on Windows. We need to
figure out how to install the 386 compiler.

Part of https://github.com/ooni/probe/issues/1315.

* feat(build.sh): build for windows/386

Part of https://github.com/ooni/probe/issues/1315.

* fix(linux.yml): try to enable experimental docker flags

Related to https://github.com/ooni/probe/issues/1315.

See also https://github.com/actions/virtual-environments/issues/368#issuecomment-713588127.

* fix(debian): try to have single workflow with experimental docker

More commits probably needed.

Part of https://github.com/ooni/ooni.org/issues/677.

* remove restriction on the branch name

* maybe we need a pattern also for branches

* less stringent constraints

* consolidated debian workflow into a single workflow

* further fix the debian workflow

* only run debian action for specific branches or tags

* fix(build.sh): package the 386 windows version properly
2021-01-20 13:09:37 +01:00
Simone Basso
dc6b492986
chore: v3.4.0-alpha for the main branch 2021-01-19 20:36:38 +01:00
Simone Basso
4853ddf810
chore: bless v3.3.0 (#194) 2021-01-19 20:25:00 +01:00
Simone Basso
504a4e79d4
feat: implement darwin launch agent (#192)
* feat: sketch out periodic command

* feat: sketch out periodic command for macOS

* feat: implement darwin's launch agent

* refactor: better way to run on darwin

Make sure we have code that builds on all platforms.

* fix(run): max 10 URLs with darwin in unattended mode

* feat: add support for seeing/streaming logs

* feat: implement the status command and add usage hints

* feat(periodic): run onboarding if needed

* fix: no too confusing function names

* fix: s/periodic/autorun/

Discussed earlier this morning with @hellais.

* fix: we cannot show logs before Big Sur

Bug reported by @hellais.
2021-01-14 18:32:05 +01:00
Simone Basso
6fbad8555f
chore: set version to 3.3.0-alpha 2021-01-13 00:47:12 +01:00
Simone Basso
40d5f86698
chore: bless 3.2.0 (#191) 2021-01-13 00:40:48 +01:00
Simone Basso
acfa429127
chore: update deps (probe-engine 0.22.0 et al.) (#190)
The CloseReport method is gone. We don't need to close reports
anymore with the new OONI backend.

The InputsRequired flags now is InputsOrQueryTestLists.
2021-01-13 00:25:25 +01:00
Arturo Filastò
af4cbd1846
Implement support for not writing to disk and fetching measurements f… (#189)
* Implement support for not writing to disk and fetching measurements from the API

* Handle case of input not being set

* Comment about exposing raw_measurement in probe-engine

* Add basic test for GetMeasurementJSON

* Update internal/database/actions.go

Co-authored-by: Simone Basso <bassosimone@gmail.com>
2021-01-11 19:59:20 +01:00
Arturo Filastò
4ac1e5f5d4
Merge pull request #188 from ooni/informed-consent-migration
Implement informed consent migration using the config file
2021-01-11 11:07:31 +01:00
Arturo Filastò
5cfce6acd0 Implement informed consent migration using the config file 2021-01-08 14:14:14 +01:00
Federico Ceratto
8df91ecb1b
debian: run as a daemon, ask informed consent (#162)
* Set verbose mode, depend on adduser

* Run as daemon

* Generate manpage

* Implement informed consent

* Set version

* Switch format to native

* Set environment

* Update packaging

* Create test and release pipelines

* Update debian/ooniprobe-cli.service

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* Update debian/ooniprobe-cli.service

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* Update debian/ooniprobe.conf.disabled

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* fix(linux-debian-packages): build also on pull requests

Otherwise there's no way for us to test :^).

* fix(debian/control): ubuntu 20.04 has debhelper 12

See https://packages.ubuntu.com/focal/debhelper

* fix(debian/control): debhelper-compat relations doesn't work the way I thought

* Update debian/ooniprobe-cli.timer

Co-authored-by: Simone Basso <bassosimone@gmail.com>
2020-12-15 13:05:13 +01:00
Arturo Filastò
862e27efcd
Update Readme.md 2020-12-09 12:52:57 +01:00
Arturo Filastò
72a3fa0bca
Update Readme.md 2020-12-09 12:51:59 +01:00
Arturo Filastò
5b838ec188
Update plist file 2020-12-09 12:51:28 +01:00
Simone Basso
fa9ac93804
fix(Readme.md): issues badge lands us on issue tracker
Before it was landing us onto the badge itself, which is quite useless :-).
2020-12-08 17:46:24 +01:00
Simone Basso
b9e619b22e
chore(Readme): add badge pointing to issue tracker
While there improve the wording around opening issues.
2020-12-08 17:45:10 +01:00
Simone Basso
1f5f6efd85
chore(Readme): say where to report issues 2020-12-08 17:39:50 +01:00
Simone Basso
1a4b70c9aa chore: we're now at 3.2.0-alpha 2020-12-08 15:59:48 +01:00
Simone Basso
c9ea92fc53
chore: bless 3.1.0 (#186) 2020-12-07 19:42:13 +01:00
cyBerta
9192ead36d
cli: expose riseupvpn (#171) 2020-12-07 17:14:48 +01:00
Simone Basso
a8070edc27
chore: update dependencies (#185) 2020-12-07 11:51:09 +01:00
Simone Basso
cb58fb5b79
go get -v github.com/ooni/probe-engine@f8284475147 (#184) 2020-12-04 14:36:52 +01:00