BuildRoots
A buildroot is a chroot environment that acts as the root directory for RPM build artifacts. Structuring these artifacts to match the target hierarchy ensures that the RPM preserves the correct file system layout during installation.
The files in buildroot are later put into the RPM payload. This payload becomes the main part of the RPM. When the RPM package is installed on the end user’s system, these files are extracted in the root directory, preserving the correct hierarchy.
The rpmbuild program has its own defaults. Overriding these defaults can cause certain issues. Therefore, avoid defining your own value of the buildroot macro. Use the default %{buildroot} macro instead.