chromium-browser 63+ packages 50+ MB of binaries only needed at build time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| chromium-browser (Ubuntu) |
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
Mario Sánchez Prada (mariospr) wrote : | #1 |
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 |
The attachment "Save 50+ MB by avoiding packaging build only files" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]
tags: | added: patch |
Olivier Tilloy (osomon) wrote : | #3 |
Thanks for the report Mario. I verified that those files can be safely removed from the binary package indeed. Good catch!
Changed in chromium-browser (Ubuntu): | |
status: | New → Confirmed |
assignee: | nobody → Olivier Tilloy (osomon) |
importance: | Undecided → High |
Changed in chromium-browser (Ubuntu): | |
status: | Confirmed → In Progress |
Mario Sánchez Prada (mariospr) wrote : | #4 |
No problem, happy to see the report and the patch are useful.
After all, shaving 50MB out of 260MB is quite something! :)
Changed in chromium-browser (Ubuntu): | |
status: | In Progress → Fix Committed |
Launchpad Janitor (janitor) wrote : | #5 |
This bug was fixed in the package chromium-browser - 63.0.3239.
---------------
chromium-browser (63.0.3239.
* Upstream release: 63.0.3239.132
* debian/rules: do not install files used for building only (LP: #1742653)
-- Olivier Tilloy <email address hidden> Sun, 14 Jan 2018 21:37:42 +0100
Changed in chromium-browser (Ubuntu): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #6 |
This bug was fixed in the package chromium-browser - 63.0.3239.
---------------
chromium-browser (63.0.3239.
* debian/rules: do not install files used for building only (LP: #1742653)
-- Olivier Tilloy <email address hidden> Thu, 11 Jan 2018 17:08:05 +0100
Changed in chromium-browser (Ubuntu): | |
status: | Fix Committed → Fix Released |
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