Build RPMs as simple user

It’s not recommended to build your RPMS as root. You can build them as simple user, to accomplish this, you need to create a file called .rpmmacros in your home directory (we’ll assume that your user name is joe and your home directory is /home/joe):

# ~/.rpmmacros
%_topdir /home/joe/rpmbuild
%_tmppath %{_topdir}/tmp

Then create required directories:

[joe@lynx ~]$ mkdir -p ~/rpmbuild/{BUILD,RPMS/{noarch,i386,i586,i686,x86_64},SOURCES,SPECS,SRPMS,tmp}

You are ready to build your RPMS as simple user.

1 comment so far ↓

#1 Install FreeImage on CentOS/RHEL 5 | Sysadmin Tips on 02.09.09 at 11:29 am

[...] ← Build RPMs as simple user [...]

Leave a Comment