Closed marcosfrm closed 9 months ago
It is always set. Guaranteed to be non-empty and different from /
since RPM 4.6 (16 years ago!):
https://github.com/rpm-software-management/rpm/commit/6c0651926aedc302816a0b61e1f1a8ef568be539
We can use the %{buildroot}
macro too. It is expanded before the shell runs, while $RPM_BUILD_ROOT
is an environment variable set by RPM for use in the spawned shell. Personally, I prefer $RPM_BUILD_ROOT
.
%{buildroot}
and $RPM_BUILD_ROOT
evaluate to the same value.
What if
RPM_BUILD_ROOT
isn't set?