Building RPM’s – making a build environment



I’m going to do a few articles on building RPM’s as much for my own reference as anyone elses. I’m not an expert on the subject by any means… I do this from time to time, rebuild an rpm for an older system (or even a newer system that doesn’t have an official rpm for.) I have a tendency to forget things that I don’t do frequently. The first part of being able to rebuild rpm’s is to have what’s called a build environment. For starters, I’m using Mandriva 2006 (older versions I used Mandrake 10.1 or 10.0, etc.) In your home directory you need a folder called rpm.


In that folder you need subdirectories called:
BUILD
RPMS
SOURCES
SPECS
SRPMS
tmp

the RPMS folder needs to have subfolders as well:

noarch
i586

At this point you just need to have 2 configuration files in your home directory:

.rpmrc which should have the following:
buildarchtranslate: i386: i586
buildarchtranslate: i486: i586
buildarchtranslate: i586: i586
buildarchtranslate: i686: i586

and .rpmmacros which should contain this:
%_tmppath YOUR_HOME_DIR/rpm/tmp

%_signature gpg
%_gpg_name Mandrakelinux
%_gpg_path ~/.gnupg

%distribution Mandriva Linux
%vendor Mandriva

Make sure to adjust the path correctly. A Mandriva user even has a quite script to do all the above for you… it’s here setup4rpm.sh Once this is done you’ve got all the folders you need.

The only other bit of advice I can give on the environment for rpm building. IF the packages are intended for others, try to keep the system as close to an “official” mandriva system as possible, try not to have requirements that would have users hunting for obscure non-mandriva packages. Ideally packages for public consumption with Mandriva should just have Main/contrib/updates requirements (maybe plf depending on what it is I suppose….) For your own use though, it’s up to you how “clean” your build system is.

Related Posts

Blog Traffic Exchange Related Posts
  • Firefox 1.5.0.4 RPMS for Mandriva 2006 Just an update to let you know I've recompiled the src rpm's from Cooker for Mozilla 1.5.0.4 (For Mandriva 2006) and am uploading them to a subdirectory in http://www.averyjparker.com/wp-content/downloads/firefox/. (Look for the Mozilla-Firefox-1.5.0.4 subdirectory... thought it would be fairly obvious.) Anyway, I've put the src rpm in a subdirectory mysteriously......
  • Building Deb packages from source.... Openvpn has been one of the tools of choice this week, so as I was tinkering on my ubuntu boxen.... I thought why don't I install openvpn there as well for a little broader testing. So, I did, but was a bit disappointed to see that the version was not......
  • The 2nd journey begins… Mandriva 2006 upgrade 2 - Part 6 OK - there may be those that read the last entry and had some obvious "oh, you ought to look in the ***** directory for menu information." On the issue I ran into with missing menu items after the upgrade. (And even after moving my .kde folder to .kdeold and......
Blog Traffic Exchange Related Websites
  • An Introduction To Wind Power We all know how important it is to preserve our environment and conserve natural resources. This has led to an unprecedented level of interest in using wind power and other types of alternative energy. However, a lot of people really aren't sure how wind power actually works. In fact,......
  • Green Building Recap 10.14.10 Here's a bit of green building news I found surfing around this week - some news, some building info. Follow me on Twitter and Facebook for daily newsfeeds! > Before Dow Chemical came along about 1920, many things, from Levi jeans to buildings, were made of hemp. We are not......
  • 3 Tips For How To Get Site Visitors And Hyperlink-Building To Your Web Site Doing business on the Internet isn't much different from doing business wherever else. If you are active and creative you will get success. If you happen to have these two qualities it will be wise to use them to construct site visitors to your website. How to get traffic to......
en.pdf24.org    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site