chromium-browser 63+ packages 50+ MB of binaries only needed at build time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
chromium-browser (Ubuntu) |
Fix Released
|
High
|
Olivier Tilloy |
Bug Description
As mentioned in [1], it seems like the chromium-browser package might be, since Chromium 63, packaging a new and pretty big (44MB) binary that is not needed at run time, just at build time.
This binary is `/usr/lib/
```
$ ls -ltrh /usr/lib/
-rwxr-xr-x 1 root root 44M Jan 9 18:21 /usr/lib/
-rw-r--r-- 1 root root 1.6M Jan 9 18:21 /usr/lib/
```
This can become a big deal in space-constrained installations, of course, but considering that the installed size of the package is ~260MB, this binary alone accounts for ~16% of the package's size, so it would be good to clean that up from the package if possible.
[1] https:/
[2] https:/
[3] https:/
Related branches
summary: |
- chromium-browser 63+ package includes a 44MB binary only needed at build + chromium-browser 63+ packages 51+ MB of binaries only needed at build time |
summary: |
- chromium-browser 63+ packages 51+ MB of binaries only needed at build + chromium-browser 63+ packages 50+ MB of binaries only needed at build time |
Changed in chromium-browser (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in chromium-browser (Ubuntu): | |
status: | In Progress → Fix Committed |
I believe all it's needed is to patch the debian/rules file to add `v8_context_ snapshot_ generator` to the TRASH list of files: dh_install- arch: T := verify- install- integrity- dep dh_install- arch: SPACE := $(eval) $(eval) dh_install- arch: S_CR_PATH := apps/chromium/ current dh_install- arch: TRASH := .deps gen obj obj.host obj.target \*.lock build.\* .landmines mksnapshot\* protoc pyproto re2c resources yasm \*.TOC product_logo_\*png gen\* lib/\* lib libvpx_ obj_int_ extract .ninja\* chrome-wrapper \*.breakpad.\* java_mojo dump_syms browser_ test_resources ar_sample_ test_driver unittests app_streaming/dev locales remoting_locales dh_install- arch: TRASH := .deps gen obj obj.host obj.target \*.lock build.\* .landmines mksnapshot\* protoc pyproto re2c resources yasm \*.TOC product_logo_\*png gen\* lib/\* lib libvpx_ obj_int_ extract .ninja\* chrome-wrapper \*.breakpad.\* java_mojo dump_syms browser_ test_resources ar_sample_ test_driver unittests app_streaming/dev locales remoting_locales v8_context_ snapshot_ generator dh_install- arch: debian/ chromium- browser. sh dh_install- arch:
```
--- a/debian/rules 2017-12-07 08:40:06.000000000 +0000
+++ b/debian/rules 2018-01-11 10:59:39.168190995 +0000
@@ -219,7 +219,7 @@
override_
override_
override_
-override_
+override_
override_
override_
# Two stages: Install out of source tree. Copy to packaging.
```
That said, if we're to update that TRASH list, I'd recommend adding a few more files to that list that we (Endless) found useful to reduce the size of the resulting package even more, since those are only used for building as well, and take up quite some space too (e.g. toolchain.ninja is 5 MB, gn binary is 2.5 MB...).
Thus, the full list of targets I'm proposing to add to TRASH is this: config. json snapshot_ generator
- v8_build_
- v8_context_
- args.gn
- gn
- *.ninja
This would reduce the size of the installed binary in a bit over 51MB in total, not bad :-). FWIW, we had those additional targets added to TRASH in our chromium-browser package for a while already, not sure why we didn't reported that before, sorry about that.
See attached the patch implementing this proposal