Once RPM program is installed, it is a gateway to thousands of RPM packages which can be easily installed on the system.
Prepare the rpm directories
bash# su - root bash# mkdir -p /usr/local/src/redhat/BUILD bash# mkdir -p /usr/local/src/redhat/RPMS/sparc64 bash# mkdir -p /usr/local/src/redhat/RPMS/noarch bash# mkdir -p /usr/local/src/redhat/SOURCES bash# mkdir -p /usr/local/src/redhat/SPECS bash# mkdir -p /usr/local/src/redhat/SRPMS
You may want to edit the rpmrc file. In case of solaris 8, I had to remove the -m64 option for gcc, since it was giving compile errors. To show the values, RPM will use for all of the options that may be set in rpmrc files (/usr/local/lib/rpm/rpmrc, /usr/lib/rpm/rpmrc, /etc/rpmrc, /.rpmrc ), type:
bash$ rpm --showrc | less
Before building rpms you need the following basic programs:
bash# mkdir $HOME/localtmp bash# cd $HOME/localtmp bash# gzip -d libtool*.tar.gz bash# tar -xvf libtool*.tar bash# ./configure --with-prefix=$HOME/localtmp bash# make; make install
bash# PATH=$HOME/localtmp/bin:$PATH bash# export PATH
There are few basic rpms which must be installed before any other rpm is installed. In this section, foundation rpms are listed which are found by using:
bash# rpm -qR <packagename> bash# rpm -qR textinfo bash# rpm -qR fileutils bash# rpm -qR setup
The foundation rpms in the order of dependency are as follows:
Second stage foundation rpms are as follows. After installing the foundation rpms, next important rpm is gcc, the order of rpms you need is:
Third stage rpms are as follows:
As from previous section you should have exported temp location of autoconf, gcc and other programs by:
bash# PATH=$HOME/localtmp/bin:$PATH bash# export PATH bash# rpm -i fileutils*.src.rpm bash# rpm -i zlib*.src.rpm bash# rpm -i texinfo*.src.rpm bash# cd /usr/local/src/redhat/SPECS bash# rpm -ba fileutils.spec
After the build is successful, install it with "nodeps and excludedocs" to minimize the failures. After substantial installations of many foundation rpms you can "freshen" the rpms with rpm command.
bash# cd /usr/local/src/redhat/RPMS/sparc64 bash# rpm -i --nodeps --excludedocs fileutils*.rpm
On Solaris 2.8, I encountered following problems which were fixed by correcting the spec file:
%define Rpmpath /usr/local %define __spec_install_post %{Rpmpath}/lib/rpm/brp-strip \; %{Rpmpath}/lib/rpm/brp-strip-comment-note \; rm -f %build %define _mandir %{_prefix}/share/man %define _infodir %{_prefix}/share/info %configure %install #mkdir -p ${RPM_BUILD_ROOT}/{etc,sbin} .....this line is causing problems mkdir -p ${RPM_BUILD_ROOT}/etc mkdir -p ${RPM_BUILD_ROOT}/sbin
%files # replace below line #/usr/bin/* # with the line given below %{_prefix}/bin/*
%files # replace below line #/usr/bin/* # with the line given below %{_prefix}/bin/*