Skip to content
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

ios: replace ooni/go-libtor with scripts compiling tor #2564

Closed
Tracked by #2524
bassosimone opened this issue Oct 12, 2023 · 0 comments · Fixed by ooni/probe-cli#1366
Closed
Tracked by #2524

ios: replace ooni/go-libtor with scripts compiling tor #2564

bassosimone opened this issue Oct 12, 2023 · 0 comments · Fixed by ooni/probe-cli#1366
Assignees
Labels
enhancement improving existing code or new feature needs investigation This issue needs extra data and investigation ooni/probe-engine platform/ios priority/high releaseBlocker This issue blocks releasing techdebt This issue describes technical debt

Comments

@bassosimone
Copy link
Contributor

Like #2365, but for iOS.

Part of #2524.

@bassosimone bassosimone added enhancement improving existing code or new feature priority/high platform/ios needs investigation This issue needs extra data and investigation ooni/probe-engine techdebt This issue describes technical debt releaseBlocker This issue blocks releasing labels Oct 12, 2023
@bassosimone bassosimone self-assigned this Oct 12, 2023
@bassosimone bassosimone mentioned this issue Oct 12, 2023
26 tasks
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
We currently have a string variable in `cBuildEnv` named
`OPENSSL_API_DEFINE` that we append to OpenSSL's `./Configure`
invocation to force using the proper Android API. However, for building
for iOS (a need documented by
ooni/probe#2564), we need a list of strings,
because there is more than a single scalar that we need to append to the
`./Configure` invocation (as shown by the MVP implementation at
#1366).

Hence, this diff, which introduces a string list named
`OPENSSL_POST_COMPILER_FLAGS` that contains strings to append to the
`./Configure` command line _after_ the OS/compiler flag. We specifically
named the variable "post compiler" because there is another variable in
the same `cBuildEnv` struct called `OPENSSL_COMPILER`.
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
We're building unit tests for no reason. Also, unit tests do not build
for iOS. So, let's stop building them.

Part of ooni/probe#2564
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff modifies `./internal/cmd/buildtool` to (1) stop removing
OpenSSL's pkgconfig, (2) use such a pkgconfig during libevent's
`./configure` step, and (3) make sure libevent's install does not remove
OpenSSL's pkgconfig.

We're implementing changes (1) and (2) because libevent fails to
properly configure for iOS if you have a system with homebrew with
OpenSSL@3 installed. Unless we force the `PKG_CONFIG_PATH`, libevent's
`configure` uses the OpenSSL@3 headers and library installed with
homebrew rather than the ones we cross compiled.

Change (3) is there because otherwise we cannot recompile libevent
without recompiling OpenSSL, since the libevent build fails unless we
have a suitable OpenSSL pkgconfig, as explained before.

This diff was extracted and refined from
#1366.

The reference issue is: ooni/probe#2564.
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff extends buildtool to builds zlib, openssl, libevent, and tor
for iOS.

We're only targeting 64 bit architectures, which is what ooni/probe-ios
needs.

We're targeting iOS >= 12.0, which is what ooni/probe-ios needs.

A subsequent diff will introduce unit tests to make sure we don't break
the iOS build.

Reference issue: ooni/probe#2564.

This diff was extracted from
#1366.
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
We needed to move the runtimex.Assert for darwin, otherwise we cannot
run unit tests on linux 😅. While there, be consistent and make sure we
avoid panicking on Windows if one runs unit tests there.

Part of ooni/probe#2564
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff replaces go-libtor with ./internal/libtor.

Closes ooni/probe#2564
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff backports #1367 to the release/3.19 branch.

We currently have a string variable in `cBuildEnv` named
`OPENSSL_API_DEFINE` that we append to OpenSSL's `./Configure`
invocation to force using the proper Android API. However, for building
for iOS (a need documented by
ooni/probe#2564), we need a list of strings,
because there is more than a single scalar that we need to append to the
`./Configure` invocation (as shown by the MVP implementation at
#1366).

Hence, this diff, which introduces a string list named
`OPENSSL_POST_COMPILER_FLAGS` that contains strings to append to the
`./Configure` command line _after_ the OS/compiler flag. We specifically
named the variable "post compiler" because there is another variable in
the same `cBuildEnv` struct called `OPENSSL_COMPILER`.
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff backports #1368 to the release/3.19 branch.

We're building unit tests for no reason. Also, unit tests do not build
for iOS. So, let's stop building them.

Part of ooni/probe#2564
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff backports #1369 to the release/3.19 branch.

This diff modifies `./internal/cmd/buildtool` to (1) stop removing
OpenSSL's pkgconfig, (2) use such a pkgconfig during libevent's
`./configure` step, and (3) make sure libevent's install does not remove
OpenSSL's pkgconfig.

We're implementing changes (1) and (2) because libevent fails to
properly configure for iOS if you have a system with homebrew with
OpenSSL@3 installed. Unless we force the `PKG_CONFIG_PATH`, libevent's
`configure` uses the OpenSSL@3 headers and library installed with
homebrew rather than the ones we cross compiled.

Change (3) is there because otherwise we cannot recompile libevent
without recompiling OpenSSL, since the libevent build fails unless we
have a suitable OpenSSL pkgconfig, as explained before.

This diff was extracted and refined from
#1366.

The reference issue is: ooni/probe#2564.
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
…r iOS

This diff backports #1370 to the release/3.19 branch.

This diff extends buildtool to builds zlib, openssl, libevent, and tor
for iOS.

We're only targeting 64 bit architectures, which is what ooni/probe-ios
needs.

We're targeting iOS >= 12.0, which is what ooni/probe-ios needs.

A subsequent diff will introduce unit tests to make sure we don't break
the iOS build.

Reference issue: ooni/probe#2564.

This diff was extracted from
#1366.
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff backports #1371 to the release/3.19 branch.

We needed to move the runtimex.Assert for darwin, otherwise we cannot
run unit tests on linux 😅. While there, be consistent and make sure we
avoid panicking on Windows if one runs unit tests there.

Part of ooni/probe#2564
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 12, 2023
This diff backports #1366 to the release/3.19 branch.

This diff replaces go-libtor with ./internal/libtor.

Closes ooni/probe#2564
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
We currently have a string variable in `cBuildEnv` named
`OPENSSL_API_DEFINE` that we append to OpenSSL's `./Configure`
invocation to force using the proper Android API. However, for building
for iOS (a need documented by
ooni/probe#2564), we need a list of strings,
because there is more than a single scalar that we need to append to the
`./Configure` invocation (as shown by the MVP implementation at
ooni#1366).

Hence, this diff, which introduces a string list named
`OPENSSL_POST_COMPILER_FLAGS` that contains strings to append to the
`./Configure` command line _after_ the OS/compiler flag. We specifically
named the variable "post compiler" because there is another variable in
the same `cBuildEnv` struct called `OPENSSL_COMPILER`.
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
We're building unit tests for no reason. Also, unit tests do not build
for iOS. So, let's stop building them.

Part of ooni/probe#2564
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
This diff modifies `./internal/cmd/buildtool` to (1) stop removing
OpenSSL's pkgconfig, (2) use such a pkgconfig during libevent's
`./configure` step, and (3) make sure libevent's install does not remove
OpenSSL's pkgconfig.

We're implementing changes (1) and (2) because libevent fails to
properly configure for iOS if you have a system with homebrew with
OpenSSL@3 installed. Unless we force the `PKG_CONFIG_PATH`, libevent's
`configure` uses the OpenSSL@3 headers and library installed with
homebrew rather than the ones we cross compiled.

Change (3) is there because otherwise we cannot recompile libevent
without recompiling OpenSSL, since the libevent build fails unless we
have a suitable OpenSSL pkgconfig, as explained before.

This diff was extracted and refined from
ooni#1366.

The reference issue is: ooni/probe#2564.
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
…#1370)

This diff extends buildtool to builds zlib, openssl, libevent, and tor
for iOS.

We're only targeting 64 bit architectures, which is what ooni/probe-ios
needs.

We're targeting iOS >= 12.0, which is what ooni/probe-ios needs.

A subsequent diff will introduce unit tests to make sure we don't break
the iOS build.

Reference issue: ooni/probe#2564.

This diff was extracted from
ooni#1366.
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
We needed to move the runtimex.Assert for darwin, otherwise we cannot
run unit tests on linux 😅. While there, be consistent and make sure we
avoid panicking on Windows if one runs unit tests there.

Part of ooni/probe#2564
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
This diff replaces go-libtor with ./internal/libtor.

Closes ooni/probe#2564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improving existing code or new feature needs investigation This issue needs extra data and investigation ooni/probe-engine platform/ios priority/high releaseBlocker This issue blocks releasing techdebt This issue describes technical debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant