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?
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