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:
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 PostsRelated Posts
- How to Remove Personal Security | Personal Security Removal Guide Personal Security is a rogue antivirus application that comes from the same (dreaded) family as the Cyber Security rogue. It usually installs on the users computer without the permission of the computer user. Once installed on the system it will then perform supposed scans finding lots of virus infected files......
- The 2nd journey begins… Mandriva 2006 upgrade 2 - Part 10 I think it's time to wrap things up. The KDE start new session option is back after the changes I mentioned to the /etc/kde/kdm/kdmrc file I mentioned in a previous post. There are no outstanding issues from the upgrade. (I need to adjust the font sizes down a bit, but......
- Linux: Using Mandrake (Mandriva's) URPMI tool As background for this, I've used Mandrake Linux (now Mandriva) for my main desktop since around 8.2 I can't remember quite how long ago that's been, but around 3 to 4 years I think. The why is something best saved for another writeup. Early on I was frustrated by installing......
- Build Your Own Sports Memorabilia Collection Some people begin to create a sports memorabilia collection to create a hobby, and other people decide to put together a sports memorabilia collection for the sole purpose of eventually selling their memorabilia off later. Some people, then, specially build up their sports memorabilia collection full of specifically chosen items......
- 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......
- A Daily Plan for Building Wealth Do you have a daily plan for building wealth? A set of activities if repeated often enough would create the lifestyle and life that you desire? Sounds like the beginning of an infomercial doesn't it? Well I am not going to try to see you anything today. Just to get......
- Building RPM’s from Source RPMs
- Building RPM’s – making a build environment
- The 2nd journey begins… Mandriva 2006 upgrade 2 – Part 2
- VMware server usb devices not listed on Mandriva host
- Linux: Using Mandrake (Mandriva’s) URPMI tool