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:
```
--- 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_dh_install-arch: T := verify-install-integrity-dep
override_dh_install-arch: SPACE := $(eval) $(eval)
override_dh_install-arch: S_CR_PATH := apps/chromium/current
-override_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
+override_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
override_dh_install-arch: debian/chromium-browser.sh
override_dh_install-arch:
# 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:
- v8_build_config.json
- v8_context_snapshot_generator
- 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
** Patch added: "Save 50+ MB by avoiding packaging build only files"
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1742653/+attachment/5035029/+files/avoid-packaging-build-only-files.patch
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1742653
Title:
chromium-browser 63+ packages 50+ MB of binaries only needed at build
time
Status in chromium-browser package in Ubuntu:
New
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/chromium-browser/v8_context_snapshot_generator`,
which is at the moment being packaged (see file list for bionic in [2]) in the
chromium-browser package along with the 1MB related binary that is the only one
that should be included in the package:
```
$ ls -ltrh /usr/lib/chromium-browser/v8_context_snapshot*
-rwxr-xr-x 1 root root 44M Jan 9 18:21
/usr/lib/chromium-browser/v8_context_snapshot_generator
-rw-r--r-- 1 root root 1.6M Jan 9 18:21
/usr/lib/chromium-browser/v8_context_snapshot.bin
```
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://askubuntu.com/questions/986031/why-is-chromium-browser-63-so-much-bigger-than-62/986132
[2] https://packages.ubuntu.com/bionic/amd64/chromium-browser/filelist
[3]
https://docs.google.com/document/d/1jpQQX0piaxcHJPWakp_Kr_03g5Gnma5h5-Kdlqu7jVQ/edit#heading=h.k6iklq6rvd30
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1742653/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp