On Wed, Aug 17, 2005 at 01:12:33PM +0530, shekhar vaggu wrote: > Hi All, > > I have a basic question on building rpm packages as a non-root > user.Suppose if I want to place all my binaries under /usr/loca/bin/ > and man pages under /usr/local/man which are owned by root by > default.Say If we include /usr/local/bin/cdplay and > /usr/local/man/man1/cdp.1 in %files section rpm looks for these files > to bind in binary rpm under the specified locations right? To include > these files in binary rpm files should be copied from our build > location to the destination location which we can't do as a normal > user.How this can be done when building packages as a non-root > user.One thing I know is this can be accomplished by using buildroot > variable in spec file. Hi Shekhar, You should set up your own build root using the ~/.rpmmacros file: [me@myserver me]$ more .rpmmacros %packager Ben Fitzgerald <me@xxxxxxxx> %_topdir /export/home/benf/redhat %_builddir %{_topdir}/BUILD %_rpmdir %{_topdir}/RPMS %_sourcedir %{_topdir}/SOURCES %_specdir %{_topdir}/SPECS %_srcrpmdir %{_topdir}/SRPMS %_tmppath /var/tmp %_buildroot %{_tmppath}/%{name}-root This way you use your temp build root, say %_builddir/cdplay/ to put stuff in, e.g. %_builddir/cdplay/usr/local/man/man1/cdplay.man You can create + write to the above because it's under your home directory. Never create an rpm as root or you are waiting for the time you recursively remove root on %clean! I would not trust myself... HTH, ben. -- Registered Linux user number 339435 _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list