censorship-no / ceno-browser-archive

Firefox for Android (Fennec) with Ouinet integration
Other
165 stars 8 forks source link

CENO import Ouinet from repo (ceno-browser) #7

Closed mhqz closed 2 years ago

mhqz commented 2 years ago

Hi @ivilata, I hope you're doing great :)

In this branch I'm adding a new option to the build scripts that serves to indicate if Ouinet is going to be built locally or directly fetched from MavenCentral (when the option -o is missing).

# The default behavior is to fetch the latest version of Ouinet [1] from MavenCentral.
 ./build.sh -a x86_64 -x ouinet.sample.xml

# If the -o option is present Ouinet is built from sources and passed as a parameter to build-fennec.sh
 ./build.sh -a x86_64 -x ouinet.sample.xml -o

[1] The latest version of Ouinet is automatically defined by reading the version.txt file included in Ouinet's subrepo:

def ouinet_latest_version = file('../../../../ouinet/version.txt').text.trim()
implementation "ie.equalit.ouinet:ouinet-${System.env.OUINET_ABI}:${ouinet_latest_version}"

BTW, I've also opened a PR in gecko-dev repo to upgrade the related Gradle build scripts.

Please let me know if you have any questions or comments :smile_cat:

ivilata commented 2 years ago

Thanks @mhqz! A couple of things:

  1. It would be nice to have the new option documented in the readme, since it contains instructions for both debug and release builds.
  2. As mentioned in gecko-dev#1, it should be ceno-browser scripts which decide what version of Ouinet to use for building gecko-dev. So, if -o is not specified, do read Ouinet's version from ouinet/version.txt (e.g. in build-fennec.sh) and pass it on to the gecko-dev build process (e.g. via OUINET_VERSION as suggested there).
mhqz commented 2 years ago

Hi @ivilata, thanks a lot for your feedback :slightly_smiling_face:

1. It would be nice to have the new option documented in the readme, since it contains instructions for both debug and release builds.

I've added the instructions for option -o and OUINET_VERSION in 7244a33. I've also updated the supported ABIs when a release is built in 18f20ca.

2. As mentioned in [gecko-dev#1](https://github.com/censorship-no/gecko-dev/pull/1), it should be `ceno-browser` scripts which decide what version of Ouinet to use for building `gecko-dev`. So, if `-o` is not specified, do read Ouinet's version from `ouinet/version.txt` (e.g. in `build-fennec.sh`) and pass it on to the `gecko-dev` build process (e.g. via `OUINET_VERSION` as suggested there).

You're totally right about this point, so I've modified the build scripts to pass OUINET_VERSION when build-fennec.sh is invoked and got a default version if this value is not present (017ed81).

I've also tested the build scripts with all the supported ABIs and combining flags (to build locally or to import a different version of Ouinet from MavenCentral).

Please let me know if you have any questions or comments.

ivilata commented 2 years ago

All correct, thanks @mhqz! :smile:

ivilata commented 2 years ago

BTW, added commit 0f78927e to make the repo use the associated commit of gecko-dev.

ivilata commented 2 years ago

I fixed the build command for GitLab CI/CD in commit 106dde56, since it should use the Ouinet submodule and not the latest stable release.