This page describes how to use RPM on a PureDarwin system.
RPM is the package manager and package format used by Red Hat, Novell/SUSE, Mandriva, and other Linux distributions.
It is located at http://rpm.org/
RPM5 is a branch of RPM located at rpm5.org.
Although both have common roots, it is not the branch of RPM that is used by Red Hat, for example.
It is located at http://rpm5.org/
More about the differences can be found here, for example.
MacPorts provides ports for RPM. However, there is a chicken-and-egg problem because RPM and its dependencies need to be installed before RPM can be used itself.
port search rpm
apt-rpm sysutils/apt-rpm 0.5.15lorg3.93 Automatic updater and package installer/remover for RPM
rpm sysutils/rpm 4.4.9 The RPM package management system.
rpm50 sysutils/rpm50 5.0.3 The RPM package management system.
rpm51 sysutils/rpm51 5.1.4 The RPM package management system.
The rpm package from rpm5.org is a self-contained bundle that comes with all the dependencies that are not part of Darwin itself.
However, even after it has been installed it says "package rpm is not installed". Bug?
To install RPM5 on a PureDarwin system, do the following:
This installs RPM5 to /usr/local/bin/rpm. The RPM database is located at /var/local/lib/rpm/.
Make sure the following depenencies are met on the PureDarwin system:
Follow the instructions on the MacPorts page and use /opt/local/bin/port rpm someproject.
Should you get an error about missing parts, then do /opt/local/bin/port unarchive someproject before.
To run commands on RPMs that are not installed yet, add the p option as shown below.
Problem: Each package fails to install with the message "org.macports.darwin9 is needed".
Solution: Satisfy the dependency to org.macports.darwin9 by installing the RPM below. This is a dummy package that contains no actual software but tells the RPM database about the Darwin base system (specifically, the parts installed from DarwinBuild rather than MacPorts). It is based on http://svn.macports.org/repository/macports/users/afb/macosx-base.spec and was built with rpmbuild -bb macosx-base.spec. (Todo: Check what the OpenDarwin 7 CD did. Deleting that line from portrpm.tcl might also be an option.)
Problem: When trying to install a package, RPM complains that directories are missing that are either part of the base system or should be part of the package that is about to be installed.
bash-3.2# ls /opt/local/
bin/ etc/ include/ lib/ share/ src/ var/
bash-3.2# rpm -ivh /libiconv-1.12-0.i386.rpm error: Failed dependencies:
/opt/local/bin is needed by libiconv-1.12-0.i386
/opt/local/include is needed by libiconv-1.12-0.i386
/opt/local/lib is needed by libiconv-1.12-0.i386
/opt/local/share/doc/libiconv-1.12 is needed by libiconv-1.12-0.i386
/opt/local/share/man/man1 is needed by libiconv-1.12-0.i386
/opt/local/share/man/man3 is needed by libiconv-1.12-0.i386
Solution: As a workaround, use rpm -ivh --noparentdirs somepackage.rpm
Sometimes, if you really know what you are doing, --nodeps might also be helpful.
Final solution may be related to this - please let us know.
Problem: When using RPM a lot, the disk fills up quickly.
Solution: By default, RPM5 saves any RPM that you uninstall in /var/local/spool/repackage/.
This can be disabled by changing %repackage_all_erasures to 0 in
afb from #macports contributed knowledge to this page.
For developers >