From: Tim Serong Date: Mon, 28 Mar 2022 04:12:10 +0000 (+1100) Subject: ceph.spec.in: remove build directory at end of %install X-Git-Tag: v16.2.11~545^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9da8ca0b2029a6d78c31542549b04d5dbda136f0;p=ceph.git ceph.spec.in: remove build directory at end of %install By the time we get to the end of the %install section, all the built binaries have been installed in the build root, so we can delete the build directory from the source tree. This frees up about 17GB of disk space on build hosts, which is helpful in case other processes later in the RPM build need more disk space. Fixes: https://tracker.ceph.com/issues/55079 Signed-off-by: Tim Serong (cherry picked from commit aa18cb12003e3526c8e8f23dc2335a483fbfa68e) Conflicts: ceph.spec.in - pacific uses "build", not "%{_vpath_builddir}" --- diff --git a/ceph.spec.in b/ceph.spec.in index cfd993cfa131..eacf8de67531 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1431,6 +1431,10 @@ install -m 644 -D monitoring/ceph-mixin/prometheus_alerts.yml %{buildroot}/etc/p %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib} %endif +# built binaries are no longer necessary at this point, +# but are consuming ~17GB of disk in the build environment +rm -rf build + %clean rm -rf %{buildroot}