Building RPM’s – building for several different releases on one machine



I support a few linux systems outside my own group. Those systems are not as quick to get upgraded to the latest and greatest version of Mandrake – now Mandriva as my home systems. But, I occasionally need to build rpms for them. I don’t want to have a build environment on each one and have to make sure they each have all the devel libraries installed. So what to do?


It’s possible to have one machine be the build environment for each of those systems. The first thing to do is setup some urpmi sources. Now, I will assume that the system you’re working from is relatively current (well even assume 2006)… One problem is that if you use urpmi directly from the current system you will get a chroot of the current system. (There are ways around that – setup media from another version and use the –media option in urpmi.)

But, Mandriva suggests the following… after creating a directory to build in… (as root)

rpm –initdb –root $mychroot
urpmi –root $mychroot basesystem urpmi

I’d suggest rpm-build also (that is after all what the goal of this article is…) You may need to make setup changes to $mychroot/etc/resolv.conf for the chroot to be able to network to the outside world for using urpmi.

One other note is that you may need the following files to exist before sources can be added for urpmi:
/etc/fstab
/etc/mtab
/etc/urpmi/urpmi.cfg
/var/lib/urpmi/MD5SUM

touch /etc/fstab /etc/mtab /etc/urpmi/urpmi.cfg /var/lib/urpmi/MD5SUM

should do the trick.

Run pwconv to unshadow password.

Add yourself a user with useradd.

Then you can chroot into the new environment and setup your rpm build environment as you normally would. I’ve seen a similar approach which installs ssh in the chroot and runs on a non-standard port and then you can ssh into the chroot.

Related Posts

Blog Traffic Exchange Related Posts
  • How to Remove Windows System Defender | Removal Guide Windows System Defender is a new rogue antivirus software along the lines of Windows PC Defender (See the Windows PC Defender Removal guide) (I believe it's the same family of malware.) It claims to be a powerful and effective antivirus and antispyware suite, but will overwhelm you with warnings and......
  • Zotob may affect XP Service pack 1 systems There's an eweek article indicating the zotob family of worms could affect Windows XP SP1 systems as well as the Windows 2000 systems that are currently affected. Since the original outbreak it's been reported that there were certain circumstances that an XP system could be compromised, this seems to back......
  • What is Open Source Open source denotes that the origins of a product are publicly accessible in part or in whole. See Open source (disambiguation) for related topics and other meanings. This article focuses on open source as a modern or commonly used allusion to any open-source software (OSS) where its source code, its......
Blog Traffic Exchange Related Websites
  • Options for Building a Retaining Wall If you have a problem with drainage, or you would like to keep a hill where it belongs, a retaining wall is the perfect solution. There are many different options and materials that you can use when you need to build a retaining wall. Let’s look at some of the......
  • Building The Reef The aquarium is in position and equipment is available. Now comes the most exciting part of all, building the reef and stocking. Reef construction first, of course. The aquarist may have decided that live rock is just too expensive at the moment and has decided to use an alternative bio-filtration......
  • Residential Solar Power - Green Energy Idea In order to make the best decision about residential solar power, several important points need to be considered. Some homeowners may discard the idea of using solar power in their homes just because of the perceived costs associated with purchasing and installing a residential solar power system. Some believe......
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