What is wrong in this spec file?

Warren Togami wtogami at redhat.com
Fri May 6 23:27:32 UTC 2005


Peter Jones wrote:
> 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 .
> 

You can do this, or just install fedora-rpmdevtools from Extras and run 
"fedora-buildrpmtree" as a non-root user.

Warren




More information about the fedora-devel-list mailing list