Skip to content

Reduce Ubuntu 20 ARM package size

Stan Hu requested to merge sh-reduce-arm-build-size into master

This removes unnecessary gRPC source and binaries that were bundled with the ARM package. Prior to this change, the grpc-1.30.2 gem was taking 220 MB of space. We can remove a number of files in the /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/grpc-1.30.2 directory:

  1. /include: 400K
  2. /src/core: 9.3 MB
  3. /src/ruby/ext: 196.1 MB
  4. /third_party: 12.1 MB

These directories do not include any Ruby code, so it is safe to delete them. /src/ruby/ext contains mostly C source and headers, along with compiled objects.

Note that all shared libraries (.so) files are loaded from the /opt/gitlab/embedded/lib/ruby/gems/2.7.0/extensions/ directory, so extraneous .so files can likely be deleted for other gems as well.

Closes #5661 (closed)

Edited by Stan Hu

Merge request reports

Loading