RPM on MacOS X

Preparation

First you need to install rpm from a tarball. If you have not yet activated the root account, activate it by following the instruction given here so that you can "su" to root.
# su
# gnutar -zxvf tgz/rpm-4.0.2-0.34b-bin.tar.gz -C /
# setenv PATH $PATH\:/usr/local/bin
# rpm --initdb
Now various rpm facilities should be usable.

Optionally you can reinstall the RPM itself from rpms:

# rpm -ivh RPMS/ppc/bash-2.03-1a.ppc.rpm
# rpm -ivh RPMS/ppc/bzip2*-1.0.1-3a.ppc.rpm
# rpm -ivh RPMS/ppc/ncurses*-5.0-10a.ppc.rpm
# rpm -ivh RPMS/ppc/readline*-4.1-8a.ppc.rpm
# rpm -ivh RPMS/ppc/info-4.0-1a.ppc.rpm
# rpm -ivh RPMS/ppc/texinfo-4.0-1a.ppc.rpm
# rpm -ivh RPMS/ppc/db3*-3.2.9-1a.ppc.rpm
# rpm -ivh RPMS/ppc/popt-1.6.2-0.34b.ppc.rpm
# rpm -ivh RPMS/ppc/rpm*-4.0.2-0.34b.ppc.rpm

Basic Usage

Query

$ rpm -qa                       # to see list of all that installed
$ rpm -qi  foo                  # to get infomation on an installed package "foo"
$ rpm -ql  foo                  # to see list of files belonging to "foo"
$ rpm -qpi bar-1.0-1a.ppc.rpm   # to get information on a pre-installed rpm package
$ rpm -qpl bar-1.0-1a.ppc.rpm   # to see list of files belonging to "bar-1.0-1a"
$ rpm -qf  <filename>           # to check what RPM package owns the file

Installation / Uninstallation

$ rpm -ivh bar-1.0-1a.ppc.rpm                # to install "bar-1.0-1a"
$ rpm -Uvh foo-1.0-2a.ppc.rpm                # to update "foo"
$ rpm -Uvh --oldpackage foo-1.0-1a.ppc.rpm   # to revert this
$ rpm -e   foo                               # to eliminate "foo"

 

Update Record

2001/04/02    Release 0.34w: rpm version 4.0.2 built on MacOS X Public Beta
2001/04/21    Release 0.34a: rpm version 4.0.2 built on MacOS X Release 10.0.01 with some bug fixes: 2001/04/25    Release 0.34b: rpm version 4.0.2 built on MacOS X Release 10.0.01 with previously missing /var/local/{lib/rpm,tmp}:


Back to Keisuke Fujii's HEP on X Page
fujiik@jlcuxf.kek.jp March 18, 2001