Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently following a guide to install Java 1.4 on the CentOS site and was wondering if anyone could help me understand some of the terminology.

It states:

For this example, it will be assumed that the contents of ~/.rpmmacros includes:

%_topdir /home//rpmbuild

%_tmppath %{_topdir}/tmp

Remember to create the ~/rpmbuild/ tree if it has not been created yet, but be aware that your directory is not required to be named "rpmbuild" as in this example (consult your ~/.rpmmacros to know):

Where would ~/.rpmmacros be located and how would I ensure it contained the two lines beginning %?

Additionally how would I create the ~/.rpmbuild/ tree?

share|improve this question
up vote 1 down vote accepted

Where would ~/.rpmmacros be located...

In most Unix shells, ~ is an abbreviation for "your home directory". So ~/.rpmmacros is the file .rpmmacros in your home directory. The contents you have listed...

%_topdir /home//rpmbuild
%_tmppath %{_topdir}/tmp

...are problematic; that first line is meant to be the path to your home directory and should include your username. For example:

%_topdir /home/gharping/rpmbuild

...and how would I ensure it contained the two lines beginning %?

You would use your favorite text vim or emacs or gedit or something similar.

Additionally how would I create the ~/.rpmbuild/ tree?

You use the mkdir command to create directories. From within your home directory, you could run:

mkdir -p rpmbuild/tmp create both the rpmbuild and rpmbuild/tmp/ directories.

share|improve this answer
Thanks for your help clearing things up. – Larry B Aug 29 '12 at 10:15

In my case(CentOS 6.4), I found the list of all macros inside /usr/lib/rpm/macros, just edit the file...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.