4

It seems that the RPM logic is quite different from what I know already and I am having some issues understanding the "RPM logic". For my work, I have to create a documentation on "How-to create a RPM package on Red Hat 5".

I'm used to Debian and it's derivatives (Ubuntu, and so on) and thus to Debian packages (aka. .deb files).

From what I read, it seems that ones need to be root to create a RPM package. While I understand why root could be required to install a package, I still don't understand why elevated privileges should be needed just to create one.

If I try to create a RPM package as a user, changing the buildroot it fails on the %installstep because I don't have permission to write files into /usr/bin. Fair enough but... why does it want to copy my files into /usr/bin at this step?! I just want to create the package, not install it!

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

bignose
  • 30,281
  • 14
  • 77
  • 110
ereOn
  • 53,676
  • 39
  • 161
  • 238

3 Answers3

1

Will this do?

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
1

You don't need to be root to build RPM packages. I recommend you to read this two part article to get you started.

Bozhidar Batsov
  • 55,802
  • 13
  • 100
  • 117
1

The official Maximum RPM book also has a chapter on Having RPM Use a Different Build Area, which allows non-root users to build RPMs.

bignose
  • 30,281
  • 14
  • 77
  • 110