~/.rpmmacros and how to view/add to it

12,530

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:
12,530

Related videos on Youtube

Larry B
Author by

Larry B

Updated on September 18, 2022

Comments

  • Larry B
    Larry B over 1 year

    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?