[CentOS] Building packages using RPMBUILD
Robert Heller
heller at deepsoft.com
Thu Dec 16 20:50:44 UTC 2010
At Thu, 16 Dec 2010 15:34:33 -0500 CentOS mailing list <centos at centos.org> wrote:
>
> On 12/16/2010 3:20 PM, Nico Kadel-Garcia wrote:
> > On Thu, Dec 16, 2010 at 11:00 AM, Leonard den Ottolander
> > <leonard at den.ottolander.nl> wrote:
> >> Hello Keith,
> >>
> >> On Thu, 2010-12-16 at 15:08 +0000, Keith Roberts wrote:
> >>> [rpmbuilder at karsites sox]$ rpm -iv ./sox-12.18.1-1.src.rpm
> >>> error: cannot write to %sourcedir /usr/src/redhat/SOURCES
> >> /usr/src/redhat and sub dirs are owned root.root. If you want to build
> >> as a normal user (and you should!) you should fix the ownership of those
> >> directories.
> > NO. Never do this.
> >
> > Use a personal .rpmmacros file to reset your personal working
> > directories, so you can compile locally.
> >
> > %_topdir /home/username/rpm
>
> Here are the steps I use:
>
> mkdir $HOME/rpm
> mkdir $HOME/rpm/SOURCES
> mkdir $HOME/rpm/SPECS
> mkdir $HOME/rpm/BUILD
> mkdir $HOME/rpm/SRPMS
> mkdir $HOME/rpm/RPMS
> mkdir $HOME/rpm/RPMS/i386
> echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros
>
> You may also want an x86_64 directory depending on what you are building.
Some packages will want a i486, i586, i686, and/or athlon directory.
Oh, you will need a noarch directory also.
>
--
Robert Heller -- 978-544-6933 / heller at deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments
More information about the CentOS
mailing list