What is wrong in this spec file?
Peter Jones
pjones at redhat.com
Thu May 5 19:54:33 UTC 2005
On Wed, 2005-05-04 at 22:28 +0200, Rakotomandimby (R12y) Mihamina wrote:
[lots of stuff]
So, lots of people have already told you to use a BuildRoot, and they're
correct. Mathew Miller also said that you'd be better off not using the
"root" user to build. He's absolutely correct, so I figure that the
instructions for this don't hit the list often enough, so here's a
simple guide to doing so:
1) log in as a non-root user. I like "pjones" for that, but suit
yourself ;)
2) create a .rpmmacros file. In it, put something like:
%_topdir /home/pjones/build
%_tmp %{_topdir}/tmp
%_tmpdir %{_tmp}
%_tmppath %{_tmp}
3) make some directories:
cd /home/pjones
mkdir build
cd build
mkdir RPMS SPECS SOURCES BUILD SRPMS tmp
4) test that everything's right:
rpm -Uvh foo-1-1.src.rpm
cd ~/build/SPECS/
rpmbuild -ba foo.spec
It should start doing the obvious build stuff. When it's done, it'll
write packages out to ~/build/RPMS/$ARCH/foo-1.1.$ARCH.rpm, just like it
used to do in /usr/src/redhat .
--
Peter
More information about the fedora-devel-list
mailing list