rpmbuild command.
Run rpmbuild as a non-root user
rpmbuild command as a non-root, normal, user. If you build a package as the root user, possible mistakes in the spec file, for example in the %install section, can cause damage to your system.
Procedure 2.3. Building an example package: eject
~/rpmbuild/SOURCES/ directory.
~/rpmbuild/SPECS/ directory.
~/rpmbuild/SPECS/ directory and run the rpmbuild command:
cd ~/rpmbuild/SPECS rpmbuild -ba eject.spec error: Failed build dependencies: libtool is needed by eject-2.1.5-0.1.x86_64
yum install -y libtool %install section, you may want to skip earlier stages of the build process with the --short-circuit option and restart the build process at the %install stage:
rpmbuild -bi --short-circuit eject.spec rpmbuild output will be as follows:
+ exit 0
rpmbuild -ba eject.spec command, the binary package will be placed in a subdirectory of the ~/rpmbuild/RPMS/ directory and the source package will be placed in ~/rpmbuild/SRPMS/.
.src.rpm), run the following command:
rpmbuild -bs eject.spec ~/rpmbuild/SRPMS/ directory, or recreate it if it has been previously created.