fakeroot alternative for RPM

1.5k views Asked by At

I studying dpkg and rpm package systems. I found in dpkg manuals recommendation to use fakeroot for correct build package as non-root user. But for RPM package i don't found alternative utility. I read several manuals for build rpm packages and they recommend to build rpm package as root, or create special user and use rpm-setuptree utility (of course, may be it manuals is bad).

Have fakeroot alternative for RPM build? And may be for RPM not need fakeroot alternative and using correct build options and spec file help me to avoid all problems?

2

There are 2 answers

0
pwan On BEST ANSWER

I don't know of a fakeroot alternative, but the %attr directive in the %files may be the alternative. See the link below.

http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html

This allows a non-root user to specify the owner and permissions on the package files when the package is installed

1
Ansh Srivastava On

Create a new user. Chmod giving write permissions with subdirectories and files to / to that user only.Create a shell script in which you switch into that user.

I have yet to try this.