This section shows how to prepare an environment for building RPM packages on your system.
2.1.1. Creating a Non-Root Buildroot
These steps show how to create a non-root buildroot environment. This non-root environment is used to build packages as a normal user, without the need of becoming the root user. Because some of the software source archives can contain code in a makefile or script that can possibly damage your system, it is highly recommended to build packages as a user that does not have full access to the system.
Procedure 2.1. Creating a non-root buildroot
As root, install the rpmdevtools package with the following command:
yum install -y rpmdevtools
As a normal user, run the following command to create the ~/rpmbuild/
directory where packages are built:
rpmdev-setuptree