Antonello Piemonte
email (remove the pig noise): apiemont at SNORT googlemail dot com
By default, to build RPM packages one needs to be root
under the /usr/src/redhat
directory.
To avoid that, give the following command under root:
chown -R username /usr/src/redhat
However, you can build RPM packages in any directory owned by
username
by putting the following line in
~/.rpmmacros
:
%_topdir /home/username/rpm
You must then create additional subdirectories as follows:
cd /home/username/rpm mkdir SOURCES SPECS BUILD SRPMS mkdir -p RPMS/i386 RPMS/athlon RPMS/i486 RPMS/i586 RPMS/i686 RPMS/noarch
A prerequisite is that the package rpm-build must be installed on the system. Having said that, install the .src.rpm file
rpm -i somepackage-1.0-1.src.rpm
This will create files in /usr/src/redhat/SOURCES
and a .spec file in /usr/src/redhat/SPECS
.
Then go the SPECS directory and give the command to build the RPM:
cd /usr/src/redhat/SPECS rpmbuild -bb somepackage.specthe rpm package will be in
/usr/src/redhat/RPMS/i386/
install first db3:
#rpm -ivh db3-3.1.17-4.6x.i386.rpm #rpm -ivh db3-utils-3.1.17-4.6x.i386.rpmthen upgrade popt (use -F since older version was already installed)
#rpm -Fvh popt-1.6.2-6x.i386.rpmthen backup var/lib/rpm* and /usr/lib/rpm* and clean up a bit ...
# rpm -e rpm-build # rpm -e rpm-devel # rpm -e up2date # rpm -e rpm-python # rpm -e rpmdb-redhatthen install rpm and soon after rebuild the database!!
# rpm -Fvh rpm-4.0.2-6x.i386.rpm # rpm --rebuilddbthat's it, enjoy!
This page last modified July 25, 2003 |
![]() |
![]() |