"Vadim V. Zhytnikov" <vvzhy@mail.ru> writes:
...
> Traditionally when binary rpm package
> is built the install stage writes all package
> files into their actual locations
> /usr/bin, /usr/lib ... etc.
Usually (as you write later), the install stage of the rpm building
process puts the files into %buildroot/usr/bin, etc. At least it
does for all the spec files I've seen.
I suppose if you don't put a BuildRoot line in the spec file, the
files will go into /usr/bin, etc., but I haven't seen that in many
spec files.
> This is not very nice
> and safe thing. First, it requires root
> privileges for rpm binary build. Due to this
> if something goes seriously wrong the whole
> system can be damaged. So modern and IMHO
> the only right approach is to build rpms
> by unprivileged user. The main difference
> is that the whole process including install stage
> is performed in user's home directory.
> In particular files are installed in some
> temporary directory
> %buildroot/usr/bin, %buildroot/usr/lib ...
> where %buildroot depends on rpm setup.
> On my system %buildroot=/home/vadim/tmp.
> This works fine with new build system except
> several points where actual installation path is
> inserted into some scripts or variables
> like /usr/bin/maxima script or variables
> which determines path where maxima looks
> for share files. So in my particular situation
> I get extra /home/vadim/tmp appended
> in front of right path.
>
> The ideal solution to the problem is to add
> extra %buildroot option to make install
> which forces installation into %buildroot/...
> but writes paths without %buidroot
> into maxima script etc.
Another problem is that rpm allows (I think) the install to supply an
additional prefix, so you don't have to be root to install.
Could relative paths be used?
Jay