include("site.inc"); $template = new Page; $template->initCommon(); $template->displayHeader(); ?>
This chapter covers:
Running RPM on other operating systems
Bootstrapping RPM on other operating systems
Setting up the RPM environment
Creating non-Linux RPMs
Setting up an RPM build environment
Cross-building packages
RPM was originally designed on Linux and for most of its life has been a Linux-centric package management system. But most Linux programs are portable to most versions of Unix or Unix -like operating systems. Linux is, after all, a Unix-workalike operating system.
The RPM system is no exception. It has been ported to a number of operating systems, including quite a few Unix variants. The source code is freely available, so you can port RPM to other systems as well.
This chapter covers running RPM on non-Linux operating systems, including getting the RPM system in the first place, bootstrapping an RPM environment, and creating packages for other operating systems.
The first step is to get RPM for your system, or port RPM if it isn’t already available.
The RPM system, made up of mostly the rpm and rpmbuild commands, have been ported to a number of operating systems. There is nothing stopping you from running the RPM system on other platforms.
Other operating systems have their own native package management software. You may prefer the way RPM works, or merely want to standardize on RPM across all platforms you manage. There will always be a few issues, however, when running RPM on other operating systems. For example, operating system patches and updates are likely to be distributed in the operating system’s native package management format, not RPM. Many applications will be updated also using the system’s native package management format.
You will need to always keep in mind that there are two package management schemes in use: RPM and the native one. This issue has not stopped a great many people from using RPM on other systems, though, as shown by the list of platforms RPM has been ported to (see Table 20-1 for the list).
On the plus side, package management has always been one of the main areas where versions of Linux, Unix, and other operating systems differ, sometimes quite a lot. By using RPM, you can transfer your knowledge of package management from one system to another, saving valuable time and hassles. You will be able to update systems in the same manner, a big plus if you manage a diverse set of systems.
Another reason to use RPM on other operating systems is that in most cases, RPM provides far more capabilities than the native package management software. Following the RPM philosophy, each package can be separately verified, checked, and updated. Each package lists the other packages it depends on, and also lists the capabilities it provides. You can automate the installation and upgrade processes with RPM. You can also perform a lot of version and signature comparisons. All of this leads to a more secure, more robust system.
Many operating systems don’t include these capabilities in the native package management software. This is why many users run RPM on other operating systems.
Cross Reference
See Chapter 2 for more on the philosophy behind RPM.
If you decide to use RPM on a non-Linux system, the first step is getting RPM for your system, if it is available.
The first step to using RPM on non-Linux platforms is getting the RPM system for your platform. In most cases, this is a relatively easy step, as RPM has been ported to a great many platforms, as listed on the main RPM Web site.
Cross Reference
Links to RPM versions for various platforms are listed at www.rpm.org/platforms/.
Go to this site and download the versions for the platforms you need. Table 20-1 lists the platforms RPM has been ported to, as reported by the RPM site.
Table 20-1 Available Platforms for RPM
Platform | Notes |
AIX | |
AmigaOS | With GeekGadgets |
BeOS | With GeekGadgets |
FreeBSD | |
HP-UX | 10.20+, 9.04 |
IRIX | |
Linux | Multiple platforms including Alpha, Intel, Motorola 68000, SGI MIPS, PowerPC, and SPARC |
LynxOS | |
MachTen | |
MacOS X | |
Mint | |
NCS System V | |
NetBSD | |
OS/2 | |
OSF/1 | 3.2+ |
SCO OpenServer | 5.0.2+ |
Sinix | |
Solaris | Solaris for SPARC 2.4 and 8+, Solaris for Intel |
SunOS 4.1.3 | |
Windows | Under Cygwin |
Note that RPM has likely been ported to even more platforms. These are just the ones reported to the rpm.org site.
Note
If you fix a bug in RPM on a non-Linux system, or if you port RPM to a new system, please report this to the rpm.org site maintainers, as well as make your work available for others. You never know, but someone else may fix a problem you’re facing.
If Table 20-1 does not cover the platforms you need, you must compile and bootstrap the RPM environment for your platforms, as covered in the "Bootstrapping RPM on Other Operating Systems" section, following.
Note
Don’t expect to find RPMs of the RPM system for these other platforms. If you did, there would be no way to install RPM. Instead, you’ll find RPM packaged in a variety of formats, typically using a native bundling format for a given system, or at least a supported format. Compressed tar files are very common. RPM for IRIX systems come in IRIX tardist format.
If RPM is available for your system, download the package and follow any installation instructions that come with the package. For example, RPM for Solaris 8 requires the libiconv library, as well as the Solaris packages SUNWzlib and SUNWbzip. You must install these packages prior to installing RPM.
Each operating system will have similar requirements. Windows systems have a few extra requirements due to the fact that Windows is very different from Linux or Unix-like systems.
The version of RPM for Windows requires cygwin, originally the Cygnus port of many Unix tools to Windows. Now part of Red Hat, you can download the cygwin environment from the main cygwin site.
Cross Reference
Download cygwin from www.cygwin.com.
You can download a setup.exe program to install the environment on Windows. After installation, you can download the RPM system for Windows.
After you have RPM installed, you can set up your RPM system. If RPM wasn’t already ported to your operating systems, however, you will need to bootstrap RPM on your platforms.