Reduce Ubuntu 20 ARM package size
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:
-
/include
: 400K -
/src/core
: 9.3 MB -
/src/ruby/ext
: 196.1 MB -
/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