Index

1. How can I create binary RPMs without source codes?

Usually you have to be root to create RPMs, since the default directory is /usr/src/redhat etc. You can avoid becoming root by adding a single file called .rpmmacros in your home directory. Here is the content of the file:

%packager       Yasunari Tosa
%vendor         Mass General Hospital NMR Center
%_topdir        /home/tosa/rust/

where _topdir specfies the directory where the RPM creation occurs. Under this directory, you create SPECS (where spec files are kept), SOURCES (where .tar.gz files are kept), BUILD (where build occurs), RPMS (built rpms are saved), and SRPMS (built source rpms are saved). Once you have this file, then source rpm installs go into this directory. Note that RPM install still go to the appropriate directory.

In order to create a binary only RPMs, you have to write a spec file which contains empty %build and %install section contains only creating directories for install and copying. However, if you have many files, this is really a pain to write all these. Fortunately, there is a package called rust which does this for you. Unfortunately, the package is out-of-date and it contained a few bugs in sourceforge.net.

I modified it to make it work on RH9, RHEL3, or Fedora and you can find the src rpm and the RH9 binary version. I communicated to the author, but he has not done the fixing at sourceforge.net site. Once it created the source rpm, you may want to install it to edit the spec file to be more suitable content. You rebuild it by rpmbuild -ba (specfile).

2. Can you give me more info on RPM?

The official web side is http://www.rpm.org. The latest book on RPM is RedHat RPM Guide by E. Foster-Johnson (2003, Wiley Publishing) ISBN 0-7645-4965-0 $50. The older one (slightly outdated) but free: Maximum RPM by E.C. Bailey. Currently install rpm is separated from build rpm (rpmbuild). The rpm.org web page has the pdf version link and its updated CVS version.