Ubuntu: inox browser: build and patch chromium from source



Question:

I recently stumbled over a set of patches for chromium which promise to focus on privacy by disabling data transmission to google. You can read more about it here. It originates from a Archlinux AUR but the pachtes are availabe to download.

I would like to patch Chromium from Source for Ubuntu, but I never did that before. I'm more or less familiar with building from source with config, make & make install, but it seems rather difficult for Chromium. I found some instruction here and here.

Can someone provide a proper step-by-step tutorial on how to build and patch chromium from source?


Solution:1

(Note that the link to Ubuntu's instructions for building Chromium appears to be heavily outdated.)

Disclaimer: I'm the maintainer of the Chromium Beta and Dev PPAs.

If you run apt-get source chromium-browser, you'll get the source code for the current stable version of Chromium that's in the repos along with the patches that Ubuntu applies on top of Chromium (which are in the debian/patches folder). You can add additional patches to be applied to Chromium here, but note that some of the patches you add may conflict or be the same as the patches Ubuntu uses. Also, update the series file, which describes what patches to apply and in what order.

The build script is at debian/rules. It's quite long, but the most important variable you'll probably be interested in is GYP_DEFINES, which is where you would specify the build flags to build Chromium with. For example, if you wanted to build Chromium with enable_google_now=0, then add a line saying GYP_DEFINES += enable_google_now=0 (you can add it around the other lines starting with GYP_DEFINES). Note that some build flags on that page conflict with the build flags Ubuntu uses (I know enable_webrtc is set to 1 in debian/rules).

As for building it, the simplest way would probably be to run dpkg-buildpackage -b from the chromium-browser-* directory. This will apply the patches, run through the debian/rules file, and then make several deb files. If there are build dependencies missing, it should notify you of those and stop the build. You can then install those deb files.

Note that building Chromium takes about 4-5 hours on a 4-core machine and takes about 15 GB of space (with debugging symbols included). Without debugging symbols (if you comment out the line that adds the -g flag), I'd estimate that it would take about 7-8 GB of space.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »