[CentOS] RPMS's rebuilt or upstream one's used

Aleksandar Milivojevic alex at milivojevic.org
Fri Dec 30 21:29:31 UTC 2005


Quoting Jim Smith <jim_smith2006 at yahoo.com>:

> Ah yes something else i forgot about(which i build
> from upstream) was the fedora-rpm tools, which allow
> you to build rpm's as non-root.

You don't need any additional tools to build RPMs as normal user.  You 
just need
to create .rpmmacros file in your home directory.  See below for an 
example. You'll need to create ~/rpm/build and ~/rpm/tmp directories.  
When you have
those directories created and .rpmmacros file in place, you just "rpm -ihv
source.rpm" (as yourself, not as root) go to the ~/rmp/pkgname-ver-rel
directory and do "rpmbuild -options-here pkgname.spec".

Example of ~/.rpmmacros file:

%packager               Aleksandar Milivojevic <alex at milivojevic.org>

%_signature             gpg
%_gpgbin                /usr/bin/gpg
%_gpg_path              /home/alex/.gnupg
%_gpg_name              alex at milivojevic.org

%_topdir                /home/alex/rpm
%_tmppath               %{_topdir}/tmp
%_builddir              %{_topdir}/build

%_rpmtopdir             %{_topdir}/%{name}-%{version}-%{release}
%_sourcedir             %{_rpmtopdir}
%_specdir               %{_rpmtopdir}
%_rpmdir                %{_topdir}/RPMS
%_srcrpmdir             %{_topdir}/RPMS
%_rpmfilename           %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the CentOS mailing list