Software to add ?

Michael A. Peters mpeters at mac.com
Mon Oct 10 22:58:28 UTC 2005


On Mon, 2005-10-10 at 22:53 +0200, Eric Tanguy wrote:

> > 
> Ok so i modified the spec file and the first thing i need is to
> construct a src.rpm file from the files i need. How can i do that ?
> After that i will try rpmlint to see what will be the errors and the
> warnings. Is it a good way ?

1) make sure you build as a normal user, not root. That means you need a
local use rpm environment. This will create it:

cd ~
mkdir -p rpm/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}
mkdir -p rpm/RPMS/{i386,i486,i586,i686,athlon,noarch}

Then create a .rpmmacros file

cat <<EOF > ~/.rpmmacros
# default .rpmmacros file for user accounts
%_topdir        %(/bin/echo $HOME)/rpm
%_tmppath       %_topdir/tmp
EOF

Your sources (including patches) go in ~/rpm/SOURCES/
Your spec files go in ~/rpm/SPECS/

You build a src.rpm from a spec file with

rpmbuild -bs foo.spec

You can then run rpmlint on - then test build it:

rpmbuild --rebuild ~/rpm/SRPMS/foo.src.rpm

As a final test, you should build it in mock.
There's a mock howto in the wiki.

There's also free documentation for how to use rpm - I think its called
"Maximum RPM" unless it has changed its name - it's what I learned from
eons ago.




More information about the fedora-extras-list mailing list