[TriLUG] SRPMs on RHL 8.0

Tanner Lovelace lovelace at wayfarer.org
Wed Oct 23 12:46:08 EDT 2002


On Wed, 2002-10-23 at 10:17, Jeremy Portzer wrote:
> Roy Vestal wrote:
> 
> > This brings another question up, could someone post the steps to
> > rebuild the srpms for my box? I know there are others that need this
> > type of help too.
> 
> On Red Hat Linux 8.0, the command is:
> 	rpmbuild --rebuild <filename>.srpm
> 
> You may need to install the "rpmbuild" package.
> 
> On previous versions of RHL, the command is what Tanner already posted, 
> 	rpm --rebuild <filename>.srpm
> (this should work on Mandrake and other rpm-based distros too)

Actually, both version work on Mandrake 9, which is where I spend
most of my time these days. :-)

> With the default configuration, you'll need to run these commands as
> root, and the resulting binary RPMs will be found in
> /usr/src/redhat/RPMS/

No! No! No!  RPMS should *NEVER* be built as root.  You can really
screw up your system this way. 

> It's easy to set up RPM to build in your home directory, too.  I believe
> these instructions have been posted to the list several times before.

Create a file in your home directory called .rpmmacros.  In it, put this
line

%_topdir            /home/<username>/RPM
%_tmppath           /home/<username>/RPM/tmp

(Feel free to change RPM to be whatever you want it to be, it doesn't
matter.)

In the directory you specified, create the following directory
structure

BUILD/
RPMS/noarch/
RPMS/i386/  ]  Note you really only need one of these (see below)
RPMS/i486/  ]
RPMS/i586/  ] 
RPMS/i686/  ]
SOURCES/
SPECS/
SRPMS/
tmp/

To specify which architecture you want to build for, you can, if you
want, add a .rpmrc file in your home directory.  I use one like this:

buildarchtranslate: i386: i586
buildarchtranslate: i486: i586
buildarchtranslate: i586: i586
buildarchtranslate: i686: i586

If you prefer just generic i386 (which, iirc, is mostly what Redhat
uses) you can change the i586 at the end of each line to be i386.

This will allow you to build rpm files in your home directory.

Tanner
-- 
Tanner Lovelace | lovelace at wayfarer.org | http://wtl.wayfarer.org/
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
GPG Fingerprint = A66C 8660 924F 5F8C 71DA  BDD0 CE09 4F8E DE76 39D4
GPG Key can be found at http://wtl.wayfarer.org/lovelace.gpg.asc
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
          Si hoc legere scis, nimium eruditionis habes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20021023/e8918a7e/attachment.pgp>


More information about the TriLUG mailing list