REBUILD THE RPM FROM SRPM
============================
The pre-requisite packages required are ---
[user@linux ~]$yum groupinstall "Development Tools"
[user@linux ~]$yum install yum-utils
OR
you can install only rpm-build.For CentOS most SRPMs targetted to be rebuilt on CentOS also need certain rpmbuild build macros and helper scripts, which are contained in package: redhat-rpm-config
[user@linux ~]$yum install redhat-rpm-config
[user@linux ~]$yum install rpm-build
The quickest way to rebuild the SRPM is to use the rpmbuild --rebuild command. This command will unpack the SRPM file into the specfile and the source files, and then it will build the RPM from the instructions on the specfile
[user@host ~]$ rpmbuild --rebuild /tmp/mypackage-1.0.0-1.src.rpm
If no error occurs, you can find mypackage-1.0.0-1.i386.rpm file under the ~/rpmbuild/RPMS/<architecture of your system> directory (for 64 bit it is x84_64 if 32 bit then it is i386). For more details read here
CHECK WHAT PACKET OWNS A PARTICULAR FILE
===========================================
[user@host~]$rpm -qf filename
[user@host~]$rpm -qf /usr/bin/crontab
cronie-1.4.4-7.el6.x86_64
CHECK WHAT CONFIGURATION FILE EXISTS FOR A PACKAGE
=====================================================
[user@host~]$rpm -qc packagename
CHECK IF THE FILES INSTALLED BY A PACKAGE ARE STILL IN THE SAME STATE AS THEY WERE WHEN INSTALLED
==============================================================================================
[user@host~]$rpm -qs packagename
This command will display all of the files installed by the package with a notation of "normal," "replaced," "not installed" and so on.
Awesome Guru..... Keep the Spirit Up... waiting for more interesting stuff from you :)
ReplyDelete