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

Is it possible to get the compile options of a yum package? In this particular case, I am trying to get them for the standard BIND installation with CentOS, but if there is a generic way for YUM packages that would be good to know as well.

So to be clear this would be all the options passed during the build process of the bind binaries in the yum package during the compile process.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

The generic way is to download the source RPM and look in the .spec file. Install the yum-utils package, and run yumdownloader --source bind, and then unpack the downloaded source RPM (with either rpm -ivh or rpm2cpio) and look.

Many programs also have an application-specific way of getting compile options. Unfortunately (see comments) the RHEL 5 / CentOS 5 version of BIND does not have any such option, so you're pretty much reduced to looking at the build options in the spec file. Newer versions of BIND, however, do provide a way: run /usr/sbin/named -V for version number and build options. (Many programs happen to follow this -V convention, perl and Apache httpd among them. But it's by no means standard.)

share|improve this answer
    
-V was the first thing I ran, for some reason the stock named in CentOS says it is an invalid option. (also tried -v which only shows the version number and --version which is another unknown) –  Kyle Brandt Nov 16 '10 at 16:38
    
Whoops -- you're right. From the changelog, that added in 9.6.0a1, and RHEL/CentOS 5 have version 9.3.x. I'll edit my answer. Yet another reason for RHEL 6. :) –  mattdm Nov 16 '10 at 16:43

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.