Understanding how rpmbuild works

The RPM logic seems to be very different from what I know, and I am having some problems with the “RPM logic”. For my work, I have to create documentation on "How to Create an RPM Package on Red Hat 5".

I'm used to Debian and its derivatives (Ubuntu, etc.) and therefore to Debian packages (aka .deb ).

From what I read, it seems like you need root to create an RPM package. Although I understand why root may be required to install a package, I still do not understand why higher privileges are needed just to create it.

If I try to create an RPM package as a user by modifying buildroot , it will fail in the %install step because I do not have permission to write files to /usr/bin . Fair enough, but ... why does he want to copy my files to /usr/bin at this step ?! I just want to create a package, not install it!

I'm sure something is missing here. Is there anyone who could give me at least a basic understanding of how rpmbuild works and why?

+4
source share
3 answers

Will this do?

+1
source

You do not need to be root to create RPM packages. I recommend that you read this two-part article to get you started.

+1
source

The official RPM Maximum Book also contains an RPM chapter that uses a different build area that allows non-root users to create RPMs.

+1
source

Source: https://habr.com/ru/post/1309533/


All Articles