Skip to content

cleanup build artifacts from dist package

Currently the .deb and .rpm files published contain build artifacts, gem cache and other files not needed for running gitlab-ce

I've created script to cleanup these for PLD Linux packaging: https://github.com/pld-linux/gitlab-ce/blob/master/clean-vendor.sh

here's some stats:

$ du -shc root-cleaned/*/
124K    root-cleaned/etc/
12K     root-cleaned/lib/
149M    root-cleaned/usr/
26M     root-cleaned/var/
175M    total

$ du -shc root-not-cleaned/*/
124K    root-not-cleaned/etc/
12K     root-not-cleaned/lib/
300M    root-not-cleaned/usr/
26M     root-not-cleaned/var/
326M    total

$ ls -lh root-*/*.rpm
-rw-r--r-- 1 glen users 40M 16. okt   15:13 root-cleaned/gitlab-ce-8.12.6-0.76.x86_64.rpm
-rw-r--r-- 1 glen users 17M 16. okt   15:13 root-cleaned/gitlab-ce-doc-8.12.6-0.76.noarch.rpm

-rw-r--r-- 1 glen users 97M 16. okt   16:20 root-not-cleaned/gitlab-ce-8.12.6-0.76.x86_64.rpm
-rw-r--r-- 1 glen users 17M 16. okt   16:20 root-not-cleaned/gitlab-ce-doc-8.12.6-0.76.noarch.rpm
$ 

So that's ~60MiB save for package (xz compressed), and ~150MiB for unpackaged source.

So, is omnibus-gitlab interested in such cleanup and if yes, then where to put the code to cleanup the files?