Am Fr, den 29.04.2005 schrieb Ralph Blach um 15:41:
> yes buildroot is set in the .spec file, but the problem is that
> buildroot as specified belongs to root, and I wnat to build as non root
Then the .spec file is broken. The %buildroot path is normally always a
relative path.
> I tried two experiments,
> 1)Simply setting a short .rpmmacros file
> 2)Editing the default .rpmmacros file
What do you call "default .rpmmacros file"? There is no such default
file, you have to create it your own when creating an rpmbuild
environment for a mortal user.
> to get any building to work, one must edit the default .rpmmacros
>
> So here is the top of .rpmmacros file
> %buildroot /home/rcblach/redhat/var/tmp/%{name}-root
> %_usr /home/rcblach/redhat/usr
> %_usrsrc %{_usr}/src
> %_var /home/rcblach/redhat/var
>
> by the way, yours worked also, if it is prepend to the .default
> .rpmmacros file.
I didn't experiment, but wouldn't wonder if your %buildroot definition
in the .rpmmacros file will be overridden by any definition inside a
.spec file.
At least your setup is very unusual. Please see
http://www.rpm.org/hintskinks/buildtree/
for instructions how to properly create non-privileged user rpmbuild
environments.
> So there must be macros in the .rpmmacros file which are necesssary.
Yes, the %_topdir has to be set to point to a different directory than
/usr/src/redhat, because that directory structure is owned by root. The
custom %_topdir then must contain the same directories as
/usr/src/redhat does. Thats all.
> Chip
Alexander
--
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.14_FC2smp
Serendipity 15:51:20 up 17 days, 12:31, load average: 0.46, 0.26, 0.14
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil