New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ooniprobe: new packages #11116
ooniprobe: new packages #11116
Conversation
|
The compilation is failing because https://github.com/Psiphon-Labs/bolt doesn't detect mipsel arch. (related issue boltdb/bolt#656) Will try to fix that in probe-engine pkg |
|
Wouldn't help if you are going to create an issue in both repositories of the packages, which you want to add to ask if they are going to use bbolt instead of a bolt? In probe-cli/go.sum and same for probe-engine/go.sum , they are using: In repository Psiphon-Labs/bolt, I see the last commit on 31st July 2019. However, in bolt repository, I was able to found this:
So, you can create an issue in Psiphon-Labs/bolt to add support for mips. As I would like to see handled this in upstream instead of patching it here. |
82b7b72
to
6aaa83a
Compare
|
Thx, I created PR to fix bolt Psiphon-Labs/bolt#1 But still, it will take time when developers will integrate that to upstream version of the package because probe-cli depends on quite an old version of bolt. |
|
I squashed commits into a single one. The package contains src for probe-engine and bolt package, which needs to be patched for OpenWrt. After a new probe-cli release, I believe it will be possible to remove these patches. |
|
@jefferyto may I ask you to review this Go package? |
| + // #cgo LDFLAGS: -levent_core | ||
| + // #cgo LDFLAGS: -levent_extra | ||
| + // #cgo LDFLAGS: -levent_pthreads | ||
| + // #cgo LDFLAGS: -lz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this patch be upstreamed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created an issue , but it's not their priority right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it work if you added these flags to TARGET_LDFLAGS instead of patching this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, but it failed in the liking phase. arch Linux has similar patch
https://github.com/ooni/probe-engine/blob/master/measurementkit/task_cgo.go#L29
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added CGO_LDFLAGS in #11255. That should allow you to set TARGET_LDFLAGS and have it affect cgo compilation (instead of having to patch the flags into the file).
I suggest patching out the #cgo linux,amd64 LDFLAGS: lines though, since that will affect x86-64 builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bassosimone Ok, so I replaced default sentry url with my own url and get the same error as you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this error when testing in malta-be (but not armvirt-64, although I didn't let it finish the whole test). I don't have a stack trace to compare though.
Perhaps you can try running upstream's pre-built (static) binary to see if you get the same error? If it doesn't happen with their binary then it's probably something in our build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested version rc9 to rc3 on OpenWrt. The same error is in 9,8,7,6,5,4 but version 3 works as expected. Upstream version for amd64 works without panic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to confirm: Did you also change the version of probe-engine used when testing the different versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes (more or less) I removed the part with probe-engine, since after your changes to golang its no longer necessary. I will push the updated package.
|
Also, perhaps this package can be named ooniprobe or ooniprobe-cli (or something with "ooni" in it)? "probe-cli" seems a bit too generic to me. |
I asked the same question some time ago. I was told that Psiphon prefers to use their own fork of bolt because they have developed a bunch of patches for robustness that they'd rather keep. (OONI does not use bolt directly.) |
Yes, please! (FWIW, I like |
|
Let me also join the package naming game party 🎉 Maybe I suggest calling the package: That would be consistent with the naming OONI Probe packages for Command Line Interface users have always had. The reason why the source code repo is called Thanks so much for helping out with packaging it! |
|
Another very useful thing to add to the package would be some way for people to run OONI Probe automatically on a regular basis. I am not very familiar with what is generally the best practice for doing this in OpenWRT land, but something like a simple cronjob should be enough. This can either be enabled by default or something the users opt-in to doing. Check the optional section of the probe-cli readme for a linux and macOS example for this: https://github.com/ooni/probe-cli#user-setup. |
|
You still need to patch out these lines in probe-engine (or somehow set |
|
@ja-pa I have addressed the issue and now you probably don't need to patch sources anymore. Could you perhaps see if you are satisfied with the new code? ooni/probe-engine#333 🙏 |
c922571
to
6750b86
Compare
|
@jefferyto I think that measurement-kit is not necessary for runtime (I just checked that on my Omnia). |
|
Updated to version 3.0.0 |
|
measurement_kit needs a dependency on libevent2-openssl. |
|
net/ooniprobe/Makefile
Outdated
| DEPENDS:=\ | ||
| $(GO_ARCH_DEPENDS) +libevent2-openssl \ | ||
| +libevent2-core +libevent2-extra +libevent2-pthreads \ | ||
| +libmaxminddb +libnghttp2 +libopenssl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure libnghttp2 is necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it I get
Package ooniprobe is missing dependencies for the following libraries:
libnghttp2.so.14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have compiled this package without +libnghttp2 in DEPENDS (and without the -lnghttp2 in TARGET_LDFLAGS) in armvirt-32 and x86-generic, and I haven't encountered this error... Is there a specific target arch I should try compiling for to see this error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use mvebu which should be arm32 . I think it could be somehow related to ooni/probe-engine@ae59c05#diff-38f5d43a0af2601dc205a09e9e321845
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we compile for Linux without the "ooni" flag (which does what we want in our strange Linux setup) we just -lcurl and assume the dynamic linker will figure out.
When I did that, I assumed a distro would have preferred dynamic linking. Is there a reason not to use dynamic linking of C/C++ dependencies here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dynamic linking to curl here is fine; TARGET_LDFLAGS has -lcurl.
I was asking about libnghttp2 - it doesn't appear to be necessary anymore in the latest release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, MK never depended directly from nghttp2. AFAIK, however, curl uses nghttp2 to implement http2. Hence, whether it's needed or not I think depends on libcurl.so?
|
What's the status on this? |
|
I'm don't believe libnghttp2 is a run-time dependency, or perhaps it should be selected if |
cfdfa6d
to
6287476
Compare
net/ooniprobe/Makefile
Outdated
| DEPENDS:=\ | ||
| $(GO_ARCH_DEPENDS) +libevent2-openssl \ | ||
| +libevent2-core +libevent2-extra +libevent2-pthreads +libnghttp2 \ | ||
| +libmaxminddb +libopenssl +LIBCURL_NGHTTP2:libnghttp2 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libnghttp2 appears twice in the above 2 lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thx
net/ooniprobe/Makefile
Outdated
|
|
||
| TARGET_LDFLAGS:=\ | ||
| -lmeasurement_kit -lmaxminddb -lcurl \ | ||
| -lnghttp2 -levent_openssl -lssl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe -lnghttp2 also depends on LIBCURL_NGHTTP2 being set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed that and build/run test worked file
|
I think the CI error is because the measurement-kit package needs to be updated to 0.10.12. |
|
@jefferyto Thx, I rebased ooni branch to master |
|
@ja-pa @jefferyto as a heads-up, this is one of the latest ooni/probe-cli that uses Measurement Kit as a dependency. Also, as another heads-up: we've discovered an issue with 3.0.4 and we're cutting 3.0.5 in ~1 hour to fix the issue. |
91f754c
to
3b740b0
Compare
|
I just updated ooniprobe to version 3.0.6 and removed dependency on libnghttp2 Runtested with im tests |
|
I'd like to have this added: define Package/ooniprobe/config
select MEASUREMENT_KIT_BUILD_DEPENDS
endefbut otherwise this looks good to me. |
Added, thanks ! |
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this!
Maintainer: me
Compile tested: Turris Omnia (TOS5), OpenWrt master
Run tested: Turris Omnia (TOS5), OpenWrt master
Description:
This PR adds
two packages probe-cliooniprobe package related to network measurements for OONI (Open Observatory of Network Interference).It helps researchers collect information about malicious behavior in the public networks (us of DPI, middleboxes, censorship,etc.)
Project website https://ooni.org/post/ https://ooni.org