Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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 editor...like 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

...to create both the rpmbuild and rpmbuild/tmp/ directories.

share|improve this answer
    
Thanks for your help clearing things up. –  Rodgers and Hammertime Aug 29 '12 at 10:15
add comment

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
add comment

Your Answer

 
discard

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.