I have been following the MaximumRPM guide from here: http://www.rpm.org/max-rpm-snapshot/index.html and it seems a bit dated, but still very good (if fact the best all round documentation I have found so far) on using RPM package manager, and how to build rpm packages. The guide tells me to use the original paths, yet Centos wiki says otherwise. [rpmbuilder at karsites sox]$ rpm -iv ./sox-12.18.1-1.src.rpm error: cannot write to %sourcedir /usr/src/redhat/SOURCES Is there a package I need to install and run to set things up corectly? I have created a user called 'rpmbuilder' under my home dir, and created the rpmbuild dirs under that. So what build dir shall I go for? Kind Regards, Keith Roberts -- In theory, theory and practice are the same; in practice they are not. This email was sent from my laptop with Centos 5.5
Moved from a previous thread :) On Thu, 16 Dec 2010, John Hodrien wrote:> To: CentOS mailing list <centos at centos.org> > From: John Hodrien <J.H.Hodrien at leeds.ac.uk> > Subject: Re: [CentOS] Stripping silent periods from MP3s > > On Thu, 16 Dec 2010, Keith Roberts wrote: > >> Thanks for all the responses! >> >> I've read MaximumRPM from: >> >> http://www.rpm.org/max-rpm-snapshot/index.html >> >> Which helped me a great deal. >> >> I'll start a new thread regarding using RPM to build >> packages. > > You'll find MaximumRPM will have taught you a whole lot > you didn't need to know (not that this is a bad thing). > In this case, it really should have been a case of: > > yum install lame > wget src.rpm > rpmbuild --rebuild src.rpm > rpm -Uvh --force shiny-new-binary.rpm > > No twiddling with the spec file was required, as it > already auto-detected the presence of lame. > > jhThanks for that John. I read MaxRPM once before, so just going over the build part again. I want to be able to build my own Linux/Centos RPM's, and then post them on my website. May even make a 3rd party repo. I obviously know the ./configure, make, make install and autoconf and automake stuff, so doing RPM's and a repo should not be that difficult to work out. Kind Regards, Keith Roberts -- In theory, theory and practice are the same; in practice they are not. This email was sent from my laptop with Centos 5.5
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.> Is there a package I need to install and run to set > things up corectly?redhat-rpm-config sets certain build macros. Although not strictly required you should probably always install this packages. One thing I stumbled on is that a new type of check summing is used nowadays for the content of the rpms. If the correct macro isn't set you might run into installation conflicts, f.e. for multilib doc files.> I have created a user called 'rpmbuilder' under my home dir, > and created the rpmbuild dirs under that.If you make a different user to do builds you should rather give it its own home dir. But you can just as well build using your default account.> So what build dir shall I go for?Whatever you prefer. Just using /usr/src/redhat is probably the easiest. If you want to use a different path scheme you can override the default settings in ~/.rpmmacros to suit your needs. %_sourcedir %{_topdir}/%{name}-%{version} %_binary_filedigest_algorithm 8 Regards, Leonard. -- mount -t life -o ro /dev/dna /genetic/research
On Thursday, December 16, 2010 10:08:12 am Keith Roberts wrote:> Is there a package I need to install and run to set > things up corectly?[snip]> So what build dir shall I go for?See the Fedora packaging guidelines, and install 'fedora-packager' from EPEL to get the tools that help you set up a normal user build environment. This works quite well for the most part, and should work better in 6.
On Thursday, December 16, 2010 11:11:17 am Keith Roberts wrote:> I had already installed the packages mentioned in the Centos > wiki. > > These won't cause conflicts at all with each other?Don't know for sure, but in the case of RPMs I've built on CentOS 4 and 5 in the past they coexisted ok. But I need to double check the wiki to make sure I'm doing it the same way 'recommended'; I've been building my own RPMs for different purposes for a long time (right now 12 years total, and it's been 11 years since the start of my five year stint maintaining the PostgreSQL RPM set, some work of which you're still using if you're still using CentOS 3 or 4 in production), so I'm going to see things from a different point of view than someone who hasn't ever done it. Try it out and see.