Aleksandar Milivojevic wrote:
Quoting Jim Smith jim_smith2006@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@milivojevic.org
%_signature gpg %_gpgbin /usr/bin/gpg %_gpg_path /home/alex/.gnupg %_gpg_name alex@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
I just use this quick procedure:
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
Quoting Bowie Bailey Bowie_Bailey@BUC.com:
I just use this quick procedure:
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
Yeah... sure... If you can live with the mess you get with that directory structure ;-)
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On Friday 30 December 2005 16:52, Aleksandar Milivojevic wrote:
Quoting Bowie Bailey Bowie_Bailey@BUC.com:
I just use this quick procedure:
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
Yeah... sure... If you can live with the mess you get with that directory structure ;-)
If you're only building half a dozen to a couple of dozen RPMs, this structure works just fine. I released PostgreSQL RPMs for five years doing it that way. At the same time, I built several other RPMsets, both for release and for personal use, small and large packages alike (including kernels for non-Intel archs from source RPM)....
If you're building a distribution, you need something much more sophisticated, for sure. But for a handful, this is the easy way to do it.
Quoting Lamar Owen lowen@pari.edu:
If you're only building half a dozen to a couple of dozen RPMs, this structure works just fine. I released PostgreSQL RPMs for five years doing it that way. At the same time, I built several other RPMsets, both for release and for personal use, small and large packages alike (including kernels for non-Intel archs from source RPM)....
If you're building a distribution, you need something much more sophisticated, for sure. But for a handful, this is the easy way to do it.
I've burned myself once with that directory structure. Two different SRPMs having a helper file with same name. Took me a bit of time to figure out what happened. Spent rest of the afternoon googling around how to make voodoo doll (if however came up with that directory structure felt some sudden pain couple of months ago, it was me ;-)
If all you need is to build a package or two from time to time, I guess it will serve you more or less fine (until you shoot yourself into a foot). You are not going to see the mess. I guess doing "rm *" in SOURCES and SPECS directory from time to time will be normal routine. Hack, Jim says there's even a package in Fedora extras that has some obscure command that basically simply does "rm *". I like to have things a bit more organized even on systems where I build a package or two once a month.
But, it's all personal preference, after all. I guess. So, whatever works for you. Oh, and I mastered the art of making voodoo dolls ;-)
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.